Self correction loop for RAG when "answer is not possible given context" #5988
Labels
2.x
Related to Haystack v2.0
P1
High priority, add to the next sprint
type:feature
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
In RAG it can happen that requested information is not present in the given context documents.
Then the generative model is instructed to say: "answer is not possible given context".
But maybe the answer is present in documents that were not given to the generative model.
Please also look at deepset-ai/haystack-demos#23 and their insights into what is missing for implementing looping in a 2.0 pipeline.
Describe the solution you'd like
A loop passing retrieved documents, in order of relevance, until an answer is found or another stopping criterion is met.
Additional context
This feature is important to showcase how loops enhance RAG in a meaningful way.
The text was updated successfully, but these errors were encountered: