Local-first evidence retrieval and substantiation review for environmental marketing claims.
Qiro RAG owns Step 3 in the Qiro workflow:
Step 1 extract environmental claim signals
Step 1.5 group/protect claims
Step 2 assess potential regulatory issues
Step 3 check company evidence for support, limits, contradictions, and gaps
Step 4 produce a human-review report
It is not generic document chat and it is not a legal verdict engine. It turns a Step 2 issue into evidence questions, retrieves relevant company evidence, verifies source quotes, and emits a structured Step 3 review artifact.
Qiro RAG is a risk-review aid. It does not provide legal advice, determine illegality, guarantee compliance, or replace qualified counsel/compliance review.
- Local-first RAG architecture with no cloud calls by default.
- Evidence-pack ingestion for
md,txt,pdf,docx,xlsx,csv, plus optional local OCR. - SQLite-backed chunks, tables, metadata, hashes, and persisted embeddings.
- Keyword, semantic, and hybrid retrieval modes.
- Quote-backed citation verification to reduce hallucinated support.
- Heuristic offline judging plus opt-in Ollama/OpenAI-compatible LLM judges.
- Optional LangGraph workflow with typed nodes and local trace output.
- Human-review memory through
review_decisions.csvand proposed playbook patches.
Install uv and run from the repository root:
git clone https://github.com/PPDEGRET/qiro-rag.git
cd qiro-rag
uv sync --devRun the synthetic evidence-pack demo:
uv run qiro-rag ingest examples/synthetic_eval/docs --pack ./.tmp/qiro-synth-pack --reset
uv run qiro-rag assess examples/synthetic_eval/findings/recyclable.json \
--pack ./.tmp/qiro-synth-pack \
--out ./.tmp/recyclable-step3.jsonExpected status:
{
"claimId": "C-RECYCLABLE",
"status": "partially_supported",
"humanReviewRecommended": true
}The full output includes verified source quotes and missing-evidence prompts for human review.
The default pipeline is direct typed Python. If you want node-level workflow tracing, install the optional workflow extra:
uv run --extra workflow qiro-rag assess examples/synthetic_eval/findings/recyclable.json \
--pack ./.tmp/qiro-synth-pack \
--out ./.tmp/recyclable-step3.json \
--workflow langgraph \
--trace-out ./.tmp/langgraph-trace.jsonThe LangGraph path emits the same public Step 3 JSON schema as the direct path. Framework objects stay out of output artifacts.
uv run qiro-rag init-pack ./evidence-pack
uv run qiro-rag pull ./company-docs --target ./staged-docs
uv run qiro-rag ingest ./staged-docs --pack ./evidence-pack --reset
uv run qiro-rag embed --pack ./evidence-pack
uv run qiro-rag retrieve "carbon neutral delivery offset basis" --pack ./evidence-pack
uv run qiro-rag assess examples/step2/finding.json --pack ./evidence-pack --out step3_evidence.json
uv run qiro-rag models
uv run qiro-rag onboard
uv run qiro-rag learn --pack ./evidence-pack --propose playbook.patch.yamlDefault behavior is local:
- no cloud model calls;
- no cloud embeddings;
- no telemetry;
- no raw document upload.
Opt-in judge profiles are available for local Ollama or OpenAI-compatible gateways:
uv run qiro-rag assess examples/step2/finding.json \
--pack ./evidence-pack \
--out step3_evidence.json \
--profile ollama-private-smallOnly retrieved candidate passages are sent to an opt-in LLM judge, and returned citations still pass local quote verification.
src/qiro_rag/ Python package and CLI
src/qiro_rag/workflows/ Optional LangGraph workflow
docs/ Architecture, schemas, privacy, roadmap
examples/synthetic_eval/ Fictional regression evidence pack
tests/ Unit and pipeline tests
uv run ruff format --check .
uv run ruff check .
uv run pytest
uv run --extra workflow pytest
uv build- Qiro Analyzer — Steps 1, 1.5 and 2: claim extraction, grouping and risk review
https://github.com/PPDEGRET/EMPCOAnalyzer - Qiro RAG — Step 3: evidence retrieval and quote-backed substantiation review
https://github.com/PPDEGRET/qiro-rag - Qiro Launch Gate — Step 4: reviewer memo, checklist and visual artifacts
https://github.com/PPDEGRET/qiro-launch-gate-demo
Apache-2.0. See LICENSE.