Skip to content

feat: add EmbeddingsFilter contextual compression to HybridRetriever …#133

Open
bhavyakeerthi3 wants to merge 1 commit intoreactome:mainfrom
bhavyakeerthi3:feat/contextual-compression-retriever
Open

feat: add EmbeddingsFilter contextual compression to HybridRetriever …#133
bhavyakeerthi3 wants to merge 1 commit intoreactome:mainfrom
bhavyakeerthi3:feat/contextual-compression-retriever

Conversation

@bhavyakeerthi3
Copy link
Copy Markdown

🐛Summary

Closes #132

Wraps the HybridRetriever with a ContextualCompressionRetriever using
LangChain's EmbeddingsFilter to discard low-relevance documents before
they reach the LLM.

Changes

  • Added EmbeddingsFilter compressor with similarity_threshold=0.76
  • Wrapped HybridRetriever with ContextualCompressionRetriever
  • Both Reactome and UniProt RAG chains benefit automatically

Impact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: HybridRetriever passes noisy, low-relevance documents to the LLM

1 participant