neuralmind.uk / NeuralMind v4.5.0 — numbers you can trust, measured on your project Edit this page on GitHub ↗

NeuralMind v4.5.0 — numbers you can trust, measured on your project

Type: Minor release Theme: measurement

v4.4.0 made the index trustworthy. v4.5.0 makes the numbers NeuralMind prints about a project mean something, and keeps them comparable from run to run:

  1. The index covers what git covers. .gitignore is honoured by default.
  2. Measuring doesn’t train. Queries can be read-only, and every measurement command is.
  3. One eval, one baseline. neuralmind eval . scores retrieval against gold answers you write for your repo, keeps a history, and every reduction ratio now divides by the measured size of your code instead of a fixed 50K guess.

It also stops a cost a new benchmark turned up: through v4.4.0, the Read, Bash and Grep hooks sold as tool-output compression added tokens instead of saving them (section 5).

1. .gitignore is honoured by default

On a real repository, gitignored projects/ copies of examples/ were indexed: the same symbols ranked twice and pushed real hits out of the four-slot search layer.

Opt out or widen it in .neuralmind.yaml:

respect_gitignore: false          # index ignored files again (v4.4 behaviour)
include_ignored:                  # or pull specific ignored paths back in
  - "generated/api/**"

Git can’t re-include a file under an excluded directory. To ignore a directory except one file, write projects/* then !projects/keep.py, not projects/ — NeuralMind follows git here, exactly.

2. Read-only queries

Every query normally reinforces the synapse layer. That is the point in daily use, and exactly wrong for measurement: an eval run weekly would strengthen the very edges it measures.

Verified: 100 read-only queries leave synapses.db and its WAL byte-identical, and return the same context as a learning query on the same database.

3. neuralmind eval . — your questions, your gold files

Write the questions your team actually asks, with the file that answers each, in .neuralmind.eval.yaml at the repo root, and commit it:

- q: How are refunds issued when an order is cancelled?
  gold: [app/refunds.py]
neuralmind eval .                    # run it (read-only), append to the history
neuralmind eval . --report           # the history as a markdown table
neuralmind eval . --show-questions   # include each question, gold file and rank
neuralmind eval . --suggest --write  # draft 10 questions to edit

Example output (illustrative numbers):

NeuralMind eval — myrepo (10 questions, read-only)
  hit@1 40% · hit@5 60% · MRR 0.50
  avg context 1,180 tokens · 6.2× vs gold files · 1,101.3× vs all indexed code (1,299,512 tokens, measured)

4. One baseline everywhere

Before v4.5.0, on the same repo, benchmark divided by a fixed 50,000-token guess (on a ~1.3M-token repo), build --dry-run used a lines × 25 estimate, and probe resampled whenever the index changed: three commands, three baselines, no two runs comparable.

Expect different ratios. On a large repo the measured baseline is far bigger than 50K, so ratios go up; on a small one they go down. Neither is a change in retrieval — it’s the numerator becoming true. On psf/requests v2.32.3 the same five questions read 41.8× against the fixed estimate and 78.6× against the 94,069 tokens of code the index covers.

Stable probe sampling

probe now ranks symbols by a hash of (seed, node id) and keeps the lowest --sample-size, instead of a seeded random draw over the current index. An unchanged symbol stays in the sample across rebuilds (two runs either side of a 5% index change share ≥ 90% of their sample), and --baseline compares only the symbols both runs sampled, reporting how many were added or dropped.

5. The Read, Bash and Grep hooks stop adding tokens

The Read, Bash and Grep PostToolUse hooks were described as compressing tool output “before the agent sees it”. A new benchmark that follows Claude Code’s documented hook protocol shows they never did: Claude Code adds a hook’s additionalContext next to the tool result rather than replacing it, so Claude got the full output plus NeuralMind’s compressed copy.

Tool call Calls Tokens, no hook Tokens, v4.3.4 hooks Change
Read (whole file) 136 597,002 597,002 +0.0%
Bash 16 32,581 38,296 +17.5%
Grep, content mode 48 55,800 68,113 +22.1%
Grep, files_with_matches (default) 48 2,062 2,062 +0.0%

Measured on v4.3.4; v4.3.5 and v4.4.0 shipped the same hooks.

Method, per-command results and raw data: docs/benchmarks/compression.md · bench/compression/results-v4.3.4.json.

What changed

Not changed

New in the repo

What the agent actually sees post-install

Agent Before After
Claude Code (MCP + hooks) Indexed gitignored copies; every query and hook taught the synapse layer, including eval scripts; Bash and content-mode Grep results were followed by a system reminder holding NeuralMind’s copy of the same output Index covers what git covers; learn: false and NEURALMIND_NO_LEARN=1 give read-only queries; hooks skip learning under the env switch; the Read/Bash/Grep hooks add nothing to a tool result
Cursor / Cline / Continue (MCP) Same indexing; no way to query without training Same indexing fix; learn: false on neuralmind_query / neuralmind_search
Generic MCP client neuralmind_query always wrote Read-only on request; the tool schema documents learn
CI benchmark numbers against a fixed 50K; evals trained on themselves neuralmind eval . read-only with history; NEURALMIND_NO_LEARN=1 for the whole job

Upgrade notes