Controllable-RAG-Agent
Controllable-RAG-Agent is an open-source Python framework for building advanced Retrieval-Augmented Generation systems that answer complex questions from custom documents using a graph-based agentic approach. It combines document processing, vector retrieval, multi-step reasoning, and hallucination prevention to deliver grounded answers without relying on pre-trained model knowledge.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | NirDiamant/Controllable-RAG-Agent |
| Owner | NirDiamant |
| Primary language | Jupyter Notebook |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.6k |
| Forks | 264 |
| Open issues | 4 |
| Latest release | Unknown |
| Last updated | 2026-06-04 |
| Source | https://github.com/NirDiamant/Controllable-RAG-Agent |
What Controllable-RAG-Agent is
Built on LangChain/LangGraph with FAISS vector stores, the system uses deterministic graph-based planning to decompose queries into sub-tasks, anonymizes questions to reduce model bias, retrieves and distills relevant content, and applies chain-of-thought reasoning with self-verification (inspired by Self-RAG). Supports flexible LLM backends (OpenAI, Groq) and includes Ragas-based evaluation metrics.
Get the Controllable-RAG-Agent source
Clone the repository and explore it locally.
git clone https://github.com/NirDiamant/Controllable-RAG-Agent.gitcd Controllable-RAG-Agent# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- LLM API costs scale with document volume (summarization step) and query complexity (multi-step reasoning). Budget for token usage across all planning, retrieval, and generation phases.
- Vector store size depends on document preprocessing strategy (chunk size, overlap, summary inclusion). FAISS is in-memory; validate RAM requirements for large corpora before production.
- Requires tuning anonymization, planning depth, and verification thresholds. No pre-trained defaults provided; experimentation needed to balance accuracy vs. latency for your domain.
- Error handling and fallback strategies for LLM failures, retrieval misses, or verification failures are not explicitly detailed. Custom error recovery logic needed for production.
- Evaluation requires labeled datasets and Ragas metrics setup. Without ground-truth Q&A pairs, measuring hallucination prevention and faithfulness is difficult.
When to avoid it — and what to weigh
- Simple Semantic Search Suffices — If your use case is single-query vector similarity (e.g., FAQ lookup, basic document search), the overhead of planning, anonymization, and multi-step reasoning adds unnecessary complexity.
- Real-Time Latency-Critical Applications — Multi-step reasoning, summarization, and re-planning introduce non-trivial latency. Not suitable for sub-second response requirements (chatbots, live customer interactions).
- Unstructured Data Without Clear Boundaries — The approach assumes coherent, parseable documents (PDFs with clear chapters, quotes). Streaming data, semi-structured logs, or highly fragmented content may degrade performance.
- Minimal DevOps/Infrastructure Expertise — Requires managing vector stores, LLM API keys, Docker orchestration (optional), Streamlit deployment, and monitoring. Not a plug-and-play SaaS—demands engineering overhead.
License & commercial use
Apache License 2.0 (Apache-2.0). Permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and liability disclaimers.
Apache 2.0 permits commercial use and deployment. However, ensure compliance with dependencies (LangChain, FAISS, etc.) and LLM provider terms (OpenAI API, Groq). No warranty or indemnification provided by the project; suitable for internal R&D or commercial products where you accept dependency and model risks.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | High |
| DEV.co fit | Good |
| Assessment confidence | High |
Requires secure storage of LLM API keys (env variables via .env file). No explicit encryption, access control, or audit logging documented. Vector store and processed documents are unencrypted by default. Suitable for internal/research use; for production with sensitive data, implement encryption at rest, key management, and access controls independently. No vulnerability disclosure or security policy stated.
Alternatives to consider
LangChain RetrievalQA / LangGraph workflows
Both are core dependencies here. RetrievalQA is simpler for basic RAG; LangGraph offers lower-level orchestration but requires more custom code. This repo provides a reference implementation combining both.
Llama-Index (formerly GPT Index)
Higher-level RAG framework with query engines, node post-processors, and evaluation tools built-in. Less transparent control over graph logic; better for rapid prototyping, less suitable for research/understanding agent internals.
Haystack (Deepset)
Production-grade RAG framework with retrieval pipelines, hybrid search, and evaluation utilities. More mature and scalable; higher learning curve; better suited for teams with existing Haystack expertise or needing advanced document processing.
Build on Controllable-RAG-Agent with DEV.co software developers
Explore Controllable-RAG-Agent to prototype advanced retrieval agents. Perfect for teams evaluating agentic RAG architectures or building knowledge-grounded AI systems. Review the code, test with your documents, and extend the design for production use.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
Controllable-RAG-Agent FAQ
Can I use local LLMs instead of OpenAI/Groq?
What document formats are supported?
How does this prevent hallucinations?
Is this suitable for production?
Software development & web development with DEV.co
DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If Controllable-RAG-Agent is part of your rag frameworks roadmap, our team can implement, customize, migrate, and maintain it.
Build Intelligent Document Q&A Systems
Explore Controllable-RAG-Agent to prototype advanced retrieval agents. Perfect for teams evaluating agentic RAG architectures or building knowledge-grounded AI systems. Review the code, test with your documents, and extend the design for production use.