Marker-Inc-Korea / RAGchain

Extension of Langchain for RAG. Easy benchmarking, multiple retrievals, reranker, time-aware RAG, and so on...
Apache License 2.0
274 stars 28 forks source link

dynamically select how many passages to use for generating answer using relevance score #330

Open vkehfdl1 opened 9 months ago

vkehfdl1 commented 9 months ago

There are unrelated passages from top-k passages. If so, it will be not good for final answer result, also waste of input tokens. So, we can drop some passages using relevance score.

The simple idea is only use passages in top 1-sigma. or other n-sigma rules. You can strict threshold count for dropping passage.