Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Multi-Source RAG for Technical Support

A multi-source RAG system tailored for technical customer support on distributed software systems.

Retrieves and reconciles knowledge from three distinct sources:

  1. Product Documentation
  2. Customer Support Forums
  3. Engineering Blogs

Architecture Overview

  1. Deterministic Pipeline: Chunking, query intent routing, retrieval, multi-stage reranking, and contradiction resolution are performed using classical IR, discriminative models, and deterministic rules. The LLM is used only for the final response generation.
  2. Protocol-Driven Interfaces: Core components (Embedder, Reranker, NLI, Generator, VectorStore) follow Python Protocols configured via config/default.yaml.
  3. Ground-Truth Fact Ledger: Corpora are generated from data/ledger.yaml with injected contradictions across numeric limits, version deprecations, feature tiers, and unofficial workarounds.
  4. Trace Logging: Each query execution appends a structured JSONL record to logs/rag_traces.jsonl tracking routing weights, stage scores, detected conflicts, citations, and latencies.

Directory Structure

rag/
├── config/
│   └── default.yaml
├── data/
│   ├── ledger.yaml
│   └── raw/
│       ├── docs/
│       ├── forum/
│       └── blog/
├── src/
│   ├── interfaces.py
│   ├── chunking/
│   │   ├── doc_chunker.py
│   │   ├── forum_chunker.py
│   │   └── blog_chunker.py
│   ├── indexing/
│   ├── routing/
│   ├── retrieval/
│   ├── rerank/
│   ├── contradiction/
│   ├── generation/
│   ├── logging/
│   └── pipeline.py
├── eval/
│   ├── queries.jsonl
│   ├── run_eval.py
│   └── ablations.py
├── scripts/
│   ├── build_data.py
│   ├── demo.py
│   └── cli.py
├── report.md
├── presentation_script.md
└── requirements.txt

Quickstart

1. Environment Setup

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Run Interactive CLI

python scripts/cli.py

If no API key is detected in the environment, the CLI will prompt for your Groq API key on startup.

3. Run Automated 12-Query Demo

python scripts/demo.py

4. Run Benchmark Evaluation

python eval/run_eval.py

5. Run Ablation Study

python eval/ablations.py

Benchmark Results

  • Recall@5: 1.0000
  • MRR: 1.0000
  • nDCG@5: 0.9883
  • Contradiction Precision: 0.8000
  • Contradiction Recall: 0.6667
  • Contradiction F1: 0.7273
  • Resolution Accuracy: 0.7500
  • Citation Precision: 1.0000
  • Faithfulness: 1.0000
  • Conflict Adherence: 0.7500

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages