Answers you can defend, inside the data boundary.
C2RAG resolves the structural conflict between capable cloud AI and documents that cannot leave the enclave: a federated LLM architecture with local-first inference, dual-tier confidence scoring, virtual-question relevance mathematics, and page-level evidence citations — so every answer arrives with a reliability verdict and one-click links to the source pages that support it.
- Product
- C2RAG (Command & Control Retrieval-Augmented Generation)
- Service line
- AI/ML Engineering
- Period
- 11-month development cycle · August 2025 – July 2026
- Distribution
- Distribution A — Approved for Public Release
C2RAG is a capability demonstration platform. Every metric below is a measured system property or configuration value from the deployed demonstrator — not a customer outcome. Figures requiring an operational pilot to substantiate are identified as such.

An uncited answer cannot enter a decision cycle.
Large language models answer fluently whether or not they are correct. In a decision cycle that feeds legal positions, acquisition strategy, or operational planning, that is disqualifying — and three constraints compound it: sensitive data cannot leave the enclave, answers without provenance cannot survive review, and standard LLM output carries no visible reliability signal.
Each constraint is answered with a specific architectural commitment: local Ollama inference with policy-gated cloud fallback for the data boundary, a five-step step-back reasoning trace for the black box, two independent confidence checks for invisible uncertainty, self-generated virtual questions scored by cosine similarity for answer drift, and integrated PDF.js deep links for provenance.
Every constraint answered with architecture.
Federated LLM architecture
Primary inference runs on local Ollama models (Llama 3.1, Phi-3, Mistral) on ~8 GB commodity hardware. Cloud fallback (Gemini) is a configuration choice, disabled entirely for air-gapped operation. Documents, embeddings, and the vector store never leave local infrastructure.
Structured step-back reasoning
Every query executes a five-step framework: restate the question, identify needed information, evaluate retrieved context, rate confidence, then answer. The full reasoning trace is retained and inspectable — auditable analysis, not oracle output.
Dual-tier confidence scoring
Two independent checks run on every answer: the five-point internal rating from the reasoning framework, and a separate binary yes/no verdict with percentage confidence from a second LLM pass. Disagreement between the tiers is itself a signal.
Virtual-question relevance
The system generates three paraphrased virtual questions from its own answer and computes mean cosine similarity back to the original query embedding — a mathematical check that the answer addresses what was actually asked.
Page-level evidence citations
Each answer carries its retrieved sources with per-document similarity scores and deep links that open the source PDF at the cited location via an integrated PDF.js viewer. The distance from claim to evidence is one click.
What the demonstrator measures.
These are system properties and configuration values, not customer outcomes. Operational metrics require the structured pilot identified below.
Zero data egress in air-gapped configuration; cloud fallback is opt-in policy, not dependency.
Five-point internal rating plus a binary yes/no verdict with percentage, per answer.
Scored by mean cosine similarity against the original query, 0–1 scale to three decimals.
Real-time quality feedback replacing hard-coded pipeline behavior.
Retained and inspectable on every query.
Commodity hardware on Windows, Linux, or macOS — no accelerator dependency.
Llama 3.1, Phi-3, Mistral — provisioned by a single setup script.
Page-level citation on every retrieved source via integrated PDF viewer.
Three queries, three safeguards caught on camera.
Unedited assessments from three consecutive live queries against the CRS directed-energy-weapons report, on local inference with zero cloud involvement. Each run exposed a different safeguard working — including a system willing to say the evidence does not support an answer.
“What are the main types of directed energy weapons discussed in the document?”
The answer fixated on a single program (THOR) instead of the full HEL/HPM program overview the document provides — and the independent judge caught it.

“What challenges does the Department of Defense face in developing and fielding directed energy weapons?”
The answer named four challenge categories — technological maturity, industrial-base stability, funding adequacy, arms-control implications — but the judge demanded they be enumerated in detail, not summarized.

“What does the document say about using directed energy weapons against drones and unmanned aircraft systems?”
With retrieval scores collapsed, the system declined to overclaim: "the available information does not allow for a comprehensive assessment of their current use or planned applications." A system that can say the evidence doesn't support an answer is worth more than one that always answers.

Two separate checks must agree before an answer is trusted — and when they don't, that disagreement is the most valuable signal in the system.
One dark-theme console, everything in view.


From prototype to defense-market demonstrator.
Core pipeline
RAG pipeline on LangChain/LangGraph with resilient ingestion (UnstructuredLoader with pypdf fallback), local embedding, vector retrieval, and the initial confidence-scoring framework.
Federation & hardening
Ollama integration with automated model provisioning, cloud-fallback policy layer, service-health monitoring for the PDF viewer and document servers, and CORS-safe deep-linking infrastructure.
Calibration & configurability
All retrieval hyperparameters externalized as live operator controls, plus real-time retrieval-quality telemetry with per-query similarity distributions and automated tuning recommendations.
Defense-market productization
A complete brand system applied across the console: dark Command Black theme, status instrumentation, evidence-card presentation, accessibility-checked contrast, an automated test suite, and a modular package structure.
- Trust is an architecture, not a disclaimer
Reliability signals had to be first-class pipeline outputs — confidence tiers, relevance mathematics, citations — not a warning label retrofitted onto a fluent-but-opaque model.
- Two cheap checks beat one expensive one
A self-assessment plus an independent second-pass verdict catches failure modes neither catches alone, at the cost of one lightweight extra inference.
- Expose the dials
Externalizing retrieval hyperparameters turned tuning from a code-change cycle into an operator activity; live telemetry turned "the answers seem worse" into a diagnosable condition.
- Presentation is a capability
The defense-market UI overhaul, initially scoped as cosmetic, materially changed how the system was perceived in evaluation. A tool that must be trusted must look like it was built by people who take trust seriously.
- Honest metrics build more credibility
Distinguishing measured system properties from projected operational outcomes — rather than blending them — is itself a differentiator with technically sophisticated defense audiences.
- Structured pilot with baseline measurement: time-to-answer, verification effort, and answer-acceptance rate against the current manual workflow.
- Classification-aware deployment profile with distribution-marking support and enclave-specific configuration baselines to shorten accreditation.
- Corpus scaling validation against document sets in the 10⁴–10⁵ range typical of program-level holdings.
- Confidence-calibration study measuring how often the binary verdict agrees with human expert judgment — the single most persuasive artifact for a skeptical evaluator.
Commanding Intelligence. Ground Truth at Scale.
Live-query assessments captured July 6, 2026 against the Congressional Research Service report on DoD Directed Energy Weapons, on local qwen2.5:3b inference with zero cloud involvement. All figures are measured system properties or configuration values; operational-outcome metrics require a structured pilot and are identified as the next step.
Evaluating generative AI for sensitive document workflows?
If your holdings can't go to the cloud and your answers have to survive review, start with a free consultation. We can scope a data-boundary architecture and a confidence-calibration pilot around your environment.
Book a Free Consultation