neuralmind.uk / NeuralMind v4.12.0 — retrieval that keeps what vector search finds: 93% hit@5 on the retrieval eval, 40 of 40 on the public benchmark, 13–14 ms queries Edit this page on GitHub ↗

NeuralMind v4.12.0 — retrieval that keeps what vector search finds: 93% hit@5 on the retrieval eval, 40 of 40 on the public benchmark, 13–14 ms queries

Type: Minor release Themes: ranking · what gets embedded · speed · JavaScript · fixes · measurement

An assessment of NeuralMind’s retrieval found one result that framed everything else: on the public benchmark, the embedding-rag baseline — NeuralMind’s own vector index, top 8, nothing added — matched or beat the full NeuralMind.query pipeline on gold-file recall on all four repositories, at fewer tokens. The layers on top of vector search were taking accuracy away.

Four things did it, and a fifth showed up once they were fixed:

v4.12.0 fixes each one. Every change was measured on the 150-question retrieval eval and the 40-query public benchmark. Each ranking default was then checked by putting it back one at a time.

The numbers

“v4.11.1” here and below is main just before this release’s retrieval change: v4.11.0 plus #612 and #619, neither of which changes retrieval. It was never published as a release of its own.

  v4.11.1 v4.12.0
Retrieval eval: hit@5, 150 questions over 5 repos 80.0% 93.3%
Retrieval eval: MRR 0.671 0.750
Retrieval eval: context tokens per question 930 830 (−11%)
Public benchmark: queries whose gold file is found, of 40 37 40
Public benchmark: fewer tokens than pasting every file 45–246× 51–242×
Faithfulness fixture: gold facts in the context (one machine) 0.559 0.839
Self-benchmark fixture: top-k hit rate / reduction (one machine) 75% / 5.1× 97% / 5.4×
Query latency, p50, four library repos (one machine, see below) 266–348 ms 13–14 ms
Query latency, p50 / p95, this repository (19.9k nodes, one machine) not measured 21 / 38 ms
Indexing this repository (19.9k nodes, one ONNX thread, one machine) 22 min 5.1 min

1. L3 ranks a pool of 20 and keeps eight

3. L2 shows this query’s candidates

4. What a node is embedded as

A method used to be embedded as:

Entity: send()
Type: code
File: sessions.py
Location: L673
Community: 3

It is now embedded as its qualified name, its module and its docstring:

Session.send()
In module sessions
Send a given PreparedRequest.

5. Speed

6. JavaScript repositories get code nodes

7. Fixes

8. Measurement

What the agent actually sees

The click question “how does echo print a message with a newline to stdout” (556 tokens):

## Relevant Code Areas

### Cluster 2 (relevance: 2.22)
- stdout() (code) — testing.py
- readline() (code) — testing.py
- STDOUT_HANDLE (code) — _winconsole.py
…
### Cluster 1 (relevance: 1.96)
- get_binary_stdout() (code) — _compat.py

## Search Results

1. **Print a message and newline to stdout or a file. …** (score: 1.00)
   Type: rationale
   File: utils.py

2. **_echo()** (score: 0.92)
   Type: code
   File: testing.py

3. **get_text_stdout()** (score: 0.64)
   Type: code
   File: _compat.py

4. **echo()** (score: 0.58)
   Type: code
   File: utils.py
…
8. **_default_text_stdout** (score: 0.33)
   Type: code
   File: _compat.py

Per-agent expectations

Agent What changes
Claude Code (hooks + MCP) neuralmind_query returns 8 search results and the query’s other candidates in L2; prompt-time recall and session hooks are unchanged
Cursor / Cline / Continue (MCP) The same neuralmind_query output; query_type still re-weights results when you pass it
Hermes-Agent plugin The same context through pre_llm_call
Generic MCP client The same; no tool, argument or response field changed

Settings

Variable Default What it does
NEURALMIND_L3_K 8 L3 search results per query (v4.11: 4)
NEURALMIND_L3_POOL 20 Fused candidates L3 is chosen from
NEURALMIND_L3_FILE_DECAY 0.6 Score kept by each further hit from a file L3 already shows; 1 turns the spread off
NEURALMIND_TEST_FILE_FACTOR 0.5 Score multiplier for test-file hits unless the question mentions tests; 1 turns it off
NEURALMIND_QUERY_LAYERS L0,L1,L2,L3 Layers a query returns
NEURALMIND_AUTO_INTENT_BOOST unset 1 re-weights hits by the intent detected from the question (v4.11 behaviour)
NEURALMIND_CODE_SIGNAL_CAP 1 (off) N turns the code-signal boost back on, up to N× (v4.11: 10)
NEURALMIND_ORT_SESSION_CACHE auto 1 reuses one ONNX session per process, 0 builds one per batch; auto reuses except on Python 3.14

Not measured, and where it still loses

Upgrading

Reproduce

git clone https://github.com/dfrostar/neuralmind && cd neuralmind
pip install -e . tiktoken
NEURALMIND_ORT_THREADS=1 python -m evals.public.run --out bench/public
NEURALMIND_ORT_THREADS=1 python -m evals.retrieval.run \
  --configs baseline,l3_k4,code_signal,auto_intent,l3_only,bm25_off,no_diversity,tests_equal \
  --out bench/retrieval/on-v4.12
python -m evals.retrieval.run --compare \
  bench/retrieval/vs-v4.11/results-v4.11.1.json bench/retrieval/vs-v4.11/results-v4.12.0.json

Also in this release: no turbovec store on a ChromaDB project

neuralmind build and neuralmind doctor each check whether the turbovec index was quarantined, which happens when the installed turbovec can’t read it. Both checks opened the turbovec store to do it, whatever backend the project uses, and opening it creates the file. So on a project with ChromaDB pinned, every build left an empty .neuralmind/neuralmind_turbovec/store.sqlite next to the real index in .neuralmind/neuralmind_db/, and doctor called that empty store “Index version compatible”. Both checks now run only when the project’s backend is turbovec.

CLI

Both checks resolve the backend the same way neuralmind build does: the backend: in neuralmind-backend.yaml, where auto, an empty value or no file all mean turbovec.

What the agent actually sees

Agent Before After
Claude Code (MCP + hooks) No change Same
Cursor / Cline / Claude Desktop (MCP) No MCP tool changed Same
Generic MCP client No MCP tool changed Same
Agents that run the CLI (Hermes skill, scripts) On a ChromaDB or in-memory project, doctor --json reported "Turbovec compatibility" as ok with "Index version compatible", and build created an empty turbovec store The same check is ok with "not applicable: the <backend> backend keeps no turbovec index", and build creates no turbovec store

An agent that gates on doctor --json’s status sees no difference: the check was ok before and is ok now. Only its detail text changed.

Environment variables

None added or changed.

Upgrade notes

None. No stored data changes shape, and no command takes new arguments.