Skip to content

[Feature Request]: Improve RAG performance using Contextual RetrievalΒ #5503

@rsnk96

Description

@rsnk96

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

No

Describe the feature you'd like

Dear Infinflow / Ragflow 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

Describe implementation you've considered

No response

Documentation, adoption, use case

Additional information

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)

Reference links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions