Skip to content

armgit / xerj

Public Imported from GitHub
0

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.

benchmarks/map-gate: measure the xerj_map unknown-field-400 gate (#1055) — 20/30 -> 0/30, PASS

xerj-orgca5cdc0e8bf0
diff --git a/benchmarks/map-gate/README.md b/benchmarks/map-gate/README.md
new file mode 100644
index 000000000..29d0ffbc9
--- /dev/null
+++ b/benchmarks/map-gate/README.md
@@ -0,0 +1,149 @@
+# The `xerj_map` gate — unknown-field 400s from MCP-issued DSL (#1055, rc.79)
+
+**Gate line, verbatim from the issue:** *"unknown-field 400s from MCP-issued DSL
+down >=80% on the reference-coding harness."*
+
+| gate | threshold | status | measured | results |
+|---|---|---|---|---|
+| `xerj_map` #1055 (rc.79) | unknown-field 400s from MCP-issued DSL down ≥ 80 %, no-map arm vs with-map arm, same corpus + query set | **MEASURED — PASS** | **20/30 → 0/30 unknown-field 400s = 100 % reduction** (threshold ≥ 80 %) | [`results/2026-09-30-rc78gates/`](./results/2026-09-30-rc78gates/) |
+
+Run 2026-09-30 against the release binary `xerj v1.0.0-rc.78`
+(main @ `a179e1ef3`, cited from the binary's own `--version` and the MCP
+server's `serverInfo`), one local node `--insecure --embed-mode lexical
+--port 9660`, throwaway data dir. Counts, not timings — no wall-clock or CPU
+number matters here; the run is deterministic (same corpus state, same query
+set, same code path) and a re-run reproduces the counts exactly.
+
+## What the engine actually does with a wrong field (discovery first)
+
+Before designing the arms, every wrong-field query form was probed against the
+live node (`results/…/armA/*.json` holds the per-form evidence). Two very
+different failures hide behind "unknown field":
+
+- **HTTP 400, error naming the field** — the gate's subject. Exactly three
+ MCP-reachable forms produce it: `sort` on a field with no mapping and no
+ `unmapped_type` ("No mapping found for [x] in order to sort on"), `knn`
+ naming a non-vector field ("[knn] query field [x] is not a vector field"),
+ and `semantic` naming a non-`semantic_text` field ("semantic query on field
+ [x]: it is not a `semantic_text` field"). In a `hybrid` request one bad leg
+ fails the whole request.
+- **HTTP 200, zero hits, no error** — `term` / `match` / `range` / `exists`
+ on a wrong field silently return 0 hits (`match` additionally returns a
+ `hints[]` block with code `unknown_field` suggesting the real text fields;
+ `term` does not). This is the *other* thing `xerj_map` fixes — arguably the
+ bigger usability win — but it is **not** a 400 and is counted separately
+ below, not inside the gate number.
+
+## Method
+
+**Corpus (the reference-coding harness's own shape).** The three small
+Apache-2.0 repos of the pinned hub corpus `xerj-vector`
+(`tools/xerj-code/hub/xerj-vector.json`) at their pinned commits — usearch
+`cc23bbaf21ef`, instant-distance `13ea89ac1ca0`, hnswlib `d9b3608c83d8` —
+cloned, pinned and indexed with the in-binary reference-coding flow
+(`xerj corpus add --from` + `xerj corpus index`, manifest saved verbatim as
+[`results/…/corpus.json`](./results/2026-09-30-rc78gates/corpus.json)).
+9 datasets, 3472 records, 10.1 s wall. The nine indexes deliberately span
+three shapes: prose/code docs indexes (semantic `body`/`text`, keyword/long
+columns), PascalCase config indexes (a `Version`/`Include`/`Platform`
+case-correction trap), and tiny structured datasets (a `json` index whose only
+date field is `cloned_at`; a `sqlite-binary-vectors` index where the field
+*named* `vector` is a `keyword`).
+
+**Query set.** 30 intents (`queries.json`) written as an MCP agent's tasks —
+sort, semantic, vector, hybrid and filter requests phrased the way the four
+search tools take them. Each intent names its target dataset, its concept
+("most recently changed files first", "by package version"), and one
+**guessed** field name.
+
+**Arm A — no-map baseline.** The guessed field, issued verbatim in the wire
+shape the MCP tool proxies. Guesses were written down **before** any was
+checked against the live mapping, as the single most plausible name an
+ES-fluent agent writes first (plain snake_case English + the dominant
+cross-engine convention; `lang` vs `language`, `license` vs `licence`,
+`line_number` vs `line` are real convention splits, not strawmen). Five
+guesses coincided with real fields (intents marked `control` in
+`queries.json`) and were kept — so the baseline also shows what guessing gets
+*right*.
+
+**Arm B — with `xerj_map`.** The harness calls the **real MCP tool** over
+stdio (`xerj mcp --url …` → `tools/call xerj_map {}`, raw response saved as
+[`results/…/xerj-map-response.txt`](./results/2026-09-30-rc78gates/xerj-map-response.txt),
+16,828 bytes for 9 indexes, no entry trimmed) and derives every field choice
+mechanically from it, never from `_mapping`: first candidate present in the
+entry with a compatible `es_type` (matched case-insensitively, used in the
+map's exact spelling — that is the agent reading `Version` and writing
+`Version`); highest-coverage `semantic_text` field for semantic-shaped needs;
+any `dense_vector` field for knn — the map lists none here, so the
+map-informed agent rewrites instead of guessing. Where the map shows the
+concept does not exist, the agent **drops the clause** rather than invent a
+name (2 dropped sorts, 1 dropped filter — each recorded as `map_action` in the
+raw output). That rewrite-to-valid-DSL behavior is the tool's value and is
+part of what is measured, stated plainly.
+
+Both arms issue the identical 30 intents as HTTP against the same node and
+corpus state; every request and response is in
+`results/…/armA/` and `results/…/armB/`, one JSON per intent per arm.
+
+## Result
+
+| arm | issued | unknown-field 400s | other 400s | silent 0-hit (wrong field) | ok, hits |
+|---|---:|---:|---:|---:|---:|
+| **A — no map** (guessed names) | 30 | **20** | 0 | 5 | 5 |
+| **B — with `xerj_map`** | 30 | **0** | 0 | 1 | 29 |
+
+**Reduction: 20 → 0 = 100 % ≥ 80 % → PASS.** Arm A's 20 break down as
+9 sort-unknown-field, 5 semantic-non-semantic-field, 6 knn-non-vector-field
+(4 knn intents + 2 hybrid requests killed by their vector leg); every one of
+the 20 error bodies names the guessed field (`error_names_used_field` in the
+raw records — no 400 was counted on any other ground). Arm B's 5 controls
+confirm the arms differ only in field knowledge: on intents where the guess
+was already right (`language`, `title`, `word`, `text`, exists-`title`) both
+arms return 200 with hits.
+
+The non-gate column, for honesty: arm A also silently 0-hit on 5 filter
+intents (`lang`, `repo`, `line_number`, lowercase `include`, American
+`license` vs the corpus's `licence`) where arm B returned 174, 3 (after a
+documented drop), 325, 0, 3 hits. Arm B's single 0-hit is
+`filter-include`: the map correctly case-corrected to `Include`, but no
+document carries the value `PACKAGE` — a correct query for an absent value,
+not a field error.
+
+## What is measured and what is designed
+
+- **Measured (deterministic):** given the same corpus and the same 30 query
+ intents, first-issue MCP-shaped DSL built from guessed field names fails
+ with unknown-field 400s on 20/30; the same intents built from `xerj_map`'s
+ actual response fail on 0/30.
+- **Designed, not run (BLOCKED — live-agent loop):** whether a live
+ model-driven agent *chooses* to call `xerj_map` before writing DSL, and how
+ many 400s its real tool-call stream shows across a session including
+ retries. That needs live model runs, which are not approved for this wave.
+ Design: the same 30 intents handed to an MCP-connected agent twice — tools
+ with `xerj_map` available vs withheld — counting 400s in the actual
+ `tools/call` stream (the `AGENT_FTX_HARNESS`-style loop); estimated cost at
+ the per-trial figures of `demo/playbooks/REFCODING_BENCHMARK_3MODEL_2026-08-18.md`
+ (~$2/trial, 60 trials) ≈ **$120**, plus harness wiring. The deterministic
+ arms above bound what that loop can add: the map eliminates the failure
+ class *whenever consulted*; the live run would measure consultation rate,
+ which is a property of the agent, not of the tool.
+
+## Reproduce
+
+```sh
+# node (private port, throwaway dir)
+xerj --insecure --embed-mode lexical --port 9660 -d "$(mktemp -d /tmp/mapgate-data-XXXX)" &
+
+# corpus: pin the three small xerj-vector repos (manifest in the results dir)
+xerj corpus add --from <this dir>/results/2026-09-30-rc78gates/corpus.json
+XERJ_URL=http://127.0.0.1:9660 xerj corpus index map-gate-v # exit 3 = junk files, normal
+
+# both arms, 60 requests, raw per-intent output under results/<label>/
+python3 benchmarks/map-gate/run.py --node http://127.0.0.1:9660 \
+ --xerj-bin "$(command -v xerj)" --prefix xc-map-gate-v --label <date>-<label>
+```
+
+Files: [`queries.json`](./queries.json) (the 30 intents, guess rule, map
+policy), [`run.py`](./run.py) (harness: MCP call, both arms, classifier),
+`results/<label>/{run-header,summary,results.tsv,xerj-map-response,corpus.json}`
++ `arm{A,B}/<intent>.json`.
diff --git a/benchmarks/map-gate/queries.json b/benchmarks/map-gate/queries.json
new file mode 100644
index 000000000..3fffca58e
--- /dev/null
+++ b/benchmarks/map-gate/queries.json
@@ -0,0 +1,290 @@
+{
+ "gate": "unknown-field 400s from MCP-issued DSL down >=80% on the reference-coding harness (#1055, rc.79)",
+ "corpus": "map-gate-v — the three small Apache-2.0 repos of the pinned hub corpus xerj-vector (usearch cc23bbaf21ef, instant-distance 13ea89ac1ca0, hnswlib d9b3608c83d8), indexed with `xerj corpus index` at build stamp b1790790750; 9 datasets, 3472 records",
+ "guess_rule": "Arm A (no-map) field names were written down per intent BEFORE any was checked against the live mapping, as the single most plausible name an ES-fluent agent writes first for the concept with no catalog access: plain snake_case English and the dominant convention across Elasticsearch, GitHub code search and Quickwit (lang vs language, license vs licence, line_number vs line are all real convention splits). Five guesses turned out to coincide with real fields (intents marked control) and were kept — the baseline is not a strawman that misses everything.",
+ "map_policy": "Arm B (with-map) never reads _mapping and never sees this file's targets; it derives every field choice mechanically from the live `xerj_map` MCP tool response: (a) sort/filter intents — the first candidate name that appears in the entry's fields with a compatible es_type (keyword|long|date for sort; any for filter), matched case-insensitively and then used in the map's exact spelling (the agent reads `Version`, writes `Version`); (b) semantic intents — the highest-coverage es_type=semantic_text field; if the entry has none, the tool-use degrades to xerj_search match on the highest-coverage text field, or match_all if the index has no text field either; (c) knn intents — any es_type=dense_vector field; xerj_map lists none in this corpus, so the map-informed agent rewrites to the semantic policy instead of guessing a vector field. Every rewrite is recorded in the per-run raw output as map_action.",
+ "intents": [
+ {
+ "id": "sort-lastmod",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "hnswlib-docs",
+ "intent": "most recently changed files first",
+ "guess_field": "last_modified",
+ "map_candidates": ["last_modified", "updated_at", "modified", "timestamp", "time"]
+ },
+ {
+ "id": "sort-filepath",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-docs",
+ "intent": "results ordered by file path",
+ "guess_field": "file_path",
+ "map_candidates": ["file_path", "path", "file"]
+ },
+ {
+ "id": "sort-linenumber",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "hnswlib-docs",
+ "intent": "by line number",
+ "guess_field": "line_number",
+ "map_candidates": ["line_number", "line", "lineno"]
+ },
+ {
+ "id": "sort-language",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-docs",
+ "intent": "by language",
+ "guess_field": "language",
+ "map_candidates": ["language", "lang"],
+ "control": "guess coincides with the real field"
+ },
+ {
+ "id": "sort-symbolname",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "hnswlib-docs",
+ "intent": "by symbol name",
+ "guess_field": "symbol_name",
+ "map_candidates": ["symbol_name", "symbol", "name"]
+ },
+ {
+ "id": "sort-repository",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-docs",
+ "intent": "by repository",
+ "guess_field": "repository",
+ "map_candidates": ["repository", "repo"]
+ },
+ {
+ "id": "sort-created",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "json",
+ "intent": "newest corpus clone first",
+ "guess_field": "created_at",
+ "map_candidates": ["created_at", "cloned_at", "timestamp", "time"]
+ },
+ {
+ "id": "sort-title",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-docs",
+ "intent": "by document title",
+ "guess_field": "title",
+ "map_candidates": ["title", "heading"],
+ "control": "guess coincides with the real field"
+ },
+ {
+ "id": "sort-version",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-csharp-cloud-unum-usearch-tests",
+ "intent": "by package version",
+ "guess_field": "version",
+ "map_candidates": ["version"]
+ },
+ {
+ "id": "sort-platform",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-csharp-directory-build",
+ "intent": "by target platform",
+ "guess_field": "platform",
+ "map_candidates": ["platform"]
+ },
+ {
+ "id": "sort-word",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "usearch-sqlite-strings-table",
+ "intent": "words alphabetically",
+ "guess_field": "word",
+ "map_candidates": ["word", "term"],
+ "control": "guess coincides with the real field"
+ },
+ {
+ "id": "sort-kind",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target": "instant-distance-docs",
+ "intent": "by symbol kind",
+ "guess_field": "type",
+ "map_candidates": ["type", "kind", "symbol_kind"]
+ },
+ {
+ "id": "sem-content",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "hnswlib-docs",
+ "intent": "approximate nearest neighbor graph construction",
+ "query_text": "approximate nearest neighbor graph construction",
+ "guess_field": "content"
+ },
+ {
+ "id": "sem-embedding",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "usearch-docs",
+ "intent": "index serialization format",
+ "query_text": "how the index is serialized to disk",
+ "guess_field": "embedding"
+ },
+ {
+ "id": "sem-text",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "instant-distance-docs",
+ "intent": "distance metric implementation",
+ "query_text": "distance metric implementation between embeddings",
+ "guess_field": "text",
+ "control": "guess coincides with a real semantic_text field"
+ },
+ {
+ "id": "sem-body-absent",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "usearch-csharp-nuget-package",
+ "intent": "what the package build includes",
+ "query_text": "what the package build includes",
+ "guess_field": "body"
+ },
+ {
+ "id": "sem-vector-kw",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "usearch-sqlite-binary-vectors",
+ "intent": "vectors close to this one",
+ "query_text": "binary vector close to this one",
+ "guess_field": "vector"
+ },
+ {
+ "id": "sem-description",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target": "json",
+ "intent": "which repos the corpus holds",
+ "query_text": "which repositories are indexed in this corpus",
+ "guess_field": "description"
+ },
+ {
+ "id": "knn-embedding",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target": "usearch-docs",
+ "intent": "code similar to this snippet",
+ "query_text": "code similar to this snippet",
+ "guess_field": "embedding"
+ },
+ {
+ "id": "knn-embedding-vector",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target": "hnswlib-docs",
+ "intent": "neighbors of this passage",
+ "query_text": "neighbors of this passage",
+ "guess_field": "embedding_vector"
+ },
+ {
+ "id": "knn-vector",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target": "usearch-sqlite-binary-vectors",
+ "intent": "nearest binary vectors",
+ "query_text": "nearest binary vectors",
+ "guess_field": "vector"
+ },
+ {
+ "id": "knn-code-embedding",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target": "instant-distance-docs",
+ "intent": "implementations similar to this one",
+ "query_text": "implementations similar to this one",
+ "guess_field": "code_embedding"
+ },
+ {
+ "id": "hyb-knn-leg",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target": "usearch-docs",
+ "intent": "lexical + vector fusion for HNSW construction",
+ "lexical_text": "hnsw construction layer",
+ "vector_leg_guess_field": "embedding",
+ "vector_text": "graph construction for approximate search"
+ },
+ {
+ "id": "hyb-sem-leg",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target": "hnswlib-docs",
+ "intent": "lexical + semantic fusion for brute-force baselines",
+ "lexical_text": "brute force baseline",
+ "vector_leg_guess_field": "content",
+ "vector_text": "brute force search baseline comparison"
+ },
+ {
+ "id": "filter-lang",
+ "tool": "xerj_search",
+ "form": "term",
+ "target": "usearch-docs",
+ "intent": "only Rust files",
+ "value": "rust",
+ "guess_field": "lang",
+ "map_candidates": ["lang", "language"]
+ },
+ {
+ "id": "filter-repo",
+ "tool": "xerj_search",
+ "form": "term",
+ "target": "hnswlib-docs",
+ "intent": "only the hnswlib repository",
+ "value": "hnswlib",
+ "guess_field": "repo",
+ "map_candidates": ["repo", "repository"]
+ },
+ {
+ "id": "filter-lines",
+ "tool": "xerj_search",
+ "form": "range",
+ "target": "usearch-docs",
+ "intent": "definitions between lines 100 and 200",
+ "range": {"gte": 100, "lte": 200},
+ "guess_field": "line_number",
+ "map_candidates": ["line_number", "line"]
+ },
+ {
+ "id": "filter-include",
+ "tool": "xerj_search",
+ "form": "term",
+ "target": "usearch-csharp-cloud-unum-usearch-tests",
+ "intent": "package includes",
+ "value": "PACKAGE",
+ "guess_field": "include",
+ "map_candidates": ["include"]
+ },
+ {
+ "id": "filter-title-exists",
+ "tool": "xerj_search",
+ "form": "exists",
+ "target": "usearch-docs",
+ "intent": "documents that have a title",
+ "guess_field": "title",
+ "map_candidates": ["title", "heading"],
+ "control": "guess coincides with the real field"
+ },
+ {
+ "id": "filter-licence",
+ "tool": "xerj_search",
+ "form": "term",
+ "target": "json",
+ "intent": "Apache-licensed repos only",
+ "value": "Apache-2.0",
+ "guess_field": "license",
+ "map_candidates": ["license", "licence"]
+ }
+ ]
+}
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-include.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-include.json
new file mode 100644
index 000000000..1a7330cfc
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-include.json
@@ -0,0 +1,37 @@
+{
+ "intent": "filter-include",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "intent_text": "package includes",
+ "guess_field": "include",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "include": "PACKAGE"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "include"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "Include",
+ "Version",
+ "IncludeAssets",
+ "PrivateAssets"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lang.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lang.json
new file mode 100644
index 000000000..ae918bad1
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lang.json
@@ -0,0 +1,47 @@
+{
+ "intent": "filter-lang",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "only Rust files",
+ "guess_field": "lang",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "lang": "rust"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "lang"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-licence.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-licence.json
new file mode 100644
index 000000000..8533183b5
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-licence.json
@@ -0,0 +1,41 @@
+{
+ "intent": "filter-licence",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "Apache-licensed repos only",
+ "guess_field": "license",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "license": "Apache-2.0"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "license"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lines.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lines.json
new file mode 100644
index 000000000..b5edd50d8
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-lines.json
@@ -0,0 +1,50 @@
+{
+ "intent": "filter-lines",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "range",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "definitions between lines 100 and 200",
+ "guess_field": "line_number",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "range": {
+ "line_number": {
+ "gte": 100,
+ "lte": 200
+ }
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "line_number"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-repo.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-repo.json
new file mode 100644
index 000000000..5f3a48eb9
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-repo.json
@@ -0,0 +1,47 @@
+{
+ "intent": "filter-repo",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "only the hnswlib repository",
+ "guess_field": "repo",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "repo": "hnswlib"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "repo"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-title-exists.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-title-exists.json
new file mode 100644
index 000000000..f3b8214b5
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/filter-title-exists.json
@@ -0,0 +1,47 @@
+{
+ "intent": "filter-title-exists",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "exists",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "documents that have a title",
+ "guess_field": "title",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "exists": {
+ "field": "title"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "title"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2789,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-knn-leg.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-knn-leg.json
new file mode 100644
index 000000000..ebf5860eb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-knn-leg.json
@@ -0,0 +1,75 @@
+{
+ "intent": "hyb-knn-leg",
+ "arm": "A",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "lexical + vector fusion for HNSW construction",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "hybrid": {
+ "queries": [
+ {
+ "query": {
+ "match": {
+ "content": "hnsw construction layer"
+ }
+ }
+ },
+ {
+ "query": {
+ "knn": {
+ "field": "embedding",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ }
+ }
+ ],
+ "fusion": "rrf"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "content",
+ "embedding"
+ ],
+ "error_reason": "[knn] query field [embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search.",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-sem-leg.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-sem-leg.json
new file mode 100644
index 000000000..2bdfd3cdf
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/hyb-sem-leg.json
@@ -0,0 +1,75 @@
+{
+ "intent": "hyb-sem-leg",
+ "arm": "A",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "lexical + semantic fusion for brute-force baselines",
+ "guess_field": "content",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "hybrid": {
+ "queries": [
+ {
+ "query": {
+ "match": {
+ "content": "brute force baseline"
+ }
+ }
+ },
+ {
+ "query": {
+ "knn": {
+ "field": "content",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ }
+ }
+ ],
+ "fusion": "rrf"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "content",
+ "content"
+ ],
+ "error_reason": "[knn] query field [content] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [content] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search.",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-code-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-code-embedding.json
new file mode 100644
index 000000000..688a40a29
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-code-embedding.json
@@ -0,0 +1,55 @@
+{
+ "intent": "knn-code-embedding",
+ "arm": "A",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "implementations similar to this one",
+ "guess_field": "code_embedding",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "knn": {
+ "field": "code_embedding",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ },
+ "http_status": 400,
+ "fields_used": [
+ "code_embedding"
+ ],
+ "error_reason": "[knn] query field [code_embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [code_embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding-vector.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding-vector.json
new file mode 100644
index 000000000..d712ef052
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding-vector.json
@@ -0,0 +1,55 @@
+{
+ "intent": "knn-embedding-vector",
+ "arm": "A",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "neighbors of this passage",
+ "guess_field": "embedding_vector",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "knn": {
+ "field": "embedding_vector",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ },
+ "http_status": 400,
+ "fields_used": [
+ "embedding_vector"
+ ],
+ "error_reason": "[knn] query field [embedding_vector] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [embedding_vector] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector se",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding.json
new file mode 100644
index 000000000..81f93eca9
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-embedding.json
@@ -0,0 +1,55 @@
+{
+ "intent": "knn-embedding",
+ "arm": "A",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "code similar to this snippet",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "knn": {
+ "field": "embedding",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ },
+ "http_status": 400,
+ "fields_used": [
+ "embedding"
+ ],
+ "error_reason": "[knn] query field [embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [embedding] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search.",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-vector.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-vector.json
new file mode 100644
index 000000000..24ce43468
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/knn-vector.json
@@ -0,0 +1,43 @@
+{
+ "intent": "knn-vector",
+ "arm": "A",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors",
+ "intent_text": "nearest binary vectors",
+ "guess_field": "vector",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "knn": {
+ "field": "vector",
+ "query_vector": [
+ 0.1,
+ -0.2,
+ 0.3,
+ -0.4,
+ 0.5,
+ -0.6,
+ 0.7,
+ -0.8
+ ],
+ "k": 3
+ }
+ },
+ "http_status": 400,
+ "fields_used": [
+ "vector"
+ ],
+ "error_reason": "[knn] query field [vector] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search. | [knn] query field [vector] is not a vector field: it is absent from the mapping and carries no indexed vector data. Map it as [dense_vector] (or [semantic_text]) before running vector search.",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "knn-non-vector-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "id",
+ "vector"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-body-absent.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-body-absent.json
new file mode 100644
index 000000000..4fe83142e
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-body-absent.json
@@ -0,0 +1,37 @@
+{
+ "intent": "sem-body-absent",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-nuget-package",
+ "intent_text": "what the package build includes",
+ "guess_field": "body",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "what the package build includes"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "semantic query on field [body]: it is not a `semantic_text` field, so there is no comparable stored vector to match. A `semantic` query requires either a `semantic_text` field (auto-embedded with the built-in lexical embedder) or an active embedding backend (`embedding.mode = \"neural\"`; `\"proxy\"` with `embedding.default_endpoint` set to an OpenAI-compatible endpoint; or `\"onnx-experimental\"` in an",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "semantic-non-semantic-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "Include",
+ "Pack",
+ "PackagePath"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-content.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-content.json
new file mode 100644
index 000000000..50489dd8c
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-content.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-content",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "approximate nearest neighbor graph construction",
+ "guess_field": "content",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "content",
+ "query": "approximate nearest neighbor graph construction"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "content"
+ ],
+ "error_reason": "semantic query on field [content]: it is not a `semantic_text` field, so there is no comparable stored vector to match. A `semantic` query requires either a `semantic_text` field (auto-embedded with the built-in lexical embedder) or an active embedding backend (`embedding.mode = \"neural\"`; `\"proxy\"` with `embedding.default_endpoint` set to an OpenAI-compatible endpoint; or `\"onnx-experimental\"` in",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "semantic-non-semantic-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-description.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-description.json
new file mode 100644
index 000000000..f4dc206dc
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-description.json
@@ -0,0 +1,42 @@
+{
+ "intent": "sem-description",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "which repos the corpus holds",
+ "guess_field": "description",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "description",
+ "query": "which repositories are indexed in this corpus"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "description"
+ ],
+ "error_reason": "semantic query on field [description]: it is not a `semantic_text` field, so there is no comparable stored vector to match. A `semantic` query requires either a `semantic_text` field (auto-embedded with the built-in lexical embedder) or an active embedding backend (`embedding.mode = \"neural\"`; `\"proxy\"` with `embedding.default_endpoint` set to an OpenAI-compatible endpoint; or `\"onnx-experimental\"",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "semantic-non-semantic-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-embedding.json
new file mode 100644
index 000000000..dc734349d
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-embedding.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-embedding",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "index serialization format",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "embedding",
+ "query": "how the index is serialized to disk"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "embedding"
+ ],
+ "error_reason": "semantic query on field [embedding]: it is not a `semantic_text` field, so there is no comparable stored vector to match. A `semantic` query requires either a `semantic_text` field (auto-embedded with the built-in lexical embedder) or an active embedding backend (`embedding.mode = \"neural\"`; `\"proxy\"` with `embedding.default_endpoint` set to an OpenAI-compatible endpoint; or `\"onnx-experimental\"` ",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "semantic-non-semantic-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-text.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-text.json
new file mode 100644
index 000000000..14d6603fb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-text.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-text",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "distance metric implementation",
+ "guess_field": "text",
+ "control": "guess coincides with a real semantic_text field",
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "text",
+ "query": "distance metric implementation between embeddings"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "text"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 5,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-vector-kw.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-vector-kw.json
new file mode 100644
index 000000000..9a36024f9
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sem-vector-kw.json
@@ -0,0 +1,36 @@
+{
+ "intent": "sem-vector-kw",
+ "arm": "A",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors",
+ "intent_text": "vectors close to this one",
+ "guess_field": "vector",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "vector",
+ "query": "binary vector close to this one"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "vector"
+ ],
+ "error_reason": "semantic query on field [vector]: it is not a `semantic_text` field, so there is no comparable stored vector to match. A `semantic` query requires either a `semantic_text` field (auto-embedded with the built-in lexical embedder) or an active embedding backend (`embedding.mode = \"neural\"`; `\"proxy\"` with `embedding.default_endpoint` set to an OpenAI-compatible endpoint; or `\"onnx-experimental\"` in ",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "semantic-non-semantic-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "id",
+ "vector"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-created.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-created.json
new file mode 100644
index 000000000..c2709274d
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-created.json
@@ -0,0 +1,44 @@
+{
+ "intent": "sort-created",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "newest corpus clone first",
+ "guess_field": "created_at",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "created_at": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "created_at"
+ ],
+ "error_reason": "No mapping found for [created_at] in order to sort on | No mapping found for [created_at] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-filepath.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-filepath.json
new file mode 100644
index 000000000..de4dc9506
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-filepath.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-filepath",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "results ordered by file path",
+ "guess_field": "file_path",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "file_path": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "file_path"
+ ],
+ "error_reason": "No mapping found for [file_path] in order to sort on | No mapping found for [file_path] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-kind.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-kind.json
new file mode 100644
index 000000000..b1ed7dbbd
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-kind.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-kind",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "by symbol kind",
+ "guess_field": "type",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "type": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "type"
+ ],
+ "error_reason": "No mapping found for [type] in order to sort on | No mapping found for [type] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-language.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-language.json
new file mode 100644
index 000000000..69c1fae8b
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-language.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-language",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by language",
+ "guess_field": "language",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "language": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "language"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-lastmod.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-lastmod.json
new file mode 100644
index 000000000..b563504d7
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-lastmod.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-lastmod",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "most recently changed files first",
+ "guess_field": "last_modified",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "last_modified": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "last_modified"
+ ],
+ "error_reason": "No mapping found for [last_modified] in order to sort on | No mapping found for [last_modified] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-linenumber.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-linenumber.json
new file mode 100644
index 000000000..17cf504c6
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-linenumber.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-linenumber",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "by line number",
+ "guess_field": "line_number",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "line_number": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "line_number"
+ ],
+ "error_reason": "No mapping found for [line_number] in order to sort on | No mapping found for [line_number] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-platform.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-platform.json
new file mode 100644
index 000000000..b1bda0d29
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-platform.json
@@ -0,0 +1,51 @@
+{
+ "intent": "sort-platform",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-directory-build",
+ "intent_text": "by target platform",
+ "guess_field": "platform",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "platform": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "platform"
+ ],
+ "error_reason": "No mapping found for [platform] in order to sort on | No mapping found for [platform] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "TargetOS",
+ "TargetOS_Condition",
+ "TargetArchitecture",
+ "CSharpDir",
+ "Configuration",
+ "Configuration_Condition",
+ "LangVersion",
+ "NativeLibBuildScriptsDir",
+ "NativeLibDir",
+ "PackageOutputPath",
+ "Platform",
+ "Platform_Condition",
+ "RepoRoot",
+ "RepoRoot_Condition",
+ "TargetArchitecture_Condition"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-repository.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-repository.json
new file mode 100644
index 000000000..b81d9bceb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-repository.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-repository",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by repository",
+ "guess_field": "repository",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "repository": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "repository"
+ ],
+ "error_reason": "No mapping found for [repository] in order to sort on | No mapping found for [repository] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-symbolname.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-symbolname.json
new file mode 100644
index 000000000..2c935e9be
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-symbolname.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-symbolname",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "by symbol name",
+ "guess_field": "symbol_name",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "symbol_name": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "symbol_name"
+ ],
+ "error_reason": "No mapping found for [symbol_name] in order to sort on | No mapping found for [symbol_name] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-title.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-title.json
new file mode 100644
index 000000000..980a27e17
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-title.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-title",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by document title",
+ "guess_field": "title",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "title": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "title"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-version.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-version.json
new file mode 100644
index 000000000..d6622960f
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-version.json
@@ -0,0 +1,40 @@
+{
+ "intent": "sort-version",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "intent_text": "by package version",
+ "guess_field": "version",
+ "control": null,
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "version": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 400,
+ "fields_used": [
+ "version"
+ ],
+ "error_reason": "No mapping found for [version] in order to sort on | No mapping found for [version] in order to sort on",
+ "unknown_field_400": true,
+ "failure_kind": [
+ "sort-unknown-field"
+ ],
+ "error_names_used_field": true,
+ "map_shows": [
+ "Include",
+ "Version",
+ "IncludeAssets",
+ "PrivateAssets"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-word.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-word.json
new file mode 100644
index 000000000..3a2bd2e38
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armA/sort-word.json
@@ -0,0 +1,38 @@
+{
+ "intent": "sort-word",
+ "arm": "A",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-strings-table",
+ "intent_text": "words alphabetically",
+ "guess_field": "word",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "guess"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "word": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "word"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "id",
+ "word"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-include.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-include.json
new file mode 100644
index 000000000..7bcd21482
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-include.json
@@ -0,0 +1,37 @@
+{
+ "intent": "filter-include",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "intent_text": "package includes",
+ "guess_field": "include",
+ "control": null,
+ "actions": [
+ "map-case-corrected"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "Include": "PACKAGE"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "Include"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 0,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "Include",
+ "Version",
+ "IncludeAssets",
+ "PrivateAssets"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lang.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lang.json
new file mode 100644
index 000000000..2776f76e0
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lang.json
@@ -0,0 +1,47 @@
+{
+ "intent": "filter-lang",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "only Rust files",
+ "guess_field": "lang",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "language": "rust"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "language"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 174,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-licence.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-licence.json
new file mode 100644
index 000000000..3379558e3
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-licence.json
@@ -0,0 +1,41 @@
+{
+ "intent": "filter-licence",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "Apache-licensed repos only",
+ "guess_field": "license",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "term": {
+ "licence": "Apache-2.0"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "licence"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 3,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lines.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lines.json
new file mode 100644
index 000000000..18bc86943
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-lines.json
@@ -0,0 +1,50 @@
+{
+ "intent": "filter-lines",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "range",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "definitions between lines 100 and 200",
+ "guess_field": "line_number",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "range": {
+ "line": {
+ "gte": 100,
+ "lte": 200
+ }
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "line"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 325,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-repo.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-repo.json
new file mode 100644
index 000000000..c5307bfaa
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-repo.json
@@ -0,0 +1,43 @@
+{
+ "intent": "filter-repo",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "term",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "only the hnswlib repository",
+ "guess_field": "repo",
+ "control": null,
+ "actions": [
+ "dropped-filter:no-candidate-in-map"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 423,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-title-exists.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-title-exists.json
new file mode 100644
index 000000000..082aed7eb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/filter-title-exists.json
@@ -0,0 +1,47 @@
+{
+ "intent": "filter-title-exists",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "exists",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "documents that have a title",
+ "guess_field": "title",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "exists": {
+ "field": "title"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "title"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2789,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-knn-leg.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-knn-leg.json
new file mode 100644
index 000000000..a56f4d205
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-knn-leg.json
@@ -0,0 +1,65 @@
+{
+ "intent": "hyb-knn-leg",
+ "arm": "B",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "lexical + vector fusion for HNSW construction",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "hybrid-legs:map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "hybrid": {
+ "queries": [
+ {
+ "query": {
+ "match": {
+ "code": "hnsw construction layer"
+ }
+ }
+ },
+ {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "graph construction for approximate search"
+ }
+ }
+ }
+ ],
+ "fusion": "rrf"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "code",
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 11,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-sem-leg.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-sem-leg.json
new file mode 100644
index 000000000..8171a4a25
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/hyb-sem-leg.json
@@ -0,0 +1,65 @@
+{
+ "intent": "hyb-sem-leg",
+ "arm": "B",
+ "tool": "xerj_hybrid_search",
+ "form": "hybrid",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "lexical + semantic fusion for brute-force baselines",
+ "guess_field": "content",
+ "control": null,
+ "actions": [
+ "hybrid-legs:map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "hybrid": {
+ "queries": [
+ {
+ "query": {
+ "match": {
+ "code": "brute force baseline"
+ }
+ }
+ },
+ {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "brute force search baseline comparison"
+ }
+ }
+ }
+ ],
+ "fusion": "rrf"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "code",
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-code-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-code-embedding.json
new file mode 100644
index 000000000..396fc3677
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-code-embedding.json
@@ -0,0 +1,48 @@
+{
+ "intent": "knn-code-embedding",
+ "arm": "B",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "implementations similar to this one",
+ "guess_field": "code_embedding",
+ "control": null,
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "implementations similar to this one"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding-vector.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding-vector.json
new file mode 100644
index 000000000..a85377472
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding-vector.json
@@ -0,0 +1,48 @@
+{
+ "intent": "knn-embedding-vector",
+ "arm": "B",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "neighbors of this passage",
+ "guess_field": "embedding_vector",
+ "control": null,
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "neighbors of this passage"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding.json
new file mode 100644
index 000000000..fda840ca4
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-embedding.json
@@ -0,0 +1,48 @@
+{
+ "intent": "knn-embedding",
+ "arm": "B",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "code similar to this snippet",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "code similar to this snippet"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-vector.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-vector.json
new file mode 100644
index 000000000..287d2d8fb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/knn-vector.json
@@ -0,0 +1,31 @@
+{
+ "intent": "knn-vector",
+ "arm": "B",
+ "tool": "xerj_vector_search",
+ "form": "knn",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors",
+ "intent_text": "nearest binary vectors",
+ "guess_field": "vector",
+ "control": null,
+ "actions": [
+ "map-no-semantic-no-text-fell-back-to-match_all"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "id",
+ "vector"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-body-absent.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-body-absent.json
new file mode 100644
index 000000000..c09d73680
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-body-absent.json
@@ -0,0 +1,32 @@
+{
+ "intent": "sem-body-absent",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-nuget-package",
+ "intent_text": "what the package build includes",
+ "guess_field": "body",
+ "control": null,
+ "actions": [
+ "map-no-semantic-no-text-fell-back-to-match_all"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 4,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "Include",
+ "Pack",
+ "PackagePath"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-content.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-content.json
new file mode 100644
index 000000000..f0db21d2a
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-content.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-content",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "approximate nearest neighbor graph construction",
+ "guess_field": "content",
+ "control": null,
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "approximate nearest neighbor graph construction"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-description.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-description.json
new file mode 100644
index 000000000..705c15dfd
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-description.json
@@ -0,0 +1,37 @@
+{
+ "intent": "sem-description",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "which repos the corpus holds",
+ "guess_field": "description",
+ "control": null,
+ "actions": [
+ "map-no-semantic-no-text-fell-back-to-match_all"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 3,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-embedding.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-embedding.json
new file mode 100644
index 000000000..86b7230bc
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-embedding.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-embedding",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "index serialization format",
+ "guess_field": "embedding",
+ "control": null,
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "how the index is serialized to disk"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-text.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-text.json
new file mode 100644
index 000000000..680011ba6
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-text.json
@@ -0,0 +1,48 @@
+{
+ "intent": "sem-text",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "distance metric implementation",
+ "guess_field": "text",
+ "control": "guess coincides with a real semantic_text field",
+ "actions": [
+ "map-semantic-field"
+ ],
+ "request": {
+ "query": {
+ "semantic": {
+ "field": "body",
+ "query": "distance metric implementation between embeddings"
+ }
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "body"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 10,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-vector-kw.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-vector-kw.json
new file mode 100644
index 000000000..6f7b7a998
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sem-vector-kw.json
@@ -0,0 +1,31 @@
+{
+ "intent": "sem-vector-kw",
+ "arm": "B",
+ "tool": "xerj_semantic_search",
+ "form": "semantic",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors",
+ "intent_text": "vectors close to this one",
+ "guess_field": "vector",
+ "control": null,
+ "actions": [
+ "map-no-semantic-no-text-fell-back-to-match_all"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "id",
+ "vector"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-created.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-created.json
new file mode 100644
index 000000000..fb6a063dd
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-created.json
@@ -0,0 +1,44 @@
+{
+ "intent": "sort-created",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-json",
+ "intent_text": "newest corpus clone first",
+ "guess_field": "created_at",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "cloned_at": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "cloned_at"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 3,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "bytes",
+ "cloned_at",
+ "corpus",
+ "files",
+ "licence",
+ "repo",
+ "sha",
+ "url"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-filepath.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-filepath.json
new file mode 100644
index 000000000..fc5a4b796
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-filepath.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-filepath",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "results ordered by file path",
+ "guess_field": "file_path",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "path": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "path"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-kind.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-kind.json
new file mode 100644
index 000000000..8db49f168
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-kind.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-kind",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "intent_text": "by symbol kind",
+ "guess_field": "type",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "kind": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "kind"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 179,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-language.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-language.json
new file mode 100644
index 000000000..d3d9e8352
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-language.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-language",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by language",
+ "guess_field": "language",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "language": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "language"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-lastmod.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-lastmod.json
new file mode 100644
index 000000000..a38c4603c
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-lastmod.json
@@ -0,0 +1,43 @@
+{
+ "intent": "sort-lastmod",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "most recently changed files first",
+ "guess_field": "last_modified",
+ "control": null,
+ "actions": [
+ "dropped-sort:no-candidate-in-map"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 423,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-linenumber.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-linenumber.json
new file mode 100644
index 000000000..85022ca98
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-linenumber.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-linenumber",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "by line number",
+ "guess_field": "line_number",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "line": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "line"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 423,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-platform.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-platform.json
new file mode 100644
index 000000000..cc0604b99
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-platform.json
@@ -0,0 +1,51 @@
+{
+ "intent": "sort-platform",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-directory-build",
+ "intent_text": "by target platform",
+ "guess_field": "platform",
+ "control": null,
+ "actions": [
+ "map-case-corrected"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "Platform": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "Platform"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 3,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "TargetOS",
+ "TargetOS_Condition",
+ "TargetArchitecture",
+ "CSharpDir",
+ "Configuration",
+ "Configuration_Condition",
+ "LangVersion",
+ "NativeLibBuildScriptsDir",
+ "NativeLibDir",
+ "PackageOutputPath",
+ "Platform",
+ "Platform_Condition",
+ "RepoRoot",
+ "RepoRoot_Condition",
+ "TargetArchitecture_Condition"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-repository.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-repository.json
new file mode 100644
index 000000000..d68fd34dd
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-repository.json
@@ -0,0 +1,43 @@
+{
+ "intent": "sort-repository",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by repository",
+ "guess_field": "repository",
+ "control": null,
+ "actions": [
+ "dropped-sort:no-candidate-in-map"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-symbolname.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-symbolname.json
new file mode 100644
index 000000000..eb431ae73
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-symbolname.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-symbolname",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "intent_text": "by symbol name",
+ "guess_field": "symbol_name",
+ "control": null,
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "name": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "name"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 423,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "defs",
+ "symbol_count",
+ "section",
+ "end_line",
+ "start_line",
+ "text"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-title.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-title.json
new file mode 100644
index 000000000..5ff8288fb
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-title.json
@@ -0,0 +1,50 @@
+{
+ "intent": "sort-title",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "intent_text": "by document title",
+ "guess_field": "title",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "title": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "title"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2852,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "title",
+ "language",
+ "code",
+ "kind",
+ "line",
+ "name",
+ "path",
+ "body",
+ "section",
+ "end_line",
+ "start_line",
+ "text",
+ "defs",
+ "symbol_count"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-version.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-version.json
new file mode 100644
index 000000000..acd16dc10
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-version.json
@@ -0,0 +1,40 @@
+{
+ "intent": "sort-version",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "intent_text": "by package version",
+ "guess_field": "version",
+ "control": null,
+ "actions": [
+ "map-case-corrected"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "Version": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "Version"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 4,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "Include",
+ "Version",
+ "IncludeAssets",
+ "PrivateAssets"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-word.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-word.json
new file mode 100644
index 000000000..a6e7b14d8
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/armB/sort-word.json
@@ -0,0 +1,38 @@
+{
+ "intent": "sort-word",
+ "arm": "B",
+ "tool": "xerj_search",
+ "form": "sort",
+ "target_index": "xc-map-gate-v-b1790790750-usearch-sqlite-strings-table",
+ "intent_text": "words alphabetically",
+ "guess_field": "word",
+ "control": "guess coincides with the real field",
+ "actions": [
+ "map-exact-name"
+ ],
+ "request": {
+ "query": {
+ "match_all": {}
+ },
+ "sort": [
+ {
+ "word": "asc"
+ }
+ ],
+ "size": 5
+ },
+ "http_status": 200,
+ "fields_used": [
+ "word"
+ ],
+ "error_reason": "",
+ "unknown_field_400": false,
+ "failure_kind": [],
+ "hits": 2,
+ "zero_hit_unknown_field_hint": false,
+ "hint_reason": "",
+ "map_shows": [
+ "id",
+ "word"
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/corpus.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/corpus.json
new file mode 100644
index 000000000..009f46700
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/corpus.json
@@ -0,0 +1,5 @@
+{"corpus":"map-gate-v","cloned_at":"2026-09-30T17:52:28Z","repos":[
+ {"repo":"usearch","url":"https://github.com/unum-cloud/usearch","licence":"Apache-2.0","sha":"cc23bbaf21ef52313c5a495adbc40cbd733cdcfb","files":175,"bytes":2146512},
+ {"repo":"instant-distance","url":"https://github.com/instant-labs/instant-distance","licence":"Apache-2.0","sha":"13ea89ac1ca038d19fbbe3c095c1aeddf713f859","files":27,"bytes":204055},
+ {"repo":"hnswlib","url":"https://github.com/nmslib/hnswlib","licence":"Apache-2.0","sha":"d9b3608c83d83b46c96e25088cb1d729b29dcfe9","files":65,"bytes":344905}
+]}
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/results.tsv b/benchmarks/map-gate/results/2026-09-30-rc78gates/results.tsv
new file mode 100644
index 000000000..9c93f80ee
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/results.tsv
@@ -0,0 +1,61 @@
+arm intent form status unknown_field_400 hits actions guess
+A sort-lastmod sort 400 True guess last_modified
+B sort-lastmod sort 200 False 423 dropped-sort:no-candidate-in-map last_modified
+A sort-filepath sort 400 True guess file_path
+B sort-filepath sort 200 False 2852 map-exact-name file_path
+A sort-linenumber sort 400 True guess line_number
+B sort-linenumber sort 200 False 423 map-exact-name line_number
+A sort-language sort 200 False 2852 guess language
+B sort-language sort 200 False 2852 map-exact-name language
+A sort-symbolname sort 400 True guess symbol_name
+B sort-symbolname sort 200 False 423 map-exact-name symbol_name
+A sort-repository sort 400 True guess repository
+B sort-repository sort 200 False 2852 dropped-sort:no-candidate-in-map repository
+A sort-created sort 400 True guess created_at
+B sort-created sort 200 False 3 map-exact-name created_at
+A sort-title sort 200 False 2852 guess title
+B sort-title sort 200 False 2852 map-exact-name title
+A sort-version sort 400 True guess version
+B sort-version sort 200 False 4 map-case-corrected version
+A sort-platform sort 400 True guess platform
+B sort-platform sort 200 False 3 map-case-corrected platform
+A sort-word sort 200 False 2 guess word
+B sort-word sort 200 False 2 map-exact-name word
+A sort-kind sort 400 True guess type
+B sort-kind sort 200 False 179 map-exact-name type
+A sem-content semantic 400 True guess content
+B sem-content semantic 200 False 10 map-semantic-field content
+A sem-embedding semantic 400 True guess embedding
+B sem-embedding semantic 200 False 10 map-semantic-field embedding
+A sem-text semantic 200 False 5 guess text
+B sem-text semantic 200 False 10 map-semantic-field text
+A sem-body-absent semantic 400 True guess body
+B sem-body-absent semantic 200 False 4 map-no-semantic-no-text-fell-back-to-match_all body
+A sem-vector-kw semantic 400 True guess vector
+B sem-vector-kw semantic 200 False 2 map-no-semantic-no-text-fell-back-to-match_all vector
+A sem-description semantic 400 True guess description
+B sem-description semantic 200 False 3 map-no-semantic-no-text-fell-back-to-match_all description
+A knn-embedding knn 400 True guess embedding
+B knn-embedding knn 200 False 10 map-semantic-field embedding
+A knn-embedding-vector knn 400 True guess embedding_vector
+B knn-embedding-vector knn 200 False 10 map-semantic-field embedding_vector
+A knn-vector knn 400 True guess vector
+B knn-vector knn 200 False 2 map-no-semantic-no-text-fell-back-to-match_all vector
+A knn-code-embedding knn 400 True guess code_embedding
+B knn-code-embedding knn 200 False 10 map-semantic-field code_embedding
+A hyb-knn-leg hybrid 400 True guess embedding
+B hyb-knn-leg hybrid 200 False 11 hybrid-legs:map-semantic-field embedding
+A hyb-sem-leg hybrid 400 True guess content
+B hyb-sem-leg hybrid 200 False 10 hybrid-legs:map-semantic-field content
+A filter-lang term 200 False 0 guess lang
+B filter-lang term 200 False 174 map-exact-name lang
+A filter-repo term 200 False 0 guess repo
+B filter-repo term 200 False 423 dropped-filter:no-candidate-in-map repo
+A filter-lines range 200 False 0 guess line_number
+B filter-lines range 200 False 325 map-exact-name line_number
+A filter-include term 200 False 0 guess include
+B filter-include term 200 False 0 map-case-corrected include
+A filter-title-exists exists 200 False 2789 guess title
+B filter-title-exists exists 200 False 2789 map-exact-name title
+A filter-licence term 200 False 0 guess license
+B filter-licence term 200 False 3 map-exact-name license
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/run-header.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/run-header.json
new file mode 100644
index 000000000..860f194f5
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/run-header.json
@@ -0,0 +1,26 @@
+{
+ "gate": "unknown-field 400s from MCP-issued DSL down >=80% on the reference-coding harness (#1055, rc.79)",
+ "harness_git": "e26880844313257efe2dd286bfadd44002fef1f2",
+ "binary": "xerj v1.0.0-rc.78",
+ "mcp_server": {
+ "name": "xerj-mcp",
+ "version": "1.0.0-rc.78"
+ },
+ "node": "http://127.0.0.1:9660",
+ "node_es_version": "8.13.0",
+ "corpus_prefix": "xc-map-gate-v",
+ "indexes": {
+ "hnswlib-docs": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "usearch-docs": "xc-map-gate-v-b1790790750-usearch-docs",
+ "json": "xc-map-gate-v-b1790790750-json",
+ "usearch-csharp-cloud-unum-usearch-tests": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "usearch-csharp-directory-build": "xc-map-gate-v-b1790790750-usearch-csharp-directory-build",
+ "usearch-sqlite-strings-table": "xc-map-gate-v-b1790790750-usearch-sqlite-strings-table",
+ "instant-distance-docs": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "usearch-csharp-nuget-package": "xc-map-gate-v-b1790790750-usearch-csharp-nuget-package",
+ "usearch-sqlite-binary-vectors": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors"
+ },
+ "map_matched": 9,
+ "map_bytes": 16828,
+ "intents": 30
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/summary.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/summary.json
new file mode 100644
index 000000000..7e62568f2
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/summary.json
@@ -0,0 +1,23 @@
+{
+ "gate": "unknown-field 400s from MCP-issued DSL down >=80% on the reference-coding harness (#1055, rc.79)",
+ "threshold": ">= 80% reduction in unknown-field 400s, arm A (no-map) vs arm B (with-map)",
+ "armA_no_map": {
+ "issued": 30,
+ "unknown_field_400": 20,
+ "other_400": 0,
+ "silent_zero_hit_with_hint": 0,
+ "silent_zero_hit_no_hint": 5,
+ "ok_with_hits": 5
+ },
+ "armB_with_map": {
+ "issued": 30,
+ "unknown_field_400": 0,
+ "other_400": 0,
+ "silent_zero_hit_with_hint": 0,
+ "silent_zero_hit_no_hint": 1,
+ "ok_with_hits": 29
+ },
+ "reduction_pct": 100.0,
+ "verdict": "PASS",
+ "note": "arm B's unknown_field_400 count is the gate's numerator; silent zero-hit misses (HTTP 200, wrong field) are a separate, non-gate metric counted here for honesty \u2014 xerj_map fixes those too but the gate text names 400s"
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.json b/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.json
new file mode 100644
index 000000000..0ea77e891
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.json
@@ -0,0 +1,944 @@
+{
+ "matched": 9,
+ "indexes": [
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-docs",
+ "records": 2852,
+ "semantic_field": "body",
+ "notes": [
+ "body: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.74, 765.6 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)",
+ "text: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.88, 93.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ],
+ "field_count": 14,
+ "fields": [
+ {
+ "name": "title",
+ "es_type": "keyword",
+ "cardinality_est": 1493,
+ "coverage": 0.978,
+ "examples": [
+ "# Benchmarking USearch",
+ "# Contributor Covenant Code of Conduct",
+ "# Contribution Guide"
+ ]
+ },
+ {
+ "name": "language",
+ "es_type": "keyword",
+ "cardinality_est": 11,
+ "coverage": 0.911,
+ "examples": [
+ "swift",
+ "cpp",
+ "c"
+ ]
+ },
+ {
+ "name": "code",
+ "es_type": "text",
+ "cardinality_est": 2304,
+ "coverage": 0.888,
+ "examples": [
+ "let cxxSettings: [CXXSetting] = [\n .headerSearchPath(\"../include/\"),\n .define(\"USEARCH_USE_NUMKONG\", to: \"1\"),\n ",
+ "var targets: [Target] = []",
+ "var products: [Product] = []"
+ ]
+ },
+ {
+ "name": "kind",
+ "es_type": "keyword",
+ "cardinality_est": 11,
+ "coverage": 0.888,
+ "examples": [
+ "const",
+ "static",
+ "function"
+ ]
+ },
+ {
+ "name": "line",
+ "es_type": "long",
+ "cardinality_est": 1439,
+ "coverage": 0.888,
+ "examples": [
+ "5",
+ "13",
+ "59"
+ ],
+ "num_min": 4,
+ "num_max": 4869
+ },
+ {
+ "name": "name",
+ "es_type": "keyword",
+ "cardinality_est": 1403,
+ "coverage": 0.888,
+ "examples": [
+ "cxxSettings",
+ "targets",
+ "products"
+ ]
+ },
+ {
+ "name": "path",
+ "es_type": "keyword",
+ "cardinality_est": 54,
+ "coverage": 0.888,
+ "examples": [
+ "Package.swift",
+ "lib.cpp",
+ "test.c"
+ ]
+ },
+ {
+ "name": "body",
+ "es_type": "semantic_text",
+ "cardinality_est": 255,
+ "coverage": 0.089,
+ "examples": [
+ "# Benchmarking USearch\n\nFor reproducible recall-vs-throughput sweeps against alternative search engines across the full ",
+ "| 128 | 64 | 81'747 | 149'728 | 99.0% |\n| `f32` x256 | 32 | 128 | 64 | ",
+ "thon/bench.py` and `python/bench.ipynb` for interactive charts against FAISS.\n\n### C++ Benchmarking Utilities\n\nTo achiev"
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.74, 765.6 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ },
+ {
+ "name": "section",
+ "es_type": "long",
+ "cardinality_est": 73,
+ "coverage": 0.058,
+ "examples": [
+ "0",
+ "1",
+ "2"
+ ],
+ "num_min": 0,
+ "num_max": 72
+ },
+ {
+ "name": "end_line",
+ "es_type": "long",
+ "cardinality_est": 52,
+ "coverage": 0.022,
+ "examples": [
+ "48",
+ "80",
+ "112"
+ ],
+ "num_min": 7,
+ "num_max": 454
+ },
+ {
+ "name": "start_line",
+ "es_type": "long",
+ "cardinality_est": 28,
+ "coverage": 0.022,
+ "examples": [
+ "1",
+ "37",
+ "70"
+ ],
+ "num_min": 1,
+ "num_max": 408
+ },
+ {
+ "name": "text",
+ "es_type": "semantic_text",
+ "cardinality_est": 63,
+ "coverage": 0.022,
+ "examples": [
+ "# This CMake file is heavily inspired by following `usearch` CMake:\n# https://github.com/nlohmann/json/blob/develop/CMak",
+ "option(USEARCH_BUILD_SQLITE \"Compile separate SQLite extension\" OFF)\n# Includes\nset(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SO",
+ "]=]\n USEARCH_CAN_COMPILE_FP16\n)\n# Check for `_Float16` support\ncheck_c_source_compiles(\n [=[\nint\nmain(int argc, ch"
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.88, 93.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ },
+ {
+ "name": "defs",
+ "es_type": "text",
+ "cardinality_est": 59,
+ "coverage": 0.021,
+ "examples": [
+ "const cxxSettings\nstatic targets\nstatic products\nconst package",
+ "function metric_kind_to_cpp\nfunction metric_kind_to_c\nfunction scalar_kind_to_cpp\nfunction scalar_kind_to_c\nfunction add",
+ "function usearch_write_backtrace\nfunction usearch_crash_handler\nfunction install_crash_handlers\nfunction expect\nfunction"
+ ]
+ },
+ {
+ "name": "symbol_count",
+ "es_type": "long",
+ "cardinality_est": 40,
+ "coverage": 0.021,
+ "examples": [
+ "4",
+ "41",
+ "15"
+ ],
+ "num_min": 1,
+ "num_max": 403
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-hnswlib-docs",
+ "records": 423,
+ "semantic_field": "body",
+ "notes": [
+ "body: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.71, 428.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)",
+ "text: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.92, 147.5 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ],
+ "field_count": 14,
+ "fields": [
+ {
+ "name": "title",
+ "es_type": "keyword",
+ "cardinality_est": 260,
+ "coverage": 0.976,
+ "examples": [
+ "# HNSW algorithm parameters",
+ "Apache License",
+ "include hnswlib/*.h"
+ ]
+ },
+ {
+ "name": "language",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 0.913,
+ "examples": [
+ "cpp",
+ "python",
+ "c"
+ ]
+ },
+ {
+ "name": "code",
+ "es_type": "text",
+ "cardinality_est": 243,
+ "coverage": 0.792,
+ "examples": [
+ "int main()",
+ "class PickDivisibleIds: public hnswlib::BaseFilterFunctor",
+ "PickDivisibleIds(unsigned int divisor): divisor(divisor)"
+ ]
+ },
+ {
+ "name": "kind",
+ "es_type": "keyword",
+ "cardinality_est": 6,
+ "coverage": 0.792,
+ "examples": [
+ "function",
+ "class",
+ "const"
+ ]
+ },
+ {
+ "name": "line",
+ "es_type": "long",
+ "cardinality_est": 184,
+ "coverage": 0.792,
+ "examples": [
+ "6",
+ "5",
+ "8"
+ ],
+ "num_min": 4,
+ "num_max": 1380
+ },
+ {
+ "name": "name",
+ "es_type": "keyword",
+ "cardinality_est": 203,
+ "coverage": 0.792,
+ "examples": [
+ "main",
+ "PickDivisibleIds",
+ "ParallelFor"
+ ]
+ },
+ {
+ "name": "path",
+ "es_type": "keyword",
+ "cardinality_est": 51,
+ "coverage": 0.792,
+ "examples": [
+ "example_epsilon_search.cpp",
+ "example_filter.cpp",
+ "example_mt_filter.cpp"
+ ]
+ },
+ {
+ "name": "body",
+ "es_type": "semantic_text",
+ "cardinality_est": 78,
+ "coverage": 0.184,
+ "examples": [
+ "# HNSW algorithm parameters\n\n## Search parameters:\n* ```ef``` - the size of the dynamic list for the nearest neighbors (",
+ "hen ```M``` is changed one has to update the other parameters. \nNonetheless, ef and ef_construction parameters can be ro",
+ "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.71, 428.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ },
+ {
+ "name": "defs",
+ "es_type": "text",
+ "cardinality_est": 35,
+ "coverage": 0.121,
+ "examples": [
+ "function main",
+ "class PickDivisibleIds\nfunction PickDivisibleIds\nfunction main",
+ "function ParallelFor\nclass PickDivisibleIds\nfunction PickDivisibleIds\nfunction main"
+ ]
+ },
+ {
+ "name": "symbol_count",
+ "es_type": "long",
+ "cardinality_est": 16,
+ "coverage": 0.121,
+ "examples": [
+ "1",
+ "3",
+ "4"
+ ],
+ "num_min": 1,
+ "num_max": 42
+ },
+ {
+ "name": "section",
+ "es_type": "long",
+ "cardinality_est": 11,
+ "coverage": 0.061,
+ "examples": [
+ "0",
+ "1",
+ "2"
+ ],
+ "num_min": 0,
+ "num_max": 10
+ },
+ {
+ "name": "end_line",
+ "es_type": "long",
+ "cardinality_est": 10,
+ "coverage": 0.024,
+ "examples": [
+ "49",
+ "91",
+ "105"
+ ],
+ "num_min": 9,
+ "num_max": 207
+ },
+ {
+ "name": "start_line",
+ "es_type": "long",
+ "cardinality_est": 7,
+ "coverage": 0.024,
+ "examples": [
+ "1",
+ "40",
+ "78"
+ ],
+ "num_min": 1,
+ "num_max": 160
+ },
+ {
+ "name": "text",
+ "es_type": "semantic_text",
+ "cardinality_est": 10,
+ "coverage": 0.024,
+ "examples": [
+ "cmake_minimum_required(VERSION 3.0...3.26)\nproject(hnswlib\n LANGUAGES CXX)\ninclude(GNUInstallDirs)\ninclude(CheckCXXCo",
+ "if(COMPILER_SUPPORT_NATIVE_FLAG)\n SET( CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=native\" )\n message(\"set ",
+ "add_executable(example_mt_replace_deleted examples/cpp/example_mt_replace_deleted.cpp)\n target_link_libraries(example"
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.92, 147.5 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-instant-distance-docs",
+ "records": 179,
+ "semantic_field": "body",
+ "notes": [
+ "body: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.85, 403.1 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)",
+ "text: hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.73, 98.2 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ],
+ "field_count": 14,
+ "fields": [
+ {
+ "name": "title",
+ "es_type": "keyword",
+ "cardinality_est": 108,
+ "coverage": 0.972,
+ "examples": [
+ "[workspace]",
+ "Apache License",
+ "[licenses]"
+ ]
+ },
+ {
+ "name": "language",
+ "es_type": "keyword",
+ "cardinality_est": 2,
+ "coverage": 0.905,
+ "examples": [
+ "python",
+ "rust"
+ ]
+ },
+ {
+ "name": "code",
+ "es_type": "text",
+ "cardinality_est": 132,
+ "coverage": 0.86,
+ "examples": [
+ "MAX_LINES = 100_000",
+ "LANGS = (\"en\", \"fr\", \"it\")",
+ "LANG_REPLACE = \"$$lang\""
+ ]
+ },
+ {
+ "name": "kind",
+ "es_type": "keyword",
+ "cardinality_est": 7,
+ "coverage": 0.86,
+ "examples": [
+ "const",
+ "function",
+ "struct"
+ ]
+ },
+ {
+ "name": "line",
+ "es_type": "long",
+ "cardinality_est": 141,
+ "coverage": 0.86,
+ "examples": [
+ "11",
+ "12",
+ "13"
+ ],
+ "num_min": 3,
+ "num_max": 787
+ },
+ {
+ "name": "name",
+ "es_type": "keyword",
+ "cardinality_est": 96,
+ "coverage": 0.86,
+ "examples": [
+ "MAX_LINES",
+ "LANGS",
+ "LANG_REPLACE"
+ ]
+ },
+ {
+ "name": "path",
+ "es_type": "keyword",
+ "cardinality_est": 6,
+ "coverage": 0.86,
+ "examples": [
+ "translate.py",
+ "lib.rs",
+ "test.py"
+ ]
+ },
+ {
+ "name": "body",
+ "es_type": "semantic_text",
+ "cardinality_est": 20,
+ "coverage": 0.112,
+ "examples": [
+ "[workspace]\nmembers = [\"instant-distance\", \"instant-distance-py\"]\nresolver = \"2\"\n\n[profile.bench]\ndebug = true",
+ "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens",
+ "ource or\n Object form, made available under the License, as indicated by a\n copyright notice that is included "
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.85, 403.1 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ },
+ {
+ "name": "defs",
+ "es_type": "text",
+ "cardinality_est": 8,
+ "coverage": 0.045,
+ "examples": [
+ "const MAX_LINES\nconst LANGS\nconst LANG_REPLACE\nconst DL_TEMPLATE\nconst BUILT_IDX_PATH\nconst WORD_MAP_PATH\nfunction downl",
+ "function instant_distance_py\nstruct HnswMap\nfunction build\nfunction load\nfunction dump\nfunction search\nstruct Hnsw\nstruc",
+ "function test_hsnw\nfunction test_hsnw_map"
+ ]
+ },
+ {
+ "name": "symbol_count",
+ "es_type": "long",
+ "cardinality_est": 8,
+ "coverage": 0.045,
+ "examples": [
+ "9",
+ "37",
+ "2"
+ ],
+ "num_min": 2,
+ "num_max": 48
+ },
+ {
+ "name": "section",
+ "es_type": "long",
+ "cardinality_est": 7,
+ "coverage": 0.039,
+ "examples": [
+ "0",
+ "1",
+ "2"
+ ],
+ "num_min": 0,
+ "num_max": 6
+ },
+ {
+ "name": "end_line",
+ "es_type": "long",
+ "cardinality_est": 5,
+ "coverage": 0.028,
+ "examples": [
+ "14",
+ "57",
+ "76"
+ ],
+ "num_min": 14,
+ "num_max": 76
+ },
+ {
+ "name": "start_line",
+ "es_type": "long",
+ "cardinality_est": 2,
+ "coverage": 0.028,
+ "examples": [
+ "1",
+ "46"
+ ],
+ "num_min": 1,
+ "num_max": 46
+ },
+ {
+ "name": "text",
+ "es_type": "semantic_text",
+ "cardinality_est": 5,
+ "coverage": 0.028,
+ "examples": [
+ "ifeq ($(shell uname), Darwin)\n\tPY_EXT := dylib\nelse\n\tPY_EXT := so\nendif\ntest-python:\n\tcargo build --release\n\tcp target/r",
+ "![Cover logo](./cover.svg)\n# Instant Distance: fast HNSW indexing\n[![Build status](https://github.com/InstantDomain/inst",
+ "}\n#[derive(Clone, Copy, Debug)]\nstruct Point(isize, isize, isize);\nimpl instant_distance::Point for Point {\n fn dista"
+ ],
+ "notes": [
+ "hybrid lexical+vector body \u2014 elected because it looks like natural language (word_ratio 0.73, 98.2 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests",
+ "records": 4,
+ "field_count": 4,
+ "fields": [
+ {
+ "name": "Include",
+ "es_type": "keyword",
+ "cardinality_est": 4,
+ "coverage": 1.0,
+ "examples": [
+ "Microsoft.NET.Test.Sdk",
+ "xunit",
+ "xunit.runner.visualstudio"
+ ]
+ },
+ {
+ "name": "Version",
+ "es_type": "keyword",
+ "cardinality_est": 4,
+ "coverage": 1.0,
+ "examples": [
+ "18.7.0",
+ "2.9.3",
+ "3.1.5"
+ ]
+ },
+ {
+ "name": "IncludeAssets",
+ "es_type": "text",
+ "cardinality_est": 1,
+ "coverage": 0.5,
+ "examples": [
+ "runtime; build; native; contentfiles; analyzers; buildtransitive"
+ ]
+ },
+ {
+ "name": "PrivateAssets",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.5,
+ "examples": [
+ "all"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-csharp-nuget-package",
+ "records": 4,
+ "field_count": 3,
+ "fields": [
+ {
+ "name": "Include",
+ "es_type": "keyword",
+ "cardinality_est": 4,
+ "coverage": 1.0,
+ "examples": [
+ "$(NativeLibDir)runtimes\\**\\*.*",
+ "$(RepoRoot)LICENSE",
+ "$(RepoRoot)assets\\unum.png"
+ ]
+ },
+ {
+ "name": "Pack",
+ "es_type": "boolean",
+ "cardinality_est": 1,
+ "coverage": 1.0,
+ "examples": [
+ "true"
+ ]
+ },
+ {
+ "name": "PackagePath",
+ "es_type": "keyword",
+ "cardinality_est": 2,
+ "coverage": 1.0,
+ "examples": [
+ "runtimes"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-json",
+ "records": 3,
+ "time_field": "cloned_at",
+ "time_min": "2026-09-30T17:52:28.000Z",
+ "time_max": "2026-09-30T17:52:28.000Z",
+ "field_count": 8,
+ "fields": [
+ {
+ "name": "bytes",
+ "es_type": "long",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "2146512",
+ "204055",
+ "344905"
+ ],
+ "num_min": 204055,
+ "num_max": 2146512
+ },
+ {
+ "name": "cloned_at",
+ "es_type": "date",
+ "date_enc": "rfc3339",
+ "cardinality_est": 1,
+ "coverage": 1.0,
+ "examples": [
+ "2026-09-30T17:52:28Z"
+ ],
+ "date_min": "2026-09-30T17:52:28.000Z",
+ "date_max": "2026-09-30T17:52:28.000Z"
+ },
+ {
+ "name": "corpus",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 1.0,
+ "examples": [
+ "map-gate-v"
+ ]
+ },
+ {
+ "name": "files",
+ "es_type": "long",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "175",
+ "27",
+ "65"
+ ],
+ "num_min": 27,
+ "num_max": 175
+ },
+ {
+ "name": "licence",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 1.0,
+ "examples": [
+ "Apache-2.0"
+ ]
+ },
+ {
+ "name": "repo",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "usearch",
+ "instant-distance",
+ "hnswlib"
+ ]
+ },
+ {
+ "name": "sha",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "cc23bbaf21ef52313c5a495adbc40cbd733cdcfb",
+ "13ea89ac1ca038d19fbbe3c095c1aeddf713f859",
+ "d9b3608c83d83b46c96e25088cb1d729b29dcfe9"
+ ]
+ },
+ {
+ "name": "url",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "https://github.com/unum-cloud/usearch",
+ "https://github.com/instant-labs/instant-distance",
+ "https://github.com/nmslib/hnswlib"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-csharp-directory-build",
+ "records": 3,
+ "field_count": 15,
+ "fields": [
+ {
+ "name": "TargetOS",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "win",
+ "linux",
+ "osx"
+ ]
+ },
+ {
+ "name": "TargetOS_Condition",
+ "es_type": "keyword",
+ "cardinality_est": 3,
+ "coverage": 1.0,
+ "examples": [
+ "$([MSBuild]::IsOSPlatform('Windows'))",
+ "$([MSBuild]::IsOSPlatform('Linux'))",
+ "$([MSBuild]::IsOSPlatform('OSX'))"
+ ]
+ },
+ {
+ "name": "TargetArchitecture",
+ "es_type": "keyword",
+ "cardinality_est": 2,
+ "coverage": 0.667,
+ "examples": [
+ "$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)",
+ "$(TargetArchitecture.ToLower())"
+ ]
+ },
+ {
+ "name": "CSharpDir",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "$(RepoRoot)csharp\\"
+ ]
+ },
+ {
+ "name": "Configuration",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "Debug"
+ ]
+ },
+ {
+ "name": "Configuration_Condition",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "'$(Configuration)'==''"
+ ]
+ },
+ {
+ "name": "LangVersion",
+ "es_type": "long",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "13"
+ ],
+ "num_min": 13,
+ "num_max": 13
+ },
+ {
+ "name": "NativeLibBuildScriptsDir",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "$(CSharpDir)eng\\"
+ ]
+ },
+ {
+ "name": "NativeLibDir",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "$(CSharpDir)lib\\"
+ ]
+ },
+ {
+ "name": "PackageOutputPath",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "$(CSharpDir)packages"
+ ]
+ },
+ {
+ "name": "Platform",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "AnyCPU"
+ ]
+ },
+ {
+ "name": "Platform_Condition",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "'$(Platform)'==''"
+ ]
+ },
+ {
+ "name": "RepoRoot",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\\..\\'))"
+ ]
+ },
+ {
+ "name": "RepoRoot_Condition",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "'$(RepoRoot)' == ''"
+ ]
+ },
+ {
+ "name": "TargetArchitecture_Condition",
+ "es_type": "keyword",
+ "cardinality_est": 1,
+ "coverage": 0.333,
+ "examples": [
+ "'$(TargetArchitecture)' == ''"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors",
+ "records": 2,
+ "notes": [
+ "source table: binary_vectors"
+ ],
+ "field_count": 2,
+ "fields": [
+ {
+ "name": "id",
+ "es_type": "long",
+ "cardinality_est": 2,
+ "coverage": 1.0,
+ "examples": [
+ "42",
+ "43"
+ ],
+ "num_min": 42,
+ "num_max": 43
+ },
+ {
+ "name": "vector",
+ "es_type": "keyword",
+ "cardinality_est": 2,
+ "coverage": 1.0,
+ "examples": [
+ "X'FFFFFF'",
+ "X'000000'"
+ ]
+ }
+ ]
+ },
+ {
+ "index": "xc-map-gate-v-b1790790750-usearch-sqlite-strings-table",
+ "records": 2,
+ "notes": [
+ "source table: strings_table"
+ ],
+ "field_count": 2,
+ "fields": [
+ {
+ "name": "id",
+ "es_type": "long",
+ "cardinality_est": 2,
+ "coverage": 1.0,
+ "examples": [
+ "42",
+ "43"
+ ],
+ "num_min": 42,
+ "num_max": 43
+ },
+ {
+ "name": "word",
+ "es_type": "keyword",
+ "cardinality_est": 2,
+ "coverage": 1.0,
+ "examples": [
+ "e\u0001cole",
+ "\u00e9cole"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.txt b/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.txt
new file mode 100644
index 000000000..f20595bca
--- /dev/null
+++ b/benchmarks/map-gate/results/2026-09-30-rc78gates/xerj-map-response.txt
@@ -0,0 +1 @@
+{"matched":9,"indexes":[{"index":"xc-map-gate-v-b1790790750-usearch-docs","records":2852,"semantic_field":"body","notes":["body: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.74, 765.6 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)","text: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.88, 93.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"],"field_count":14,"fields":[{"name":"title","es_type":"keyword","cardinality_est":1493,"coverage":0.978,"examples":["# Benchmarking USearch","# Contributor Covenant Code of Conduct","# Contribution Guide"]},{"name":"language","es_type":"keyword","cardinality_est":11,"coverage":0.911,"examples":["swift","cpp","c"]},{"name":"code","es_type":"text","cardinality_est":2304,"coverage":0.888,"examples":["let cxxSettings: [CXXSetting] = [\n .headerSearchPath(\"../include/\"),\n .define(\"USEARCH_USE_NUMKONG\", to: \"1\"),\n ","var targets: [Target] = []","var products: [Product] = []"]},{"name":"kind","es_type":"keyword","cardinality_est":11,"coverage":0.888,"examples":["const","static","function"]},{"name":"line","es_type":"long","cardinality_est":1439,"coverage":0.888,"examples":["5","13","59"],"num_min":4,"num_max":4869},{"name":"name","es_type":"keyword","cardinality_est":1403,"coverage":0.888,"examples":["cxxSettings","targets","products"]},{"name":"path","es_type":"keyword","cardinality_est":54,"coverage":0.888,"examples":["Package.swift","lib.cpp","test.c"]},{"name":"body","es_type":"semantic_text","cardinality_est":255,"coverage":0.089,"examples":["# Benchmarking USearch\n\nFor reproducible recall-vs-throughput sweeps against alternative search engines across the full ","| 128 | 64 | 81'747 | 149'728 | 99.0% |\n| `f32` x256 | 32 | 128 | 64 | ","thon/bench.py` and `python/bench.ipynb` for interactive charts against FAISS.\n\n### C++ Benchmarking Utilities\n\nTo achiev"],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.74, 765.6 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]},{"name":"section","es_type":"long","cardinality_est":73,"coverage":0.058,"examples":["0","1","2"],"num_min":0,"num_max":72},{"name":"end_line","es_type":"long","cardinality_est":52,"coverage":0.022,"examples":["48","80","112"],"num_min":7,"num_max":454},{"name":"start_line","es_type":"long","cardinality_est":28,"coverage":0.022,"examples":["1","37","70"],"num_min":1,"num_max":408},{"name":"text","es_type":"semantic_text","cardinality_est":63,"coverage":0.022,"examples":["# This CMake file is heavily inspired by following `usearch` CMake:\n# https://github.com/nlohmann/json/blob/develop/CMak","option(USEARCH_BUILD_SQLITE \"Compile separate SQLite extension\" OFF)\n# Includes\nset(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SO","]=]\n USEARCH_CAN_COMPILE_FP16\n)\n# Check for `_Float16` support\ncheck_c_source_compiles(\n [=[\nint\nmain(int argc, ch"],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.88, 93.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]},{"name":"defs","es_type":"text","cardinality_est":59,"coverage":0.021,"examples":["const cxxSettings\nstatic targets\nstatic products\nconst package","function metric_kind_to_cpp\nfunction metric_kind_to_c\nfunction scalar_kind_to_cpp\nfunction scalar_kind_to_c\nfunction add","function usearch_write_backtrace\nfunction usearch_crash_handler\nfunction install_crash_handlers\nfunction expect\nfunction"]},{"name":"symbol_count","es_type":"long","cardinality_est":40,"coverage":0.021,"examples":["4","41","15"],"num_min":1,"num_max":403}]},{"index":"xc-map-gate-v-b1790790750-hnswlib-docs","records":423,"semantic_field":"body","notes":["body: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.71, 428.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)","text: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.92, 147.5 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"],"field_count":14,"fields":[{"name":"title","es_type":"keyword","cardinality_est":260,"coverage":0.976,"examples":["# HNSW algorithm parameters","Apache License","include hnswlib/*.h"]},{"name":"language","es_type":"keyword","cardinality_est":3,"coverage":0.913,"examples":["cpp","python","c"]},{"name":"code","es_type":"text","cardinality_est":243,"coverage":0.792,"examples":["int main()","class PickDivisibleIds: public hnswlib::BaseFilterFunctor","PickDivisibleIds(unsigned int divisor): divisor(divisor)"]},{"name":"kind","es_type":"keyword","cardinality_est":6,"coverage":0.792,"examples":["function","class","const"]},{"name":"line","es_type":"long","cardinality_est":184,"coverage":0.792,"examples":["6","5","8"],"num_min":4,"num_max":1380},{"name":"name","es_type":"keyword","cardinality_est":203,"coverage":0.792,"examples":["main","PickDivisibleIds","ParallelFor"]},{"name":"path","es_type":"keyword","cardinality_est":51,"coverage":0.792,"examples":["example_epsilon_search.cpp","example_filter.cpp","example_mt_filter.cpp"]},{"name":"body","es_type":"semantic_text","cardinality_est":78,"coverage":0.184,"examples":["# HNSW algorithm parameters\n\n## Search parameters:\n* ```ef``` - the size of the dynamic list for the nearest neighbors (","hen ```M``` is changed one has to update the other parameters. \nNonetheless, ef and ef_construction parameters can be ro","Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.71, 428.9 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]},{"name":"defs","es_type":"text","cardinality_est":35,"coverage":0.121,"examples":["function main","class PickDivisibleIds\nfunction PickDivisibleIds\nfunction main","function ParallelFor\nclass PickDivisibleIds\nfunction PickDivisibleIds\nfunction main"]},{"name":"symbol_count","es_type":"long","cardinality_est":16,"coverage":0.121,"examples":["1","3","4"],"num_min":1,"num_max":42},{"name":"section","es_type":"long","cardinality_est":11,"coverage":0.061,"examples":["0","1","2"],"num_min":0,"num_max":10},{"name":"end_line","es_type":"long","cardinality_est":10,"coverage":0.024,"examples":["49","91","105"],"num_min":9,"num_max":207},{"name":"start_line","es_type":"long","cardinality_est":7,"coverage":0.024,"examples":["1","40","78"],"num_min":1,"num_max":160},{"name":"text","es_type":"semantic_text","cardinality_est":10,"coverage":0.024,"examples":["cmake_minimum_required(VERSION 3.0...3.26)\nproject(hnswlib\n LANGUAGES CXX)\ninclude(GNUInstallDirs)\ninclude(CheckCXXCo","if(COMPILER_SUPPORT_NATIVE_FLAG)\n SET( CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=native\" )\n message(\"set ","add_executable(example_mt_replace_deleted examples/cpp/example_mt_replace_deleted.cpp)\n target_link_libraries(example"],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.92, 147.5 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]}]},{"index":"xc-map-gate-v-b1790790750-instant-distance-docs","records":179,"semantic_field":"body","notes":["body: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.85, 403.1 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)","text: hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.73, 98.2 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"],"field_count":14,"fields":[{"name":"title","es_type":"keyword","cardinality_est":108,"coverage":0.972,"examples":["[workspace]","Apache License","[licenses]"]},{"name":"language","es_type":"keyword","cardinality_est":2,"coverage":0.905,"examples":["python","rust"]},{"name":"code","es_type":"text","cardinality_est":132,"coverage":0.86,"examples":["MAX_LINES = 100_000","LANGS = (\"en\", \"fr\", \"it\")","LANG_REPLACE = \"$$lang\""]},{"name":"kind","es_type":"keyword","cardinality_est":7,"coverage":0.86,"examples":["const","function","struct"]},{"name":"line","es_type":"long","cardinality_est":141,"coverage":0.86,"examples":["11","12","13"],"num_min":3,"num_max":787},{"name":"name","es_type":"keyword","cardinality_est":96,"coverage":0.86,"examples":["MAX_LINES","LANGS","LANG_REPLACE"]},{"name":"path","es_type":"keyword","cardinality_est":6,"coverage":0.86,"examples":["translate.py","lib.rs","test.py"]},{"name":"body","es_type":"semantic_text","cardinality_est":20,"coverage":0.112,"examples":["[workspace]\nmembers = [\"instant-distance\", \"instant-distance-py\"]\nresolver = \"2\"\n\n[profile.bench]\ndebug = true","Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens","ource or\n Object form, made available under the License, as indicated by a\n copyright notice that is included "],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.85, 403.1 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]},{"name":"defs","es_type":"text","cardinality_est":8,"coverage":0.045,"examples":["const MAX_LINES\nconst LANGS\nconst LANG_REPLACE\nconst DL_TEMPLATE\nconst BUILT_IDX_PATH\nconst WORD_MAP_PATH\nfunction downl","function instant_distance_py\nstruct HnswMap\nfunction build\nfunction load\nfunction dump\nfunction search\nstruct Hnsw\nstruc","function test_hsnw\nfunction test_hsnw_map"]},{"name":"symbol_count","es_type":"long","cardinality_est":8,"coverage":0.045,"examples":["9","37","2"],"num_min":2,"num_max":48},{"name":"section","es_type":"long","cardinality_est":7,"coverage":0.039,"examples":["0","1","2"],"num_min":0,"num_max":6},{"name":"end_line","es_type":"long","cardinality_est":5,"coverage":0.028,"examples":["14","57","76"],"num_min":14,"num_max":76},{"name":"start_line","es_type":"long","cardinality_est":2,"coverage":0.028,"examples":["1","46"],"num_min":1,"num_max":46},{"name":"text","es_type":"semantic_text","cardinality_est":5,"coverage":0.028,"examples":["ifeq ($(shell uname), Darwin)\n\tPY_EXT := dylib\nelse\n\tPY_EXT := so\nendif\ntest-python:\n\tcargo build --release\n\tcp target/r","![Cover logo](./cover.svg)\n# Instant Distance: fast HNSW indexing\n[![Build status](https://github.com/InstantDomain/inst","}\n#[derive(Clone, Copy, Debug)]\nstruct Point(isize, isize, isize);\nimpl instant_distance::Point for Point {\n fn dista"],"notes":["hybrid lexical+vector body — elected because it looks like natural language (word_ratio 0.73, 98.2 tokens/value); embedded server-side (lexical by default; Candle neural, proxy, or experimental ONNX if configured)"]}]},{"index":"xc-map-gate-v-b1790790750-usearch-csharp-cloud-unum-usearch-tests","records":4,"field_count":4,"fields":[{"name":"Include","es_type":"keyword","cardinality_est":4,"coverage":1.0,"examples":["Microsoft.NET.Test.Sdk","xunit","xunit.runner.visualstudio"]},{"name":"Version","es_type":"keyword","cardinality_est":4,"coverage":1.0,"examples":["18.7.0","2.9.3","3.1.5"]},{"name":"IncludeAssets","es_type":"text","cardinality_est":1,"coverage":0.5,"examples":["runtime; build; native; contentfiles; analyzers; buildtransitive"]},{"name":"PrivateAssets","es_type":"keyword","cardinality_est":1,"coverage":0.5,"examples":["all"]}]},{"index":"xc-map-gate-v-b1790790750-usearch-csharp-nuget-package","records":4,"field_count":3,"fields":[{"name":"Include","es_type":"keyword","cardinality_est":4,"coverage":1.0,"examples":["$(NativeLibDir)runtimes\\**\\*.*","$(RepoRoot)LICENSE","$(RepoRoot)assets\\unum.png"]},{"name":"Pack","es_type":"boolean","cardinality_est":1,"coverage":1.0,"examples":["true"]},{"name":"PackagePath","es_type":"keyword","cardinality_est":2,"coverage":1.0,"examples":["runtimes"]}]},{"index":"xc-map-gate-v-b1790790750-json","records":3,"time_field":"cloned_at","time_min":"2026-09-30T17:52:28.000Z","time_max":"2026-09-30T17:52:28.000Z","field_count":8,"fields":[{"name":"bytes","es_type":"long","cardinality_est":3,"coverage":1.0,"examples":["2146512","204055","344905"],"num_min":204055,"num_max":2146512},{"name":"cloned_at","es_type":"date","date_enc":"rfc3339","cardinality_est":1,"coverage":1.0,"examples":["2026-09-30T17:52:28Z"],"date_min":"2026-09-30T17:52:28.000Z","date_max":"2026-09-30T17:52:28.000Z"},{"name":"corpus","es_type":"keyword","cardinality_est":1,"coverage":1.0,"examples":["map-gate-v"]},{"name":"files","es_type":"long","cardinality_est":3,"coverage":1.0,"examples":["175","27","65"],"num_min":27,"num_max":175},{"name":"licence","es_type":"keyword","cardinality_est":1,"coverage":1.0,"examples":["Apache-2.0"]},{"name":"repo","es_type":"keyword","cardinality_est":3,"coverage":1.0,"examples":["usearch","instant-distance","hnswlib"]},{"name":"sha","es_type":"keyword","cardinality_est":3,"coverage":1.0,"examples":["cc23bbaf21ef52313c5a495adbc40cbd733cdcfb","13ea89ac1ca038d19fbbe3c095c1aeddf713f859","d9b3608c83d83b46c96e25088cb1d729b29dcfe9"]},{"name":"url","es_type":"keyword","cardinality_est":3,"coverage":1.0,"examples":["https://github.com/unum-cloud/usearch","https://github.com/instant-labs/instant-distance","https://github.com/nmslib/hnswlib"]}]},{"index":"xc-map-gate-v-b1790790750-usearch-csharp-directory-build","records":3,"field_count":15,"fields":[{"name":"TargetOS","es_type":"keyword","cardinality_est":3,"coverage":1.0,"examples":["win","linux","osx"]},{"name":"TargetOS_Condition","es_type":"keyword","cardinality_est":3,"coverage":1.0,"examples":["$([MSBuild]::IsOSPlatform('Windows'))","$([MSBuild]::IsOSPlatform('Linux'))","$([MSBuild]::IsOSPlatform('OSX'))"]},{"name":"TargetArchitecture","es_type":"keyword","cardinality_est":2,"coverage":0.667,"examples":["$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)","$(TargetArchitecture.ToLower())"]},{"name":"CSharpDir","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["$(RepoRoot)csharp\\"]},{"name":"Configuration","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["Debug"]},{"name":"Configuration_Condition","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["'$(Configuration)'==''"]},{"name":"LangVersion","es_type":"long","cardinality_est":1,"coverage":0.333,"examples":["13"],"num_min":13,"num_max":13},{"name":"NativeLibBuildScriptsDir","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["$(CSharpDir)eng\\"]},{"name":"NativeLibDir","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["$(CSharpDir)lib\\"]},{"name":"PackageOutputPath","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["$(CSharpDir)packages"]},{"name":"Platform","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["AnyCPU"]},{"name":"Platform_Condition","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["'$(Platform)'==''"]},{"name":"RepoRoot","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\\..\\'))"]},{"name":"RepoRoot_Condition","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["'$(RepoRoot)' == ''"]},{"name":"TargetArchitecture_Condition","es_type":"keyword","cardinality_est":1,"coverage":0.333,"examples":["'$(TargetArchitecture)' == ''"]}]},{"index":"xc-map-gate-v-b1790790750-usearch-sqlite-binary-vectors","records":2,"notes":["source table: binary_vectors"],"field_count":2,"fields":[{"name":"id","es_type":"long","cardinality_est":2,"coverage":1.0,"examples":["42","43"],"num_min":42,"num_max":43},{"name":"vector","es_type":"keyword","cardinality_est":2,"coverage":1.0,"examples":["X'FFFFFF'","X'000000'"]}]},{"index":"xc-map-gate-v-b1790790750-usearch-sqlite-strings-table","records":2,"notes":["source table: strings_table"],"field_count":2,"fields":[{"name":"id","es_type":"long","cardinality_est":2,"coverage":1.0,"examples":["42","43"],"num_min":42,"num_max":43},{"name":"word","es_type":"keyword","cardinality_est":2,"coverage":1.0,"examples":["e\u0001cole","école"]}]}]}
\ No newline at end of file
diff --git a/benchmarks/map-gate/run.py b/benchmarks/map-gate/run.py
new file mode 100644
index 000000000..1f9bc6664
--- /dev/null
+++ b/benchmarks/map-gate/run.py
@@ -0,0 +1,368 @@
+#!/usr/bin/env python3
+"""xerj_map gate #1055 — unknown-field 400s from MCP-issued DSL.
+
+Two arms over the SAME corpus and the SAME 30 query intents
+(`queries.json`, this directory):
+
+ arm A no-map — the agent guesses field names (guess_rule in queries.json)
+ arm B with-map — field choices are derived mechanically from the live
+ `xerj_map` MCP tool response (map_policy in queries.json)
+
+Both arms issue exactly the DSL the MCP tools proxy (xerj_search →
+POST /{index}/_search {query,sort}; xerj_semantic_search →
+{"query":{"semantic":{field,query}}}; xerj_vector_search → top-level knn;
+xerj_hybrid_search → {"query":{"hybrid":{queries:[...]}}}) against a real
+node over the ES wire, and every request + response is written raw under
+results/<label>/arm{A,B}/<intent>.json.
+
+The counted failure is the HTTP 400 whose error names a field the index does
+not have or has with the wrong type ("No mapping found for [...]" on sort,
+"[knn] query field [...] is not a vector field", "semantic query on field
+[...]: it is not a `semantic_text` field"). Silent zero-hit misses
+(term/match/range/exists on a wrong field — HTTP 200, no error) are counted
+separately: they are the OTHER thing xerj_map fixes, not this gate's metric.
+
+Usage:
+ run.py --node http://127.0.0.1:9660 --xerj-bin /path/to/xerj \
+ --prefix xc-map-gate-v --label 2026-09-30-rc78gates
+"""
+
+import argparse
+import json
+import os
+import subprocess
+import sys
+import urllib.request
+import urllib.error
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+
+SORTABLE = {"keyword", "long", "date"}
+
+
+def http_json(url, body=None, method=None):
+ data = json.dumps(body).encode() if body is not None else None
+ req = urllib.request.Request(url, data=data, method=method or ("POST" if data else "GET"),
+ headers={"Content-Type": "application/json"})
+ try:
+ with urllib.request.urlopen(req) as r:
+ return r.status, json.loads(r.read().decode())
+ except urllib.error.HTTPError as e:
+ raw = e.read().decode()
+ try:
+ return e.code, json.loads(raw)
+ except json.JSONDecodeError:
+ return e.code, {"raw": raw}
+
+
+def mcp_xerj_map(xerj_bin, node):
+ """Call the real xerj_map tool over MCP stdio, exactly as an agent would."""
+ p = subprocess.Popen(
+ [xerj_bin, "mcp", "--url", node, "--disable-feedback"],
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
+ def send(obj):
+ p.stdin.write(json.dumps(obj) + "\n"); p.stdin.flush()
+ def read():
+ line = p.stdout.readline()
+ return json.loads(line) if line.strip() else None
+ send({"jsonrpc": "2.0", "id": 1, "method": "initialize",
+ "params": {"protocolVersion": "2024-11-05", "capabilities": {},
+ "clientInfo": {"name": "map-gate", "version": "1"}}})
+ init = read()
+ send({"jsonrpc": "2.0", "method": "notifications/initialized"})
+ send({"jsonrpc": "2.0", "id": 2, "method": "tools/call",
+ "params": {"name": "xerj_map", "arguments": {}}})
+ resp = read()
+ p.terminate()
+ text = resp["result"]["content"][0]["text"]
+ return init, text, json.loads(text)
+
+
+def classify(status, body, fields_used):
+ """Classify one response against the gate's failure definition."""
+ out = {"http_status": status, "fields_used": fields_used}
+ err = body.get("error") if isinstance(body, dict) else None
+ reason = ""
+ if err:
+ reason = str(err.get("reason", ""))
+ for rc in err.get("root_cause", []) or []:
+ reason += " | " + str(rc.get("reason", ""))
+ out["error_reason"] = reason[:400]
+ if status == 400:
+ reasons = []
+ if "No mapping found for [" in reason:
+ reasons.append("sort-unknown-field")
+ if "is not a vector field" in reason:
+ reasons.append("knn-non-vector-field")
+ if "it is not a `semantic_text` field" in reason:
+ reasons.append("semantic-non-semantic-field")
+ out["unknown_field_400"] = bool(reasons)
+ out["failure_kind"] = reasons or ["other-400"]
+ # attribution: the error must name one of the fields this arm used
+ out["error_names_used_field"] = any(f in reason for f in fields_used if f)
+ else:
+ out["unknown_field_400"] = False
+ out["failure_kind"] = []
+ hits = body.get("hits", {}).get("total", {}).get("value") if isinstance(body, dict) else None
+ out["hits"] = hits
+ hints = body.get("hints", []) if isinstance(body, dict) else []
+ codes = [h.get("code") for h in hints]
+ out["zero_hit_unknown_field_hint"] = ("unknown_field" in codes)
+ out["hint_reason"] = next((h.get("reason", "")[:200] for h in hints
+ if h.get("code") == "unknown_field"), "")
+ return out
+
+
+def entry_for(map_data, index_name):
+ for e in map_data.get("indexes", []):
+ if e.get("index") == index_name:
+ return e
+ return None
+
+
+def pick_by_candidates(entry, candidates, types=None):
+ """First candidate present in the map entry (case-insensitive) with a
+ compatible es_type; returns (exact_name, action)."""
+ fields = {f["name"]: f for f in entry.get("fields", [])}
+ lower = {n.lower(): n for n in fields}
+ for cand in candidates:
+ exact = lower.get(cand.lower())
+ if exact is None:
+ continue
+ if types is None or fields[exact].get("es_type") in types:
+ action = "map-exact-name" if exact == cand else "map-case-corrected"
+ return exact, action
+ return None, "no-candidate-in-map"
+
+
+def best_of_type(entry, es_type):
+ fs = [f for f in entry.get("fields", []) if f.get("es_type") == es_type]
+ if not fs:
+ return None
+ return max(fs, key=lambda f: f.get("coverage") or 0.0)["name"]
+
+
+def semantic_policy(entry):
+ """(endpoint_body, action, fields_used) for a semantic-shaped need."""
+ sem = best_of_type(entry, "semantic_text")
+ if sem:
+ return "semantic", sem, "map-semantic-field"
+ txt = best_of_type(entry, "text")
+ if txt:
+ return "match", txt, "map-no-semantic-fell-back-to-match"
+ return "match_all", None, "map-no-semantic-no-text-fell-back-to-match_all"
+
+
+def build_arm_a(intent):
+ """The no-map request: the guessed field, in the tool's wire shape."""
+ t, form = intent["tool"], intent["form"]
+ if form == "sort":
+ return {"query": {"match_all": {}}, "sort": [{intent["guess_field"]: "asc"}], "size": 5}, \
+ [intent["guess_field"]]
+ if form == "semantic":
+ return {"query": {"semantic": {"field": intent["guess_field"],
+ "query": intent["query_text"]}}, "size": 5}, \
+ [intent["guess_field"]]
+ if form == "knn":
+ return {"knn": {"field": intent["guess_field"],
+ "query_vector": [0.1, -0.2, 0.3, -0.4, 0.5, -0.6, 0.7, -0.8],
+ "k": 3}}, \
+ [intent["guess_field"]]
+ if form == "hybrid":
+ return {"query": {"hybrid": {"queries": [
+ {"query": {"match": {"content": intent["lexical_text"]}}},
+ {"query": {"knn": {"field": intent["vector_leg_guess_field"],
+ "query_vector": [0.1, -0.2, 0.3, -0.4, 0.5, -0.6, 0.7, -0.8],
+ "k": 3}}}],
+ "fusion": "rrf"}}, "size": 5}, \
+ ["content", intent["vector_leg_guess_field"]]
+ if form == "term":
+ return {"query": {"term": {intent["guess_field"]: intent["value"]}}, "size": 5}, \
+ [intent["guess_field"]]
+ if form == "range":
+ return {"query": {"range": {intent["guess_field"]: intent["range"]}}, "size": 5}, \
+ [intent["guess_field"]]
+ if form == "exists":
+ return {"query": {"exists": {"field": intent["guess_field"]}}, "size": 5}, \
+ [intent["guess_field"]]
+ raise ValueError(form)
+
+
+def build_arm_b(intent, entry):
+ """The with-map request: field choices derived from the xerj_map entry."""
+ t, form = intent["tool"], intent["form"]
+ actions, fields = [], []
+ if form == "sort":
+ name, action = pick_by_candidates(entry, intent.get("map_candidates", []), SORTABLE)
+ if name:
+ body = {"query": {"match_all": {}}, "sort": [{name: "asc"}], "size": 5}
+ fields = [name]
+ else: # the map shows no such field: the agent keeps the search, drops the sort
+ body = {"query": {"match_all": {}}, "size": 5}
+ action = "dropped-sort:" + action
+ actions.append(action)
+ return body, fields, actions
+ if form in ("semantic", "knn"):
+ if form == "knn":
+ name, action = pick_by_candidates(entry, intent.get("map_candidates", []),
+ {"dense_vector"})
+ if name:
+ body = {"knn": {"field": name,
+ "query_vector": [0.1, -0.2, 0.3, -0.4, 0.5, -0.6, 0.7, -0.8],
+ "k": 3}}
+ return body, [name], [action]
+ kind, name, action = semantic_policy(entry)
+ if kind == "semantic":
+ body = {"query": {"semantic": {"field": name, "query": intent["query_text"]}}, "size": 5}
+ elif kind == "match":
+ body = {"query": {"match": {name: intent["query_text"]}}, "size": 5}
+ else:
+ body = {"query": {"match_all": {}}, "size": 5}
+ return body, ([name] if name else []), [action]
+ if form == "hybrid":
+ txt = best_of_type(entry, "text") or "code"
+ kind, name, action = semantic_policy(entry)
+ if kind == "semantic":
+ leg = {"query": {"semantic": {"field": name, "query": intent["vector_text"]}}}
+ fields = [txt, name]
+ elif kind == "match":
+ leg = {"query": {"match": {name: intent["vector_text"]}}}
+ fields = [txt, name]
+ else:
+ leg = None
+ fields = [txt]
+ queries = [{"query": {"match": {txt: intent["lexical_text"]}}}] + ([leg] if leg else [])
+ return {"query": {"hybrid": {"queries": queries, "fusion": "rrf"}}, "size": 5}, \
+ fields, ["hybrid-legs:" + action]
+ if form in ("term", "range", "exists"):
+ name, action = pick_by_candidates(entry, intent.get("map_candidates", []))
+ if name is None: # map shows no such field: the agent drops the unexpressable filter
+ actions.append("dropped-filter:" + action)
+ return {"query": {"match_all": {}}, "size": 5}, [], actions
+ actions.append(action)
+ if form == "term":
+ body = {"query": {"term": {name: intent["value"]}}, "size": 5}
+ elif form == "range":
+ body = {"query": {"range": {name: intent["range"]}}, "size": 5}
+ else:
+ body = {"query": {"exists": {"field": name}}, "size": 5}
+ return body, [name], actions
+ raise ValueError(form)
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument("--node", default="http://127.0.0.1:9660")
+ ap.add_argument("--xerj-bin", required=True)
+ ap.add_argument("--prefix", default="xc-map-gate-v", help="corpus index prefix on the node")
+ ap.add_argument("--label", required=True)
+ args = ap.parse_args()
+
+ outdir = os.path.join(HERE, "results", args.label)
+ for sub in ("armA", "armB"):
+ os.makedirs(os.path.join(outdir, sub), exist_ok=True)
+
+ # ── preflight ──────────────────────────────────────────────────────────
+ status, root = http_json(args.node + "/")
+ version = root.get("version", {}).get("number")
+ status, cat = http_json(args.node + "/_cat/indices?format=json")
+ live = {r["index"]: int(r["docs.count"]) for r in cat}
+ bin_version = subprocess.run([args.xerj_bin, "--version"], capture_output=True,
+ text=True).stdout.strip()
+
+ qs = json.load(open(os.path.join(HERE, "queries.json")))
+ targets = {}
+ for it in qs["intents"]:
+ # corpus indexes are <prefix>-b<stamp>-<dataset>; the stamp differs per
+ # build, so resolve by prefix + exact dataset suffix and demand uniqueness
+ exact = [i for i in live
+ if i.startswith(args.prefix + "-") and i.endswith("-" + it["target"])]
+ targets[it["target"]] = exact[0]
+ assert len(exact) == 1, f"target {it['target']} resolved to {exact}"
+
+ # ── the real xerj_map call, as an agent issues it ──────────────────────
+ init, map_text, map_data = mcp_xerj_map(args.xerj_bin, args.node)
+ open(os.path.join(outdir, "xerj-map-response.txt"), "w").write(map_text)
+ json.dump(map_data, open(os.path.join(outdir, "xerj-map-response.json"), "w"), indent=1)
+
+ header = {
+ "gate": qs["gate"],
+ "harness_git": subprocess.run(["git", "rev-parse", "HEAD"], cwd=HERE,
+ capture_output=True, text=True).stdout.strip(),
+ "binary": bin_version,
+ "mcp_server": init["result"]["serverInfo"],
+ "node": args.node, "node_es_version": version,
+ "corpus_prefix": args.prefix,
+ "indexes": {t: n for t, n in targets.items()},
+ "map_matched": map_data.get("matched"),
+ "map_bytes": len(map_text),
+ "intents": len(qs["intents"]),
+ }
+ json.dump(header, open(os.path.join(outdir, "run-header.json"), "w"), indent=1)
+
+ # ── both arms, sequentially, same node, same corpus state ─────────────
+ rows = []
+ counts = {arm: {"issued": 0, "unknown_field_400": 0, "other_400": 0,
+ "silent_zero_hit_with_hint": 0, "silent_zero_hit_no_hint": 0,
+ "ok_with_hits": 0} for arm in ("A", "B")}
+ for it in qs["intents"]:
+ idx = targets[it["target"]]
+ entry = entry_for(map_data, idx)
+ assert entry is not None, f"no xerj_map entry for {idx}"
+ for arm, builder in (("A", build_arm_a), ("B", build_arm_b)):
+ if arm == "A":
+ body, fields = builder(it)
+ actions = ["guess"]
+ else:
+ body, fields, actions = builder(it, entry)
+ st, resp = http_json(f"{args.node}/{idx}/_search", body)
+ cls = classify(st, resp, fields)
+ rec = {"intent": it["id"], "arm": arm, "tool": it["tool"], "form": it["form"],
+ "target_index": idx, "intent_text": it.get("intent", ""),
+ "guess_field": it.get("guess_field") or it.get("vector_leg_guess_field"),
+ "control": it.get("control"),
+ "actions": actions, "request": body, **cls,
+ "map_shows": [f["name"] for f in entry.get("fields", [])]}
+ json.dump(rec, open(os.path.join(outdir, f"arm{arm}", it["id"] + ".json"), "w"),
+ indent=1)
+ c = counts[arm]
+ c["issued"] += 1
+ if cls["unknown_field_400"]:
+ c["unknown_field_400"] += 1
+ elif st == 400:
+ c["other_400"] += 1
+ elif cls.get("hits") == 0 and cls.get("zero_hit_unknown_field_hint"):
+ c["silent_zero_hit_with_hint"] += 1
+ elif cls.get("hits") == 0:
+ c["silent_zero_hit_no_hint"] += 1
+ else:
+ c["ok_with_hits"] += 1
+ rows.append(rec)
+
+ a, b = counts["A"], counts["B"]
+ reduction = (100.0 * (a["unknown_field_400"] - b["unknown_field_400"]) /
+ a["unknown_field_400"]) if a["unknown_field_400"] else None
+ summary = {
+ "gate": qs["gate"],
+ "threshold": ">= 80% reduction in unknown-field 400s, arm A (no-map) vs arm B (with-map)",
+ "armA_no_map": a, "armB_with_map": b,
+ "reduction_pct": reduction,
+ "verdict": ("PASS" if reduction is not None and reduction >= 80.0 else
+ "FAIL" if reduction is not None else "UNDEFINED"),
+ "note": ("arm B's unknown_field_400 count is the gate's numerator; silent zero-hit "
+ "misses (HTTP 200, wrong field) are a separate, non-gate metric counted here "
+ "for honesty — xerj_map fixes those too but the gate text names 400s"),
+ }
+ json.dump(summary, open(os.path.join(outdir, "summary.json"), "w"), indent=1)
+ with open(os.path.join(outdir, "results.tsv"), "w") as f:
+ f.write("arm\tintent\tform\tstatus\tunknown_field_400\thits\tactions\tguess\n")
+ for r in rows:
+ f.write("\t".join(str(x) for x in (
+ r["arm"], r["intent"], r["form"], r["http_status"],
+ r["unknown_field_400"], r.get("hits", ""), ",".join(r["actions"]),
+ r["guess_field"])) + "\n")
+ print(json.dumps(summary, indent=1))
+
+
+if __name__ == "__main__":
+ main()