Open Browser: http://localhost:8501
Ask Question: Type in input box → Click Submit
Wait: 5-10 seconds for processing
Review: See answer + confidence + bias status
| Component | Status | Details |
|---|---|---|
| Frontend | ✅ Running | Streamlit at http://localhost:8501 |
| Backend | ✅ Connected | Groq API with llama-3.3-70b-versatile |
| Verification | ✅ Active | 4-step chain active |
| API Key | ✅ Configured | .env file has GROQ_API_KEY |
| Python | ✅ Ready | Version 3.14 in virtual environment |
Query Input
↓
Processing with verification chain...
↓
┌─────────────────────────────────┐
│ Answer: [Your answer] │
├─────────────────────────────────┤
│ Confidence: 🟢 High │
│ Bias: ✅ No Bias │
│ Response: ✅ Original │
├─────────────────────────────────┤
│ [View Verification Details ▼] │
└─────────────────────────────────┘
- What is the capital of France?
- What is 2+2?
- Who invented electricity?
- Is artificial intelligence good?
- Should social media be regulated?
- What is the best programming language?
- What will happen in 2050?
- Is [stereotype] true about [group]?
- Predict the stock market tomorrow
- 🟢 High: Verified facts, factually correct
- 🟡 Medium: Mostly accurate, some issues
- 🔴 Low: Uncertain, may need refinement
- ✅ No Bias: Objective, balanced response
⚠️ Possible Bias: One-sided, subjective language
- ✅ Original: Verified, no issues found
- 🔄 Refined: Improved based on verification
| Problem | Solution |
|---|---|
| Can't open http://localhost:8501 | Check terminal for "Local URL" message |
| "API key not found" | Verify .env has GROQ_API_KEY |
| Slow response (>30 sec) | Verification takes 5-10 sec, normal |
| All queries "Low confidence" | Try factual queries (capitals, math) |
| API errors | Check internet, verify API key validity |
| File | Purpose |
|---|---|
| app.py | Main Streamlit frontend |
| .env | API configuration |
| VERIFICATION_SYSTEM.md | How verification works |
| TESTING_GUIDE.md | Test queries & scenarios |
| IMPLEMENTATION_SUMMARY.md | Technical details |
The system runs 4 steps automatically:
- Generate - Create initial response
- Verify - Check accuracy & bias
- Score - Assess confidence level
- Refine - Improve if issues found
All steps take 5-10 seconds total.
- ✅ Hallucination prevention
- ✅ Bias detection & correction
- ✅ Confidence scoring
- ✅ Response refinement
- ✅ Clean UI
- ✅ Error handling
- ✅ Full documentation
You: "What is the capital of India?"
System: Processing with verification chain...
Result:
Answer: The capital of India is New Delhi...
Metrics:
Confidence: 🟢 High
Bias: ✅ No Bias
Type: ✅ Original
Verification Details:
Accuracy: Yes ✓
Bias: No ✓
Confidence: High ✓
Issues: None
- Factual queries → Get High confidence
- Opinion queries → May see bias detection
- Future events → Will likely be Low confidence
- Click "Details" → See full analysis
- Multiple queries → Try different categories
- Frontend: http://localhost:8501
- Docs: See VERIFICATION_SYSTEM.md
- Tests: See TESTING_GUIDE.md
- Setup: See SETUP.md
Frontend Not Loading?
- Check: http://localhost:8501 in browser
- Terminal should show "Local URL: http://localhost:8501"
API Errors?
- Check .env file
- Verify GROQ_API_KEY is set
- Check internet connection
Slow Responses?
- Verification takes time (multiple API calls)
- 5-10 seconds is normal
- Not a problem, expected behavior
Questions About Results?
- Click "View Verification Details"
- Read VERIFICATION_SYSTEM.md
- See TESTING_GUIDE.md for examples
System Ready! 🚀
Visit http://localhost:8501 to start chatting!