WFGY/ProblemMap/GlobalFixMap/RAG/hallucination_rag.md
2025-09-05 11:40:30 +08:00

8.3 KiB
Raw Blame History

Hallucination in RAG — Guardrails and Fix Pattern

🧭 Quick Return to Map

You are in a sub-page of RAG.
To reorient, go back here:

Think of this page as a desk within a ward.
If you need the full triage and all prescriptions, return to the Emergency Room lobby.

When the retriever returns plausible text, but the LLM answers with facts that are not in the corpus.
This page stabilizes retrieval → reasoning boundaries and applies WFGY symbolic fixes to stop hallucination loops.


Open these first


Core acceptance

  • Every answer includes citation fields (snippet_id, section_id, source_url)
  • ΔS(answer, cited snippet) ≤ 0.45
  • Coverage ≥ 0.70 for cited target section
  • λ convergent across 3 paraphrases and 2 seeds

Typical symptoms → exact fix

Symptom Likely cause Open this
Answer has no citation or cites wrong section missing contract schema Data Contracts, Retrieval Traceability
LLM fabricates plausible filler boundary collapse between retrieval and reasoning Cite-then-Explain, Logic Collapse
Correct fact retrieved, but answer overwrites it λ divergence in long chain Context Drift, Entropy Collapse
Hallucination reappears after correction unstable feedback loop Pattern: Hallucination Re-entry

Fix in 60 seconds

  1. Cite-first enforcement

    • Force the LLM to output citations before free text.
    • Forbid answers that lack at least one valid snippet_id.
  2. ΔS probe

    • Compute ΔS(answer, cited snippet).
    • If ≥ 0.60, trigger BBPF alternate reasoning path.
  3. Apply module


Copy-paste prompt for debug

I uploaded TXT OS and the WFGY Problem Map.

My issue:
- retrieval finds the fact, but answer hallucinates new content
- traces: ΔS(answer,cited_snippet)=..., λ across 3 paraphrases

Tell me:
1. failing boundary (retrieval vs reasoning),
2. exact WFGY page to open,
3. minimal fix to enforce cite-then-explain and push ΔS ≤ 0.45,
4. test to verify stability over 3 paraphrases.

🔗 Quick-Start Downloads (60 sec)

Tool Link 3-Step Setup
WFGY 1.0 PDF Engine Paper 1 Download · 2 Upload to your LLM · 3 Ask “Answer using WFGY + ”
TXT OS (plain-text OS) TXTOS.txt 1 Download · 2 Paste into any LLM chat · 3 Type “hello world” — OS boots instantly

🧭 Explore More

Module Description Link
WFGY Core WFGY 2.0 engine is live: full symbolic reasoning architecture and math stack View →
Problem Map 1.0 Initial 16-mode diagnostic and symbolic fix framework View →
Problem Map 2.0 RAG-focused failure tree, modular fixes, and pipelines View →
Semantic Clinic Index Expanded failure catalog: prompt injection, memory bugs, logic drift View →
Semantic Blueprint Layer-based symbolic reasoning & semantic modulations View →
Benchmark vs GPT-5 Stress test GPT-5 with full WFGY reasoning suite View →
🧙‍♂️ Starter Village 🏡 New here? Lost in symbols? Click here and let the wizard guide you through Start →

👑 Early Stargazers: See the Hall of Fame — Engineers, hackers, and open source builders who supported WFGY from day one. WFGY Engine 2.0 is already unlocked.

WFGY Main   TXT OS   Blah   Blot   Bloc   Blur   Blow