Skip to main content

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 groundloop baseline (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. Run python 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.

Metadata

Release files for groundloop 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for groundloop 0.1.1
File Size Uploaded
groundloop-0.1.1.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for groundloop 0.1.1
File Interpreter ABI Platform
groundloop-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / groundloop-0.1.1.tar.gz

Download URL groundloop-0.1.1.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
35f057331cbf58372c3f8114d1d6fd546261b57819245d1fe55b3134552ccbc9
BLAKE2b-256 checksum
How to use checksums
c37eede36f79948a12c2044d139663b7a4cec9451161d806c96dea58d5976eb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release files / groundloop-0.1.1-py3-none-any.whl

Download URL groundloop-0.1.1-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fff4dfe010cba289ae376346b5ea2ed32ff0e5ac27946b5148575bce6b359a5d
BLAKE2b-256 checksum
How to use checksums
89e3c57181a45647d2bf1f7b657326cebc86d971d119586c3a1a59fc3320b07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page