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

[REQUEST] Improve RAG performance by Contextual Retrieval #682

Open
rsnk96 opened this issue Feb 28, 2025 · 0 comments
Open

[REQUEST] Improve RAG performance by Contextual Retrieval #682

rsnk96 opened this issue Feb 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@rsnk96
Copy link

rsnk96 commented Feb 28, 2025

Reference Issues

No response

Summary

Dear Kotaemon team

Great work so far. It would be nice if we could enhance retrieval performance be prefixing context in the document. Recent work by Anthropic shows notable gains by doing so. This appears to be relatively simple to implement (link shared below)

Image

Basic Example

Suppose the document is of a SEC filing,

original_chunk = "The company's revenue grew by 3% over the previous quarter."

contextualized_chunk = "This chunk is from an SEC filing on ACME corp's performance in Q2 2023; the previous quarter's revenue was $314 million. The company's revenue grew by 3% over the previous quarter."

Image

Drawbacks

While uploading a file into the rag database, it will take more time now (as the context has to be estimated for all chunks)

Additional information

Reference links:

@rsnk96 rsnk96 added the enhancement New feature or request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant