Runs in your browser · no server, no API key

Agentic search
you can feel.

Type a question. This page embeds it with XERJ's actual built-in embedder — the same feature-hashing vectorizer that powers the semantic_text field — then ranks a small corpus by cosine similarity. Everything below runs client-side; the embedder was ported line-for-line from the Rust engine and reproduces its vectors bit-for-bit.

Try:
dims 384 query features 0 embed 0 µs

    Honest by design. XERJ's built-in embedder is a lexical / sub-word vectorizer, not a neural model — it scores on shared words and word-stems, so paraphrases that reuse vocabulary rank high, while pure synonyms with no shared characters do not. That is exactly what ships zero-config with semantic_text. When you configure a neural [embedding] endpoint, XERJ swaps the model in at ingest and query time through the same wire path and the same semantic query shown below — nothing else in your code changes.

    What XERJ just did

    The exact algorithm from xerj-ai/src/local.rs · local_embed(), running in JavaScript:

    1. Tokenize. Lowercase the text and split on every non-alphanumeric character into word tokens.
    2. Hash unigrams. Each whole word is hashed with 64-bit FNV-1a into one of 384 buckets; a high bit of the hash picks the sign, and the bucket gets ±1.0.
    3. Hash sub-word trigrams. Each word is #-padded and its character trigrams are hashed the same way at weight 0.35 — so run, running, and runs share buckets and partially match.
    4. L2-normalize. The 384-dim accumulator is scaled to unit length, so cosine similarity is comparable across texts of any length.
    5. Rank by cosine. The query vector is compared against every document vector; the _score XERJ returns for a cosine field is (1 + cosine) / 2.
    384
    default dimensions — mirrors all-MiniLM-L6-v2 so a neural swap needs no remapping
    0
    external dependencies — deterministic, offline, no API key, identical across restarts
    16
    documents embedded on this page, exactly as XERJ embeds a semantic_text field on ingest

    The same thing, over the wire

    This page is the client-side twin of three ordinary Elasticsearch-wire calls against a running XERJ on :9200. No vector database, no embedding service, no glue.

    # 1 — map one field as semantic_text (auto-embedded on ingest) curl -X PUT localhost:9200/kb -H 'Content-Type: application/json' -d '{ "mappings": { "properties": { "title": { "type": "text" }, "body": { "type": "semantic_text" } } } }'
    # 2 — bulk-ingest documents; XERJ embeds body with the built-in embedder curl -X POST localhost:9200/kb/_bulk -H 'Content-Type: application/x-ndjson' --data-binary ' {"index":{"_id":"1"}} {"title":"Long-term memory for agents","body":"Store durable memories and recall them later by meaning."} '
    # 3 — retrieve by meaning (the query embeds with the same embedder) curl -X POST localhost:9200/kb/_search -H 'Content-Type: application/json' -d '{ "query": { "semantic": { "field": "body", "query": "how can my agent remember past conversations", "k": 5 } } }'

    Reproducibility. The embedder here was ported from engine/crates/xerj-ai/src/local.rs and validated bit-for-bit against the Rust engine: across 9 texts at 64/128/384 dims, all 2,880 / 2,880 f32 vector elements matched (worst ULP difference: 0). The engine's own unit-test property — a paraphrase ranking above unrelated text — reproduces to the bit: sim_relevant = 0.62630904 > sim_unrelated = 0.05279395. All example queries above rank their intended document first.