hakanbogan/self-rag
Self-RAG
Self-RAG is a retrieval-augmented generation pipeline that grades its own work before returning it. An ordinary RAG system retrieves, generates and stops; the failure mode is that it answers confidently from documents that did not actually support the question.
This implementation adds the critique step. Retrieved passages are scored for relevance, the draft answer is checked against them for support, and an answer that is not grounded is either regenerated or refused. The point is a system whose confidence tracks its evidence.
## stack
- Python
- LangChain
- Vector search