Algebraic Retrieval: 38 Tests Passed, With One Reproduction Limit
We ran the portable Algebraic Retrieval suite and verified its receipt hash. The full 11,429-document Java fixture remains outside this local test.
Algebraic Retrieval proposes a typed language that lets an agent combine vector scores, candidate masks, weights and top-k selection in one inspectable search program. I ran its portable repository suite: 38 tests passed. I also verified the published 11,429-document receipt hash, but I did not rebuild that Java-dependent fixture locally.
Lab result
| Check | Result | Boundary |
|---|---|---|
| Portable repository suite | 38 of 38 tests passed | Executed with Python 3.14.5 and the linked flex source checkout |
| Four-row compiler witness | Passed | Checks masks, signed scores, weights, negative support and deterministic tie order |
| Published receipt integrity | SHA-256 matched 53da6adc...19fffe |
Verifies the checked-in receipt file, not a fresh Vaswani rebuild |
| 11,429-document fixture rebuild | Not run | The documented builder requires Java, which was unavailable in the test environment |
The problem is not “better embeddings”
Most retrieval interfaces expose a query string plus a few filters. The paper asks what happens when an agent needs to express a more specific plan: favor implementation details, suppress marketing language, restrict results to an eligible set, apply per-document preferences and then select the top ten.
Its answer is a scored-relation algebra. A vector matrix E can be scored against a query vector, combined with another score direction, restricted by a mask, multiplied by a weight relation and passed to a selector. The operations are typed so a mask cannot silently behave like a zero weight and a missing operand fails instead of producing a plausible empty result.
top(10, modulate(w, restrict(m, (E @ q1) - 0.5 * (E @ q2))))
The notation is not meant to replace every search engine. It gives an agent an inspectable program surface before the runtime lowers the expression into executable operations.
The four-row witness catches a subtle mask failure
The smallest useful test contains four document vectors, two query directions, a mask admitting three documents and a weight for every identity. The expected top results are a at 0.25 and c at -0.125. The negative result matters.
If an implementation represents excluded documents as zero scores instead of removing them from support, an excluded zero can outrank an eligible negative score. The test therefore checks an actual semantic distinction, not only whether the parser accepts the expression.
The suite also reverses matrix order and changes mask and weight insertion order. The same results must survive, with ties resolved by score descending and identity ascending. That makes the outcome reproducible even when input ordering changes.
What the 38 passing tests cover
- typed mask, weight, score and fusion operators;
- dimension safety for short, exact and long query vectors;
- raw-dot scoring and composed-query magnitude;
- threshold behavior under query collapse;
- single-assignment macros and failure of forward references;
- transport registration and an explicit orientation surface;
- a feedback barrier showing that restriction cannot always move across centroid feedback;
- the four-row contract witness with deterministic cutoff behavior.
My first run produced 36 passing tests and two import errors because the external flex dependency was not on the Python path. After cloning the repository linked by the project and setting that path, the full 38-test suite passed. That setup failure is useful operational evidence: the module is not a standalone Python package in the checked-out state.
What the paper reports on the larger fixture
The paper compares Algebra, SQL with sqlite-vec and PyTerrier on the public 11,429-document Vaswani collection. It uses deterministic 128-dimensional signed-hash vectors, not learned production embeddings. The authors report identical document sets and score differences below 1e-6 across the demonstrated programs.
For the fully composed strategy, all three paths return document 10703 first. The reported maximum differences are about 2.98e-8 for SQL and 1.49e-8 for PyTerrier. One tied pair orders differently because sqlite-vec’s float32 accumulation and rounding split scores that are tied in the Algebra and PyTerrier paths.
This is an execution-parity test. It is not evidence that the results are relevant to users, that an agent writes good programs, that the notation is faster, or that approximate-nearest-neighbor recall is preserved.
Why this matters to search and AI teams
Agentic search systems increasingly hide their intermediate decisions. A typed retrieval program offers a different design: eligibility, suppression, weights and selection remain visible as operations that can be logged and reviewed.
For a publisher-facing audit, that could distinguish four questions that are often collapsed into one:
- Was the page eligible for the candidate pool?
- Which relevance direction scored it?
- Which preference changed its score?
- Which selection rule removed it?
The design is promising precisely because it makes those questions explicit. Production value still depends on the embeddings, corpus, contract, agent policy and runtime. Our four-platform agentic-search study shows why the retrieval program is only one layer in the longer path from a search decision to a supported citation.
Download my reproduction ledger
The ledger records the repository commit, environment, command, result, failure boundary and artifact hash. The example row is marked for removal.
Download the Algebraic Retrieval reproduction ledger
Verdict
The repository provides unusually concrete semantics for a new retrieval proposal. Its portable tests are small, readable and pass in an independent checkout once the documented flex dependency is supplied. The next meaningful evaluation is not another syntax demo. It is a task-level study that asks whether agents compose correct programs and whether the resulting retrieval improves real answers.
Primary sources
- Algebraic Retrieval: Composable Search for Agents, arXiv preprint, September 16, 2026.
- Algebraic Retrieval repository, cloned and tested September 20, 2026.
- flex source dependency, cloned for the portable test run.
Keep learning
Continue this topic
Next in this topic
Same AI Question, Different Language: A 67,200-Response Audit
Earlier in this topic
ChatGPT, Claude, Grok and DeepSeek Search the Web Differently
Research
Ask a question or join the discussion