-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Simple text chunking #188
Simple text chunking #188
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
@alchaplinsky We should figure out how the output of this |
@andreibondarev Do different vector search databases require different chunk size? |
It's not at the vector search DB level, it's a concern for LLMs. For example when data is added to Chroma DB (and all other vector search DBs (almost) work the same way) here the text itself is added along with the associated embedding. If we generate 1 embedding from the whole large text and then that whole text gets retrieved and passed to the LLM to synthesize the answer. The prompt literally looks like this:
The whole text might exceed the LLM context window so it needs to be split into smaller chunks. |
Simple text chunking using the baran gem.
Example usage:
or