Official website Documentation Python API Release notes Español
Verify source and index consistency in your RAG pipeline.
RAGParity compares authoritative metadata with indexed metadata and validates structured numeric claims. Run it as a command-line tool or a Python library alongside your existing pipeline. The core example needs no model, database, subscription or hosted service.
Beta 0.2.0b1. Python 3.12 or newer. Apache License 2.0. The supported beta scope is the library and CLI. Chat examples remain experimental; independent user acceptance is pending.
| Check | Detects |
|---|---|
| Document consistency | Missing, orphaned, duplicate, stale and deleted indexed records. |
| Fragment consistency | Missing or unexpected chunks, hash mismatches and mixed versions against a source manifest. |
| Completion evidence | Missing, incomplete or inconsistent snapshot declarations and scan counts. |
| Structured numeric claims | Value mismatches against explicit source, metric, unit, period and tolerance contracts. |
Comparisons use supplied metadata and evidence. Matching metadata does not prove that document bodies, embeddings or complete generated answers are correct.
Install the beta from the GitHub source. On macOS or Linux, with Python 3.12+:
git clone --branch main --single-branch https://github.com/lynvera-ai/ragparity.git
cd ragparity
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade 'pip>=26.2,<27'
python -m pip install .
ragparity init
ragparity check --output report.json
ragparity report --input report.json --output report.htmlThe included synthetic metadata agrees, so the first check returns:
PASS: source=1 index=1 comparisons=1
RECORD_SYNCED: 1
Open report.html locally. It contains the audit summary and findings and loads no
external assets. To see a failure, change only the index's source_version to "2"
in ragparity.toml and rerun the check. It reports VERSION_MISMATCH: 1 and exits 1.
The installation guide covers Windows, downloaded wheels,
configuration and troubleshooting. init [PATH] refuses to overwrite existing files.
The distribution is lynvera-ragparity; the import package is lynvera_ragparity.
Choose an installation method, use the diagnostic guide if a step fails, and follow updates and removal when replacing an installation.
| Status | Exit code | Meaning |
|---|---|---|
| PASS | 0 | Supplied evidence agrees under the configured rules. |
| FAIL | 1 | At least one deterministic inconsistency was found. |
| ERROR | 2 | Configuration, adapter, storage or execution prevented completion. |
| INCONCLUSIVE | 3 | Evidence is missing or unverifiable; an empty scan is inconclusive. |
Overall precedence is ERROR, FAIL, INCONCLUSIVE, PASS. Counts include all findings even when detailed output is capped. Numeric matches cannot turn an empty metadata scan into PASS. See the CLI reference and result contracts.
Use the memory readers for small fixtures, the optional PostgreSQL/pgvector readers for metadata tables or views, or implement the documented reader contract for your system. Database URLs come from named environment variables; credentials do not belong in TOML. Use SELECT-only accounts. Built-in index reads do not select embeddings or document bodies.
# Run from the cloned source directory in the same environment.
python -m pip install '.[postgres]'Database integration provides a disposable local fixture. Python integration shows a complete version-mismatch check. Fragment audits describe authoritative manifests and snapshot evidence. Numeric contracts define value, context and provenance checks.
| Example | Purpose | Status |
|---|---|---|
| Basic check | Compare two metadata records without external services. | Deterministic example. |
| Product catalog | Exercise ingestion, fragment and numeric-contract scenarios. | Synthetic demonstration. |
| PostgreSQL/pgvector | Audit database metadata with a SELECT-only role. | Disposable integration fixture. |
| Open WebUI | Exercise local retrieval and document update/recovery flows. | Experimental, platform-specific setup. |
| Haystack | Retrieve from complete public RFCs with multiple fragments. | Experimental; fresh evaluation passed 22/46. |
Local beta preparation passed 303 unit tests with 95.79% core coverage and seven database integration tests. Wheel and source installation were checked in clean macOS ARM64 Python 3.12 environments. Other clean-install platforms and independent acceptance remain pending. Read the validation record for conditions and limits. The Haystack report preserves all 24 failures.
Versions and hashes are compared as exact strings; the core does not recompute document hashes. Fragment checks require an authoritative manifest. Independent database scans do not establish an atomic snapshot across systems. Caller-supplied evidence is checked for consistency, not authenticated. Arbitrary framework schemas are not inferred.
Numeric evidence must be supplied by the caller. There is no free-text fact extraction,
unit/currency conversion or live metric query. Temporary disk use grows with metadata
volume; consult measured resource use before large scans.
Custom readers must raise AdapterError on incomplete scans.
Contributing describes local development. The documentation index links public contracts, architecture and examples. Maintainers can prepare distribution files locally and review compatibility and migration policy. Report writers emit schema 2.0; readers also accept schema 1.0.
No release, tag or package-index upload is performed by the local build script. External beta review remains pending until other people provide actual installation and application results.
Reports may contain sensitive identifiers and evidence. Keep them private or use
--redact before sharing. Read SECURITY.md,
the code of conduct, LICENSE and NOTICE.
Created and maintained by Ph.D. Felipe Castillo Rendón, Lynvera. lynvera.ai [email protected]