# Docchat RAG

> Privacy-first local RAG engine with multi-agent fact-verification, hybrid retrieval, and Docling integration.

Docchat RAG is a paid AI agent skill on Agensi by Muhammad Salihu, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $13 (one-time purchase)
- Creator: [Muhammad Salihu](https://www.agensi.io/creators/muhammad-salihu)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/docchat-rag
- Tags: ai-agents, python, langgraph, ollama, rag, chromadb

## About this skill

Privacy-focused RAG can be difficult to deploy when local models hallucinate or ignore source constraints. This skill provides a 100% local, multi-agent document QA engine that enforces factual grounding through a dedicated verification loop.

### What it does
- **Multi-stage verification** uses a LangGraph workflow to check chunk relevance, synthesize answers, and audit claims for contradictions.
- **Hybrid retrieval** combines BM25 lexical search with ChromaDB dense vectors to improve recall across technical and natural language queries.
- **Smart document parsing** utilizes Docling to convert PDF, DOCX, and TXT files into clean Markdown, splitting content by headers to preserve context.
- **Local model execution** integrates with Ollama to run reasoning and embedding tasks entirely on-premise.
- **Automated caching** manages document chunks via SHA-256 deduplication to skip redundant processing for recurring files.

### How it works
1. **Environment check** verifies the Ollama server is active and pulls the required Llama3 and Nomic models.
2. **Ingestion pipeline** processes local files through `DocumentProcessor` to generate header-aware Markdown chunks.
3. **Index creation** builds the hybrid ensemble retriever using `RetrieverBuilder` with configurable lexical and vector weights.
4. **Agent execution** triggers the `AgentWorkflow` to move from relevance checking to final fact-checking.
5. **Report generation** delivers a synthesized answer alongside a structured verification audit of supported and unsupported claims.

### Frameworks & tools
This skill is built on Python 3.12, LangGraph for agent orchestration, and Docling for document conversion. It utilizes ChromaDB for vector storage, BM25 for lexical search, and Gradio for the optional web interface. All LLM operations are handled via local Ollama instances.

### Why this beats prompting it yourself
Standard RAG prompts often fail to self-correct when the retrieved context is irrelevant. This skill implements a formal state machine that prevents hallucinations by exiting early if no matches are found and rerunning research cycles if the verification agent detects unsupported claims.

### Use cases
- Querying internal technical documentation for specific implementation details.
- Auditing legal or policy documents for contradictions against a query.
- Building a private research assistant that works entirely offline.
- Integrating a fact-checked QA pipeline into existing Python backends.

### Known limitations
Requires Python 3.12 or higher. Performance is dependent on local hardware capabilities for running Ollama models. Smaller models under 3B parameters may struggle with the strict formatting required by the verification agent.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Docchat RAG skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent hallucinations compared to a standard RAG setup?

Docchat RAG uses a multi-agent LangGraph workflow that includes a dedicated verification loop to audit claims for contradictions and ensure every part of the answer is grounded in your uploaded documents.

### What are the hardware and software requirements to run Docchat RAG?

This skill is designed for 100% local execution using Ollama; it requires Python 3.12+ and a machine capable of running models like Llama3 and Nomic embeddings on-premise.

### Can I use this skill with complex document formats like PDFs or Word files?

Yes, it uses Docling to intelligently parse PDF, DOCX, and TXT files into header-aware Markdown, ensuring context is preserved even in complex, structured documents.

### What exactly is included in the purchase of this skill?

Your purchase includes the full Python source code, the LangGraph agent orchestration logic, the hybrid retrieval engine (BM25 + ChromaDB), and the Gradio web interface.

### Do I have to re-process my documents every time I restart the agent?

The skill uses an automated caching system with SHA-256 deduplication, allowing it to recognize previously processed files and skip redundant indexing to save time.

### Can I use any model available on Ollama with this skill?

While compatible with most local models via Ollama, it is recommended to use models with at least 7B-8B parameters to ensure the verification agent can follow strict formatting and reasoning logic.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
