xerj-org /xerj

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

★ 19,115⑂ 1,425👁 190⑃ 2,294● 885▤ 731
RustApache-2.0Created 2026-06-30xerj.org
Download: xerj v1.0.0-rc.101v1.0.0-rc.101 ↓1012026-11-05
+45
Daily
19,115
stars
1,425
forks
190
watchers
2,294
prs
885
issues
731
releases

README

XERJ



















![ES-YAML conformance-brightgreen?style=flat-square)](https://xerj.org/benchmarks)








English | 简体中文 | 日本語 | العربية | Español | 한국어 | فارسی




  


The search engine for AI, now with XERJ Query-1: a model that turns your question into a small program over facts you have written.


  XERJ Query-1 ·
  Blog post ·
  Release rc.101 ·
  llms.txt ·
  Docs ·
  Donate




 XERJ Query-1, new in rc.101

Most AI search finds text in milliseconds and then asks a language model to write the answer. The model is what
makes a RAG answer good, and it is also where the seconds and the per-question cost come from.

XERJ Query-1 works the other way. It reads your question and writes a short program (look this up, compare these,
count those), and the engine runs that program over facts you stored. Lookup and comparison steps point at a stored
fact and its quoted span; counts return a program hash, not the records. If the data cannot support an answer you get
UNKNOWN; if two facts disagree you get CONFLICT. It runs on four CPU cores, offline, with no embeddings to build
and no GPU.

| | XERJ Query-1 | the usual way | measured on |
|---|---|---|---|
| Question to answer | 220 ms (p50) | 1.5 to 2.3 s for Opus 5.5 to write a RAG answer (API time per call, our command-line client's start-up not counted), after a search of 0.8 to 106 ms | same 160 questions, rc.101 release, 4 model threads, laptop CPU |
| Wrong answers | 1 of 160 (124 right, 35 declined) | 9 to 15 (RAG with Opus 5.5), 6 (Opus 5.5 reading the whole store), 5 (Opus 5.5 given each question's records) | our 160-question test, drawn from the model's development set; XERJ Query-1 was given each question's records |
| Cost per million questions | $42 of CPU | $13,400 (RAG) to $694,000 (Opus re-reading the whole store per question, uncached) | same test, Opus 5.5 list prices; CPU at AWS c7g list price, 4.1 CPU-s per question on a shared ARM server (0.9 on a laptop) |
| Build a search index of 10 GB of text | 17 min (BM25, measured) | an estimated 62 to 97 hours to embed it with bge-small on CPU | English Wikipedia (wikimedia/wikipedia 20231101.en, first 22 of 41 files, 3,299,578 articles); XERJ Query-1 does not use this index |
| Correct a fact | 2.3 ms (one write; the next answer uses it) | re-embed the changed chunk (about 30 ms with bge-small), and the whole store (19.6 s for our 5,000-record test store) when the embedding model changes | rc.101 release, laptop |

Retrieval quality (R@k, nDCG@k) on BEIR, on SearchTome and on our 160-question test, the latency split and every data
set: benchmarks/query-1-2026-11.

The model is off by default; without the flag there is no /_facts route and the MCP tool list is unchanged. rc.101
upgrades the data directory to format 4 on first write, and rc.100 cannot open it again. What it does not do yet,
measured: sums and totals (a sum question can come back as a member count), and large fact sets (on a 95,000-fact
namespace asks took 0.82 s at 

Top issues

Discussions

Latest release

xerj v1.0.0-rc.101 v1.0.0-rc.101 2026-11-05
[1.0.0-rc.101] - 2026-11-05

rc.101: XERJ-Query — the engine answers facts and counting questions from a
model that runs on CPU, off by default. This release ships XERJ-Query compiled
into the binary and serves it over /_facts on a node started with
--facts-model-dir : write facts to a namespace, ask a natural-language
question, and read a verified answer with its cited evidence and the exact
program that produced it. Counting questions ("how many … over …?") are answered
by an exact executor, served only when two independently-seeded models agree on
the program. The model ships as a separate 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON