Description
RAG system does not handle out-of-domain queries gracefully. Users receive irrelevant or hallucinated results when asking questions outside document scope. No confidence threshold or fallback mechanism.
Steps to Reproduce
- Document collection contains only HR policies
- User asks "What is quantum computing?"
- System attempts to answer from HR documents
- Results are nonsensical or hallucinated
- User receives incorrect information
Environment Information
- RAG confidence: Not measured
- Fallback mechanism: None
- Threshold handling: Not implemented
- Error handling: Insufficient
Expected Behavior
- System detects out-of-domain queries
- Returns "No relevant documents found"
- Confidence threshold prevents low-quality results
- Clear message when knowledge gap exists
- User directed to appropriate resources
Actual Behavior
- Attempts to answer anyway
- Hallucinated or irrelevant results
- No confidence checking
- Misleading information
Code Reference
- File:
src/retrieval/confidence_checker.py
- Missing: Confidence threshold checking
- Missing: Out-of-domain detection
- Missing: Fallback response handling
Additional Context
This is a Level 2 reliability issue. Fix requires:
- Adding confidence threshold (e.g., 0.7)
- Implementing out-of-domain detection
- Clear error messaging
- Fallback response handling
Suggested Labels
bug, reliability, hallucination-prevention, confidence-scoring, error-handling
Description
RAG system does not handle out-of-domain queries gracefully. Users receive irrelevant or hallucinated results when asking questions outside document scope. No confidence threshold or fallback mechanism.
Steps to Reproduce
Environment Information
Expected Behavior
Actual Behavior
Code Reference
src/retrieval/confidence_checker.pyAdditional Context
This is a Level 2 reliability issue. Fix requires:
Suggested Labels
bug,reliability,hallucination-prevention,confidence-scoring,error-handling