-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Chunk Size #2438
Comments
🤖 Hey there, @MrBrabus75! Nice to see you diving into dify's depths again. How's everything going on your end? Based on the information provided, it seems like you're encountering an issue with the chunk size when using an Embedding with less than 1000 dimensions. However, the current limit for the chunk size in the dify codebase is not explicitly mentioned in the provided context. The codebase does have limits set for file size, as seen in the As for the specific error message you're receiving when trying to use an Embedding with less than 1000 dimensions, I wasn't able to find an answer within the repository. Regarding the part of the dify codebase that handles the chunk size for Embeddings, the Unfortunately, I wasn't able to find a configuration setting in the dify codebase that allows the user to adjust the chunk size limit or a way to increase the chunk size limit in the dify codebase. Could you please provide more information about the error you're encountering? Specifically, could you share the exact error message and stack trace, and any additional steps or code that leads to the error? This will help in understanding the issue better and finding a suitable solution. Sources
|
Usually we don't recommend setting such a large chunk size. Below 1000 is a relatively appropriate size for semantic search. I guess you might want the chunk content as LLM context to be as complete as possible. Maybe you can try the QA splitting mode. If you're not satisfied, you can continue modifying the chunk content. Use Q as the semantic searching content and A as the context for LLM. |
@takatost The problem is that the Q/A model is available only in Chinese and English, and not at all in French, even though my model is multilingual, which is a shame… (That feature would be nice, haha). Then, I thought it would be good to increase the chunk limit for embeddings with large dimensions like Jina, Voyager, SFR Mistral mteb. And finally, if I embed 50 documents (installation guides), and each document is divided into 50 chunks, the LLM struggles a bit to provide me with a detailed installation guide. Thank you for your responses; I hope you will help me find a solution for these points. |
QA mode does not currently support French, and the effect is also not as expected. What I mean is that we can indirectly create a knowledge base for QA mode by generating QAs, and then add or modify QA chunks based on this. The chunk limit of 1000 or less means that the search content (query) and smaller chunk (Q) have a higher semantic match, while the context of LLM can be extended to larger chunk. In the future, within a month perhaps, we will provide the Parent Document Index mode to support the indexing mode mentioned above. For example, a sentence can be used as a chunk, and the paragraph or the content of the current page where this sentence is located as the Parent can be used as context for LLM. If this answer doesn't meet your expectations, could you please provide some more detailed scenarios for us to refer to? Thank you very much! 😊 |
Thank you for your time and your very detailed response. However, I have a few questions:
Thank you for everything you do. |
Hope this can help you! 🤗 |
okay i see, thanks you for all |
Close due to it's no longer active, if you have any questions, you can reopen it. |
Self Checks
Dify version
0.5.2
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
How reproduce ?
Use a Embedding with <1000 dimensions.
✔️ Expected Behavior
Working ?
❌ Actual Behavior
Error chunk size 0 - 1000
How upgrade chunk size limite ? 0-1000 to 0-4096 or higher ?
The text was updated successfully, but these errors were encountered: