USE CASES·ENTERPRISE

XERJ USE CASES,
MEASURED.

These pages show where XERJ is used, each with measured results and limits. Start with on-prem RAG with Cohere, a WordPress security audit, a self-audit of the XERJ engine, log analytics, or an Elasticsearch replacement. Audit queries belong on the AI security review use case and the two case studies below. This page is the index. Capability charts against Elasticsearch 8.13 are reproducible from demo/playbooks/SCORECARD.md.

Try it: 4 questions

Find your XERJ workflow

1. What is the job?
2. What data?
3. Where should it run?
4. Who asks the questions?

Pick an answer above.

On-prem AI with Cohere

Regulations, manuals and a live 200,000-row Postgres table on one CPU server, with citations.

Read the use case

Zero-token AI search

Point XERJ at a folder of code, PDFs or Markdown and get the exact files back.

Read the use case

AI search and retrieval

BM25 and exact vector kNN in one query tree for RAG.

Read the use case

Second brain

xerj brain turns a folder of notes into an evidence-carrying knowledge graph.

Read the use case

Semantic analytics

Retrieval and aggregation in one POST /_search.

Read the use case

AI security review

Index a codebase as security facts, then read only the violators.

Read the use case

Security analytics

SOC filters, term lookups and aggregations on a single XERJ node.

Read the use case

Operational intelligence

One ingest endpoint, one storage engine and one retention number for logs.

Read the use case

Unified observability

Logs, metrics and traces in one engine with one query language.

Read the use case

Elasticsearch replacement

Same :9200 API, query DSL and client libraries on one binary.

Read the use case
Runs in your browser and sends nothing. Each answer adds a point to the use cases it matches. Every summary is the one on that use case page.
GROUP·CYBERSECURITY

AUDIT REAL CODE. FIND REAL BUGS.

Two reproducible whitebox security audits with XERJ as the agent's retrieval substrate, one on a large third-party codebase, one on XERJ's own engine. Both real, both measured, each its own full case study.

NEW
ON-PREM
ENTERPRISE AI
WITH COHERE.

Regulations, claims manuals and a live 200,000-row Postgres claims table on one CPU server. Documents searchable in 7.9 s, database changes searchable in about 20 ms, plain-language questions answered with evidence, Cohere Rerank and Command on top with citations back to file and page. A worked example on public data; the Cohere calls ran against a mock until a key is available.

19.7 MS COMMIT → SEARCHABLE · 0 WRONG ANSWERS
ON-PREM AI TEAMS · INSURERS · BANKS · PUBLIC SECTOR
FULL USE CASE →
01
WORDPRESS
SECURITY
AUDIT.

An AI agent security-audited real WordPress core, 1,492 PHP files, ~619k lines, using XERJ as its retrieval substrate: index once as security facts (11,990 functions, 1,343 hooks), query the bug shape, read only the survivors. It swept 226 handlers for missing-capability IDOR (0 found, core is hardened) and surfaced the real wp_http_validate_url SSRF gap (169.254 cloud-metadata) reachable unauthenticated. The point is the method and its economics: the whole audit cost ~26K tokens against ~5.2M just to load the tree.

~26K-TOKEN AUDIT vs ~5.2M TO LOAD · 199× FEWER
CISO · APPSEC ENGINEER · SECURITY RESEARCHER
FULL CASE STUDY →
MEASURED · WORDPRESS CORE · 1,492 FILES / ~619K LINES
XERJ-ASSISTED READ EVERY FILE
Tokens, entire audit ~26,000 ~5,200,000 199×
SQLi triage: must read after 4 functions 51 whole files

TOKEN COST TO THE ANSWER · NOT LATENCY · CORE IS HARDENED. 0 IDOR ACROSS 226 HANDLERS; THE ONE REAL WEAKNESS (SSRF) IS STATED PLAINLY · SOURCES IN docs/case-studies/wordpress-security-audit →

02
XERJ AUDITS
ITS OWN
RUST.

The stronger proof: XERJ turned the method on its own Rust engine (197 files) and found and fixed real vulnerabilities. A call-graph query grep cannot express surfaced an unauthenticated /_sql stack-overflow that aborts the process; a five-stage instruction/data pass added a search-template injection that leaks private documents and a snapshot path-traversal. The three application-layer highs are fixed on the branch, each proven by crashing, then not-crashing, a live server. Against six known-fixed bugs the substrate recalled 6/6 where grep managed 4/6, at 171× fewer tokens.

4 REAL HIGHS · 3 FIXED · 6/6 RECALL vs grep 4/6 · 171× FEWER TOKENS
APPSEC ENGINEER · SECURITY RESEARCHER · AI-AGENT BUILDER · RUST TEAM
FULL CASE STUDY →
MEASURED · tiktoken cl100k_base · TOKENS TO REACH THE /_sql FINDING
XERJ-ASSISTED READ EVERY FILE
Tokens to the finding 10,533 1,805,277 171×
Detection vs grep (known bugs) 6 / 6 4 / 6

TOKEN COST TO THE ANSWER · NOT LATENCY · RECALL MEASURED AGAINST 6 KNOWN-FIXED BUGS (grep CAN'T FIND MISSING CODE); 6/6 IS IN-SAMPLE. SEE THE CAVEAT · METHODOLOGY + ALL 8 FINDINGS IN docs/case-studies/xerj-self-audit →

GROUP·PERFORMANCE & SCALE

MEASURED vs ELASTICSEARCH 8.13.

Reproducible capability benchmarks from demo/playbooks/SCORECARD.md: measured numbers on a real query matrix, not user stories.

03
SECURITY
ANALYTICS
AT SCALE.

Your SOC team spends more time waiting for dashboards than investigating threats. The battery on the right is the reproducible XERJ-vs-Elasticsearch query matrix, bool filters, range scans, term lookups and aggregations, measured on a 1M-doc corpus. XERJ is the yellow bar; Elasticsearch 8.13 is the gray one.

11.5× FASTER BOOL QUERIES
CISO · SOC ANALYST · SECOPS
FULL USE CASE →
REPRODUCIBLE · ES 8.13 · demo/playbooks/SCORECARD.md
XERJ ES 8.13
Bool query 1.38 ms 15.90 ms 11.5×
Range filter 1.34 ms 4.66 ms 3.5×
Match query 0.57 ms 1.45 ms 2.5×
Terms + avg sub-agg 0.38 ms 1.16 ms 3.1×
Date-histogram agg 0.37 ms 0.88 ms 2.4×
Cardinality agg 1.15 ms 1.92 ms 1.7×
Term query 1.36 ms 2.15 ms 1.6×
Terms aggregation 1.34 ms 1.54 ms 1.15×

P50 · 1M-DOC LLM-TELEMETRY CORPUS · FULL 91-CELL MATRIX AT xerj.org/benchmarks →

04
OPERATIONAL
INTELLIGENCE.

Ship logs at line rate. Query hot data in milliseconds. No ILM policy puzzles, no shard tuning, no Logstash pipeline. The chart shows a 24-hour diurnal ingest pattern. XERJ sustains it with zero write-stalls, and ingests 1.5-1.7× faster than Elasticsearch in the reproducible benchmark.

1.7× FASTER INGEST
SRE · DEVOPS · PLATFORM ENGINEERING
FULL USE CASE →
INGEST THROUGHPUT · 24H · SINGLE CLIENT
00:00 · 20K docs/s min 20K docs/s · peak 82.51K docs/s 20K docs/s · 24:00
05
AI-NATIVE
SEARCH &
RETRIEVAL.

Hybrid semantic + keyword search in one query. The cluster plot shows 830K real queries grouped into six intent clusters. RAG retrieval dominates. Every cluster is one index query away, not a separate Pinecone call. The benchmark below is the reproducible XERJ-vs-Elasticsearch latency for kNN and text retrieval.

3.4× FASTER kNN · 100% RECALL
ML ENGINEER · DATA SCIENTIST · AI PLATFORM
FULL USE CASE →
REPRODUCIBLE · ES 8.13 · demo/playbooks/SCORECARD.md
XERJ ES 8.13
Query-string query 1.35 ms 9.35 ms 6.9×
Multi-match query 1.44 ms 5.89 ms 4.1×
kNN · k=10 · 100% recall 0.78 ms 2.64 ms 3.4×
Match query 0.57 ms 1.45 ms 2.5×

P50 · 1M-DOC LLM-TELEMETRY CORPUS · FULL 91-CELL MATRIX AT xerj.org/benchmarks →

06
ELASTICSEARCH
REPLACEMENT.

Same API on port 9200. Same query DSL. Same client libraries. The comparison on the right is the reproducible query-latency head-to-head. Yellow is XERJ; gray is Elasticsearch 8.13 on the identical workload.

1.20× SMALLER ON DISK
VP ENGINEERING · CTO · PLATFORM TEAM
FULL USE CASE →
REPRODUCIBLE · ES 8.13 · demo/playbooks/SCORECARD.md
XERJ ES 8.13
Bool query 1.38 ms 15.90 ms 11.5×
Query-string query 1.35 ms 9.35 ms 6.9×
Wildcard query 1.35 ms 9.10 ms 6.8×
Range filter 1.34 ms 4.66 ms 3.5×
Match query 0.57 ms 1.45 ms 2.5×
Term query 1.36 ms 2.15 ms 1.6×

P50 · 1M-DOC LLM-TELEMETRY CORPUS · FULL 91-CELL MATRIX AT xerj.org/benchmarks →

07
UNIFIED
OBSERVABILITY.

Logs, traces, and metrics in one store, one binary instead of a Grafana-Loki-Tempo-Mimir stack to babysit. OTLP in, Prometheus out. The chart on the right is the reproducible query-latency head-to-head vs Elasticsearch 8.13 on log-shaped data.

6 SYSTEMS → 1 BINARY
OBSERVABILITY LEAD · SRE · INFRA
FULL USE CASE →
REPRODUCIBLE · ES 8.13 · demo/playbooks/SCORECARD.md
XERJ ES 8.13
Range filter 1.34 ms 4.66 ms 3.5×
Terms + avg sub-agg 0.38 ms 1.16 ms 3.1×
Date-histogram agg 0.37 ms 0.88 ms 2.4×
Cardinality agg 1.15 ms 1.92 ms 1.7×
Avg aggregation 1.16 ms 2.23 ms 1.9×
Terms aggregation 1.34 ms 1.54 ms 1.15×

P50 · 1M-DOC LLM-TELEMETRY CORPUS · FULL 91-CELL MATRIX AT xerj.org/benchmarks →

READY?·REQUEST ACCESS

RUN IT ON
YOUR DATA.

Leave a work email and we'll reply within one business day with a private binary, the reproduction scripts, and a 45-minute walkthrough.

We keep your email to follow up about XERJ, nothing else. No spam, no reselling.
TRY IT

Give your agent a starting point

COPY THE PROMPT Install XERJ (docs: https://xerj.org/llms.txt) and pick a use case from https://xerj.org/use-cases that matches my project. Then follow that page's measured setup.
FAQ

Questions about these use cases

What use cases does this page cover?

This index collects published XERJ use cases: on-prem RAG with Cohere, source-code audits, log analytics, observability, AI search, and Elasticsearch replacement. Each card links to a page with measured results and limits.

Where should I read about an AI code security audit?

The AI security review use case is at /use-cases/code-security-audit. The WordPress audit and the XERJ self-audit are case studies linked from this page.

What did the WordPress audit measure?

An agent audited WordPress core (1,492 PHP files) with XERJ as retrieval. Token cost to the answer is on that case study, including a 199 times comparison against reading the tree.

What did the self-audit measure?

XERJ indexed its own Rust engine and found real issues. Against six known-fixed bugs, recall was 6/6, against 4/6 for grep, with 171 times fewer tokens. Three application-layer highs were fixed on the branch.