Originally created by @Schwenn2002 on GitHub (Jan 27, 2025).
A suggestion for optimizing the RAG function.
Currently, you can improve the quality of the query using Top k and ReRanking.
It would be optimal to filter out the most important documents using Top k=50 and ReRanking (0.8). Then another parameter would be optimal if, after the reranking, maximum the best (Top Best=20) hits were passed on to the LLM as context.
This way, the context length can be kept shorter and the response time improved. This also ensures that the context cannot become larger than configured in the LLM.
The current behavior of the LLM is that a context that is too large cannot be processed (i.e. it is interpreted as empty). It would therefore make sense to truncate the context from the RAG query after reranking to the context length of the LLM, so that only the best hits are passed on
Originally created by @Schwenn2002 on GitHub (Jan 27, 2025).
A suggestion for optimizing the RAG function.
Currently, you can improve the quality of the query using Top k and ReRanking.
It would be optimal to filter out the most important documents using Top k=50 and ReRanking (0.8). Then another parameter would be optimal if, after the reranking, maximum the best (Top Best=20) hits were passed on to the LLM as context.
This way, the context length can be kept shorter and the response time improved. This also ensures that the context cannot become larger than configured in the LLM.
The current behavior of the LLM is that a context that is too large cannot be processed (i.e. it is interpreted as empty). It would therefore make sense to truncate the context from the RAG query after reranking to the context length of the LLM, so that only the best hits are passed on
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Schwenn2002 on GitHub (Jan 27, 2025).
A suggestion for optimizing the RAG function.
Currently, you can improve the quality of the query using Top k and ReRanking.
It would be optimal to filter out the most important documents using Top k=50 and ReRanking (0.8). Then another parameter would be optimal if, after the reranking, maximum the best (Top Best=20) hits were passed on to the LLM as context.
This way, the context length can be kept shorter and the response time improved. This also ensures that the context cannot become larger than configured in the LLM.
The current behavior of the LLM is that a context that is too large cannot be processed (i.e. it is interpreted as empty). It would therefore make sense to truncate the context from the RAG query after reranking to the context length of the LLM, so that only the best hits are passed on