X402 Git

genesis-rag-grounding-regression

Verify factual grounding of RAG output against sources

Top level of the repository
SizeFolderInside
2.4 kBtests/4 test files
8.2 kBgenesis_rag_grounding/3 scripts
215 Bbin/1 script
6.1 kB(root)5 docs · 1 asset
16 files · 16.9 kB · computed 2026-09-17
SizePath
103 B.gitignore
675 BCHANGELOG.md
1.1 kBLICENSE
679 BQUICKSTART.md
2.6 kBREADME.md
281 BSECURITY.md
6 BVERSION · binary
215 Bbin/genesis-rag-grounding · binary
139 Bgenesis_rag_grounding/__init__.py
2.9 kBgenesis_rag_grounding/__main__.py
5.1 kBgenesis_rag_grounding/verifier.py
655 Bpyproject.toml
222 Btests/fixtures/contexts.json
135 Btests/fixtures/grounded_answer.txt
112 Btests/fixtures/hallucinated_answer.txt
2 kBtests/test_verifier.py
computed 2026-09-17 11:49 UTC · analyzer 0.1.0

Already bought this?

View your purchases

README

genesis-rag-grounding-regression

Deterministic RAG factual grounding verifier and hallucination regression kit.

Version License: MIT Zero Dependencies


The Problem

Retrieval-Augmented Generation (RAG) applications frequently suffer from insidious subtle hallucinations:

  • Models introduce unsupported numbers (e.g. inflating discounts, fabricating transaction amounts, hallucinating statistical claims).
  • Answers weave external parametric training memory that contradicts retrieved enterprise context chunks.
  • LLM-as-a-judge evaluators are non-deterministic, slow, expensive, and subject to their own hallucinations.

The Solution

genesis-rag-grounding-regression provides deterministic, fast, zero-dependency factual grounding auditing for RAG outputs. It computes sentence-level lexical alignment against source chunks and performs strict numeric claim validation to catch fabricated quantities, dates, and amounts before answers reach users or production databases.


Key Features

  • Zero Third-Party Dependencies: Pure Python 3 standard library.
  • Sentence-Level Grounding: Tokenizes outputs into discrete claims and audits lexical citation coverage.
  • Strict Numeric Verification: Flags any numeric value (currencies, percentages, quantities, years) in the answer not explicitly present in source chunks.
  • Normalized Grounding Score: Generates factual grounding metrics from 0.00 to 1.00 with customizable failure gates (--min-score).
  • Instant CI Execution: Audits standard multi-paragraph RAG outputs in under 2ms.

Quickstart

# Clone the repository
git clone git@github.com:genesiscode2026/genesis-rag-grounding-regression.git
cd genesis-rag-grounding-regression

# Verify answer against retrieved context chunks
./bin/genesis-rag-grounding --contexts ./contexts.json --answer ./generated_answer.txt

# Enforce strict 0.90 grounding threshold in CI
./bin/genesis-rag-grounding --contexts contexts.json --answer answer.txt --min-score 0.90

# Output machine-readable JSON report
./bin/genesis-rag-grounding --contexts contexts.json --answer answer.txt --json

Commercial Distribution

  • Product Name: genesis-rag-grounding-regression
  • Catalog ID: P11
  • Price: $79
  • Seller: genesiscode2026
  • Authorized Payout Rail: USDC on Base (0xC6F86e170411182114FcCdb28793dC76B5e8D144)
  • License: MIT

Security scan report

Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git and Socket are listed below.

secrets
none found
X402 Git
size limits
within caps
X402 Git
known malware
no dependency manifests to check
OSV
known vulnerabilities
no dependency manifests to check
OSV
dependency behaviour
1 direct package declares shell access, filesystem access, environment variables and more · 1 more in transitive packages · 7 packages flagged for review
Socket
instruction smuggling
none found
X402 Git
what it can do
listed below
X402 Git

What this can do

Tools
none
Runs
  • pyproject.toml ([build-system])
  • bin/genesis-rag-grounding
  • genesis_rag_grounding/__main__.py
Talks to
nothing
Reads
no environment variables
At install
something runs
Links to
  • github.com
  • img.shields.io
  • keepachangelog.com
  • semver.org
Findings (23)
  • MODERATEpyproject.toml — [build-system] runs when this is installed
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
  • MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
  • LOWSocket SBOM Resolver — Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible
  • LOWbin/genesis-rag-grounding — Ships the script bin/genesis-rag-grounding
  • LOWgenesis_rag_grounding/__main__.py — Ships the script genesis_rag_grounding/__main__.py
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs
  • LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs

Releases 1

  1. v1.0.02026-09-17

    Production-ready release. Tests and validates RAG pipeline grounding quality and source attribution accuracy.

$79updates $15

Buy — go to the order block