RAG में failure सिर्फ़ LLM की गलती नहीं होती
Enterprise RAG systems में answer गलत होने के कई कारण होते हैं: retrieval wrong था, chunking खराब थी, source outdated था, citation missing था या model ने context से unsupported claim बना दिया।
इसलिए RAG evaluation को दो हिस्सों में देखना चाहिए: retrieval quality और generation quality।
Fact base
RAGAS paper RAG evaluation के लिए context precision, context recall, faithfulness और answer relevancy जैसे metrics describe करता है।
TruLens RAG evaluation में groundedness, context relevance और answer relevance को hallucination triad की तरह use करता है।
Google Vertex AI evaluation docs groundedness और question-answering relevance जैसे metrics provide करती हैं, ताकि teams custom criteria से generative outputs evaluate कर सकें।
Practical scorecard
- Context relevance: retrieved chunks user question से सच में जुड़ते हैं या नहीं।
- Context precision: top-k chunks में कितने useful हैं।
- Faithfulness: answer के claims source में supported हैं या नहीं।
- Answer relevance: answer user question को complete करता है या सिर्फ़ generic है।
- Citation quality: source link, document section और timestamp traceable हैं या नहीं।
| Failure type | Example | Reviewer decision |
|---|---|---|
| Wrong retrieval | Refund policy पूछा, pricing page आया | Retrieval issue |
| Unsupported claim | Source में नहीं था, answer में claim आ गया | Hallucination |
| Stale source | पुराना SLA quote हो गया | Data freshness issue |
| Wrong language tone | Hindi query पर awkward English answer | Localization issue |
Indian enterprise angle
BFSI, education, healthcare और government workflows में automated metric अकेला काफी नहीं होता। Domain reviewer को देखना पड़ता है कि answer policy, regulation और local language context के हिसाब से safe है या नहीं।
TrainPlex RAG outputs को claim-level score कर सकता है: supported, partially supported, unsupported, stale, unsafe या escalation-needed। इससे AI team को exact improvement backlog मिलता है।
RAG evaluation को sprint में कैसे चलाएं?
RAG evaluation को एक बार का audit न बनाएं। इसे product release process का हिस्सा बनाएं। हर नया document source, new prompt, new embedding model या chunking change आने पर evaluation set फिर से run होना चाहिए।
Start करने के लिए 50–100 representative questions लें। इनमें easy FAQ, policy questions, multi-document questions, Hindi/Hinglish questions, ambiguous questions और “I don’t know” type cases शामिल करें। फिर हर answer पर reviewer को तीन चीजें check करनी चाहिए: retrieved evidence, answer claim और user usefulness।
Evaluation dataset में क्या होना चाहिए?
- User question: real या realistic query
- Expected source: कौन सा document/page सही source है
- Expected answer: short reference answer
- Risk tag: low, medium, high
- Language tag: English, Hindi, Hinglish या regional
- Reviewer note: tricky point क्या है
Claim-level review क्यों जरूरी है?
कई बार RAG answer overall अच्छा दिखता है, लेकिन उसमें एक unsupported sentence होता है। Enterprise context में वही एक sentence legal, compliance या trust problem बना सकता है। इसलिए answer को paragraph-level नहीं, claim-level review करना चाहिए।
Example: अगर bot कहता है “refund 24 hours में guaranteed है”, लेकिन source document में “usually processed within 3-5 days” लिखा है, तो answer fluent होने के बावजूद wrong है। ऐसे cases को faithfulness failure में mark करना चाहिए।
Human + automated metric का combined model
| Check | Automated metric | Human reviewer |
|---|---|---|
| Retrieval | Context precision/recall | क्या selected source business-wise सही है? |
| Grounding | Faithfulness score | क्या हर claim source से supported है? |
| Usefulness | Answer relevance | क्या user को clear next step मिला? |
| Risk | Policy classifier | क्या answer compliance या brand risk बना सकता है? |
TrainPlex RAG QA deliverables
TrainPlex RAG QA में team सिर्फ pass/fail नहीं देती। हर failed sample के साथ failure reason, corrected answer, missing source, source freshness issue और improvement suggestion दिया जाता है। इससे client के engineering team को तुरंत पता चलता है कि problem retrieval में है, prompt में है, data source में है या policy rule में।
यह खासकर Indian enterprise AI teams के लिए useful है, क्योंकि user queries अक्सर Hindi, English और domain terms को mix करती हैं। Human reviewer इस nuance को पकड़ सकता है, जहाँ automated metric कभी-कभी pass दे देता है।