{"slug": "robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag", "title": "Robust-GAP: Achieving Zero-Hallucination Causal Summarization in Hierarchical RAG", "summary": "Robust-GAP, a hierarchical Retrieval-Augmented Generation (RAG) framework, achieves zero-hallucination causal summarization by combining dynamic causal graph extraction, active topology verification, and metadata provenance propagation. The framework enforces strict citation traceability and prevents LLM-generated hallucinations in multi-document log summarization. A Python-based CLI tool implementing Robust-GAP is released with zero external dependencies.", "body_md": "This article introduces **Robust-GAP**, a hierarchical Retrieval-Augmented Generation (RAG) framework designed to eliminate semantic hallucinations and knowledge drift during multi-document log summarization. By combining dynamic causal graph extraction (DLCE), active topology verification (SGAV), and metadata provenance propagation (PAPP), the framework enforces strict citation traceability and prevents LLM-generated hallucinations.\n\n*Note: The complete academic preprint detailing this research is openly available on Zenodo (DOI: 10.5281/zenodo.21436390).*\n\nStandard Retrieval-Augmented Generation (RAG) pipelines fail when aggregating unstructured multi-document event streams because they lack causal tracking. When large language models (LLMs) summarize logs, chat transcripts, or transaction records, they frequently associate unrelated events. This behavior, known as knowledge drift, creates false dependencies.\n\nFor example, when troubleshooting an incident, an LLM might draw a causal link between a database table cleanup cron job and an unrelated disk write failure simply because both logs occurred within the same context window.\n\nRobust-GAP resolves this issue. The pipeline constructs a dynamic causal graph of incoming events, verifies these connections against system schemas, and propagates source metadata directly to the final summary output as verifiable inline citations.\n\nRobust-GAP is not an isolated development. It represents the fourth generation of an algorithmic lineage spanning a decade of research on hierarchical tree reduction:\n\nRobust-GAP maps unstructured event streams into a two-level hierarchical merge tree. The pipeline relies on three core stages:\n\nThe following infographic illustrates the complete Robust-GAP workflow:\n\nThe table below contrasts Robust-GAP with alternative approaches:\n\n| Feature / Metric | Vector + Batch | Hybrid + OneShot | Classic GAP | Robust-GAP (Ours) |\n|---|---|---|---|---|\nCausal Topology |\nNo | No | Static Only | Dynamic (DLCE) |\nHallucination Pruning |\nNo | No | No | Yes (SGAV) |\nStrict Provenance |\nNo | No | Textual Only | Metadata (PAPP) |\nCitations |\n0% | 10% | 68% | 100% (Verifiable) |\nHallucination Rate |\nHigh | High | Low | 0% |\n\nTo implement the pipeline, we released a Python-based CLI tool:\n\nThe script runs on Python 3 with zero external dependencies. It uses direct REST communication with the Gemini API, falling back to a local simulation mode if an API key is not configured.\n\nThe CLI handles two input JSON formats:\n\n`id`\n\n, `timestamp`\n\n, `text`\n\n, `module`\n\n). Custom field keys can be mapped dynamically via flags like `--key-text`\n\nor `--key-module`\n\n.`[\"error 1\", \"error 2\"]`\n\n). The script automatically assigns sequential document IDs, timestamps, and schema wrappers on-the-fly.Execute the pipeline with:\n\n```\npython3 robust_gap_cli.py samples/travel_incident_data.json --language ja\n```\n\n`data_file`\n\n: Path to the input JSON file containing log documents.`--model`\n\n: Target Gemini model name (default: `gemini-3.1-flash-lite`\n\n).`--api-key`\n\n: API key for Gemini. Automatically loads from environment variables if omitted.`--language`\n\n, `-l`\n\n: Output language code (e.g. `en`\n\n, `ja`\n\n, `zh`\n\n) (default: `en`\n\n).`--time-window`\n\n: Proximity window in seconds for DLCE (default: `1200`\n\nseconds).`--cmdb-schema`\n\n: Comma-separated component lists for SGAV verification.`--key-text`\n\n, `--key-timestamp`\n\n, etc.: Dynamic key mapping for custom input structures.`--mock`\n\n: Forces offline local mock simulation.We verified the pipeline against two pre-bundled datasets available in the [samples directory](https://github.com/tanaikech/Robust-GAP/tree/main/samples) using the live Gemini API.\n\nThis dataset ([travel_incident_data.json](https://github.com/tanaikech/Robust-GAP/blob/main/samples/travel_incident_data.json)) simulates travel disruptions mixed with unrelated noise logs (such as coffee purchases or postcard shopping) to test filtering.\n\n```\npython3 robust_gap_cli.py samples/travel_incident_data.json --language ja\n```\n\n**Real LLM Output:**\n\n```\n============================================================\n                   ROBUST-GAP FINAL SUMMARY\n============================================================\nWallet紛失でCardCompany停止[D13-D16]。BusTransitとTaxi利用拒否[D14-D16]。WeatherService警報でRailway運休[D9-D12]。FoodDeliveryとRestaurantに影響[D10-D12]。航空便遅延、チェックイン機故障による交通機関障害や手荷物誤送も発生。\n============================================================\n```\n\nThis dataset ([sre_incident_data.json](https://github.com/tanaikech/Robust-GAP/blob/main/samples/sre_incident_data.json)) simulates a multi-service outage spanning four parallel infrastructure dependency chains mixed with 16 background noise events.\n\n```\npython3 robust_gap_cli.py samples/sre_incident_data.json --language en\n```\n\n**Real LLM Output:**\n\n```\n============================================================\n                   ROBUST-GAP FINAL SUMMARY\n============================================================\nAuthServer validation failed [D1], affecting TokenStore [D1,D2] and blocking ClientAPI [D3,D4]. HostHardware voltage drop [D5] forced AppServer failure [D7,D8]. DiskController high latency [D9] stalled DbStorage WAL [D10], locking DbQuery threadpool [D11,D12]. SwitchRoute packet loss [D13] aborted CheckoutService transaction [D15,D16].\n============================================================\n```\n\nDuring benchmarking on a 32-node cluster log dataset, we compared the hallucination and citation metrics across all four pipelines.\n\n`[Dxx]`\n\n), allowing instant programmatic verification of all claims.The core design of Robust-GAP—decoupled causal graphing, schema validation, and metadata propagation—applies to any domain requiring verifiable summaries of unstructured sequence logs.\n\nWhen customer issues span multiple agents and chat channels, support logs get fragmented. Robust-GAP can ingest these unstructured conversations, isolate independent customer threads, and compile a chronological summary backed by direct message citations.\n\nFinancial audits require parsing thousands of transaction logs, ledger updates, and transfer records. By mapping transaction flows as a causal graph, Robust-GAP can flag suspicious transfer loops, validate them against compliance rules, and produce summaries of the anomaly with direct, ledger-level references.\n\nFor mission-critical systems, standard flat-vector RAG is insufficient. By enforcing structured causal hierarchies, Robust-GAP allows teams to deploy LLMs in production environments where hallucination risks must be strictly controlled, rather than just theoretically discouraged.\n\nThe codebase is open source and available on [GitHub](https://github.com/tanaikech/Robust-GAP). Try running it on your own log streams.\n\nIf you use this work in your academic research, please cite the preprint as follows:\n\n```\nTanaike, Kanshi. (2026). Robust-GAP: Hallucination-Resistant Hierarchical RAG with Dynamic Topology and Citation Provenance. Zenodo Report. https://doi.org/10.5281/zenodo.21436390\n```\n\n", "url": "https://wpnews.pro/news/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag", "canonical_source": "https://dev.to/gde/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag-2606", "published_at": "2026-07-19 06:04:17+00:00", "updated_at": "2026-07-19 06:29:18.990454+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-research", "ai-tools", "developer-tools"], "entities": ["Robust-GAP", "Gemini", "Zenodo", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag", "markdown": "https://wpnews.pro/news/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag.md", "text": "https://wpnews.pro/news/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag.txt", "jsonld": "https://wpnews.pro/news/robust-gap-achieving-zero-hallucination-causal-summarization-in-hierarchical-rag.jsonld"}}