Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add token limit attribute to providers, derive chunk size for indexing docs from this #225

Open
3coins opened this issue Jun 16, 2023 · 0 comments
Labels
enhancement New feature or request @jupyter-ai/core

Comments

@3coins
Copy link
Collaborator

3coins commented Jun 16, 2023

Problem

Each LLM provider and model has limits on the input size of prompts. When a user asks questions about indexed docs with /ask, the chunk size used to split docs in indexing affects the amount of context passed to the LLM in the prompt. Especially for smaller models that are running locally, an augmented prompt can end up exceeding the prompt size limit.

Proposed Solution

  • Add token limit attribute to provider class and implement this for different providers/models.
  • Use the token limit to derive the chunk size, overlap or a different chain that optimizes the indexing for that particular model.
@3coins 3coins added the enhancement New feature or request label Jun 16, 2023
@3coins 3coins added this to the 0.9.0 Release milestone Jun 16, 2023
@dlqqq dlqqq modified the milestones: 0.9.0 Release, 0.10.0 Release Jun 23, 2023
@JasonWeill JasonWeill changed the title Add token limit attribute to providers, derive chuck size for indexing docs from this Add token limit attribute to providers, derive chunk size for indexing docs from this Jul 27, 2023
@JasonWeill JasonWeill removed this from the 2.3.0 Release milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/core
Projects
None yet
Development

No branches or pull requests

3 participants