Beyond Chunk and Pray
Building trustworthy RAG with geometric memory.
Most RAG is "chunk and pray" — split the docs, embed them, retrieve the top-k by similarity, and pray the model grounds its answer instead of hallucinating. This is the open alternative. Retrieval is triple-mediated: questions are answered through a verified knowledge graph with provenance, not by a vector lookup the generator is trusted to use well. The dense index is distrusted — optional, off by default, flagged when used. Every answer is verifiable and cited, numbers are byte-exact, and the system abstains rather than guess when it can't ground a claim.
The baseline runs with no license and no GMS. For production-grade grounding —
geometric retrieval, Exact Numerical Memory, contradiction detection, signed
answers — the optional GMS backend (knowlytix)
snaps in via a lazy seam. Clone it, run the baseline, see exactly where GMS lifts
grounding and recall.
Part of the "Beyond … and Pray" series: governed agents · trustworthy RAG · test & validate · LLMs from scratch
Status: the open
groundloopbaseline (naive chunk→embed→top-k RAG, the deliberate "before") is implemented — numpy-only TF-IDF retrieval + a stuff-and-pray answerer that never abstains. On the Northwind cohort it scores ~20% answer accuracy and 0% abstention: the gap GEODE/GMS closes. Runpython demos/naive_rag.py.
What's inside
- Grounded retrieval — answers mediated through a verified knowledge graph
- Provenance + citations — every claim traces to its source
- Byte-exact numbers — Exact Numerical Memory, not "close enough"
- Abstention — says "I can't ground that" instead of guessing
- Distrusted dense index — optional, flagged when used
- GMS-optional — baseline runs free; geometric guarantees via
knowlytix
Install
pip install groundloop # naive RAG baseline (the "before")
pip install "groundloop[ml]" # + embedders / open-weight models
pip install "groundloop[gms]" # + the licensed GMS backend (knowlytix)
Quickstart
groundloop is the deliberately naive "chunk and pray" baseline — retrieve top-k,
answer, and (tellingly) never abstain. That failure mode is the point:
from groundloop import NaiveRAG
rag = NaiveRAG("Q3 cloud revenue was 120 million dollars. Headcount grew to 340 employees.")
ans = rag.answer("What was Q3 cloud revenue?")
print(f"{ans.decision}: {ans.answer!r}") # answer: '3' <- grabs the wrong span, still "answers"
The baseline confidently returns a wrong span and never says "I don't know" — the
before the book improves on. The grounded, abstaining GMS approach (verified
knowledge graph, provenance, byte-exact numbers) is the Pro tier; see the chapter
notebooks in notebooks/.
The GMS upgrade (open-core)
groundloop runs fully without a license. GEODE-RAG — geometric retrieval, Exact
Numerical Memory, provenance — requires the licensed
knowlytix package, imported lazily:
import groundloop.gms as gms
gms.available() # True if the licensed backend is installed
Many notebooks — the *_project build variants and the DoE/embedding/baseline
appendices — exercise GEODE-RAG and need the backend. It's a one-time setup:
get a free developer license, install
knowlytix, and every GMS notebook runs.
The production-grade, GMS-native edition is the Beyond Chunk and Pray, Pro Edition — see knowlytix.ai.
License
Apache-2.0. © 2026 Knowlytix.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file groundloop-0.1.1.tar.gz.
File metadata
- Download URL: groundloop-0.1.1.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35f057331cbf58372c3f8114d1d6fd546261b57819245d1fe55b3134552ccbc9
|
|
| MD5 |
521e22e32f9b422fca2d12f8b540660a
|
|
| BLAKE2b-256 |
c37eede36f79948a12c2044d139663b7a4cec9451161d806c96dea58d5976eb8
|
Provenance
The following attestation bundles were made for groundloop-0.1.1.tar.gz:
Publisher:
publish.yml on knowlytix/beyond-chunk-and-pray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groundloop-0.1.1.tar.gz -
Subject digest:
35f057331cbf58372c3f8114d1d6fd546261b57819245d1fe55b3134552ccbc9 - Sigstore transparency entry: 2147455620
- Sigstore integration time:
-
Permalink:
knowlytix/beyond-chunk-and-pray@a8cb1c99e5e9e4b50b2ca7550a27b8478df55a63 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/knowlytix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8cb1c99e5e9e4b50b2ca7550a27b8478df55a63 -
Trigger Event:
release
-
Statement type:
File details
Details for the file groundloop-0.1.1-py3-none-any.whl.
File metadata
- Download URL: groundloop-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fff4dfe010cba289ae376346b5ea2ed32ff0e5ac27946b5148575bce6b359a5d
|
|
| MD5 |
f454baddc80b317541a280fd1c0f1c60
|
|
| BLAKE2b-256 |
89e3c57181a45647d2bf1f7b657326cebc86d971d119586c3a1a59fc3320b07d
|
Provenance
The following attestation bundles were made for groundloop-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on knowlytix/beyond-chunk-and-pray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
groundloop-0.1.1-py3-none-any.whl -
Subject digest:
fff4dfe010cba289ae376346b5ea2ed32ff0e5ac27946b5148575bce6b359a5d - Sigstore transparency entry: 2147456161
- Sigstore integration time:
-
Permalink:
knowlytix/beyond-chunk-and-pray@a8cb1c99e5e9e4b50b2ca7550a27b8478df55a63 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/knowlytix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8cb1c99e5e9e4b50b2ca7550a27b8478df55a63 -
Trigger Event:
release
-
Statement type: