-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
update chunk & Overlap in rag function #2525
base: develop
Are you sure you want to change the base?
Conversation
Chunk size and overlap is too small for most rag documents
Update generation.ts
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.
Hi @adventuresinai! Welcome to the elizaOS community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now an elizaOS contributor!
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe pull request modifies the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/core/src/generation.ts (1)
1351-1352
: Increased chunk size and overlap for better context preservation.The changes to increase the default chunk size (512→1500) and bleed/overlap (20→100) should improve context retention during text segmentation, particularly beneficial for RAG operations.
Consider adding a comment explaining the rationale behind these specific values to help future maintainers understand the trade-offs between chunk size, overlap, and memory usage.
Relates to
RAG Chunk & Overlap increase
Risks
none
Low
Background
What does this PR do?
increases chunk size and overlap
What kind of change is this?
Improvements (misc. changes to existing features)
Improvement to RAG function, v minor change for immediate improvement on most file sizes
Documentation changes needed?
My changes do not require a change to the project documentation.
rag upload post code change
Testing
Where should a reviewer start?
Detailed testing steps
None: Automated tests are acceptable.
none
none
smoothe
Summary by CodeRabbit