LearnNewsExamplesConnect
Frontmatter
assigneesneo-fable-clio
createdAtNov 16, 2026, 3:58 AM
updatedAtNov 17, 2026, 2:14 AM
githubUrlhttps://github.com/neomjs/neo/issues/21089
authorneo-fable-clio
commentsCount5
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 17, 2026, 2:14 AM

Blog series part 3: RAG and grep, measured on the team's own questions

Closed v14.0.0/archive-v14-0-0-chunk-3 enhancementBlog Postai
neo-fable-clio
neo-fable-clio commented on Nov 16, 2026, 3:58 AM

Context

#20278 maps the memory series How an AI team remembers in eight parts. Parts 1 and 2 are published (#20226, #20562). The map gives part 3 its slice, "What the repository knows: a knowledge base for coding agents", and the Brain guide learn/agentos/KnowledgeBase.md as its source. #20278 §3 says each part gets its own ticket when its work starts; this is part 3's.

Re-planned on 2026-11-16 (this body replaces the first plan). The first plan led with a stale guide of June and with the ranking's weights. Cold reads by a reader with no context graded it 5, 6 and 6 of 10 and asked for one thing: the ranking measured against grep. neomjs/neo-agent-brain#1800 measured it the same day, the result contradicted the plan's premise ("why the obvious builds fall short"), and the repair of neomjs/neo-agent-brain#1820 merged that evening. The operator made the post a focus item at 21:05Z. The post now leads with the measurement.

The Problem

A coding agent on a repository with years of guides, tickets and pull requests has to find the file that answers its question. Whether an index or grep does that better is argued mostly without the reader's own questions. We held the same kind of belief about our own ranking until we measured it.

The novelty read of 2026-11-16 (two searches on RAG versus grep for coding agents) found comparisons on synthetic tasks and fixed snapshots. None of the pages found reports the questions a team's agents really asked, how much the rule that orders grep's files decides, what an index's age costs on the index as it is used, or a repair and a second run within the day. The post adds those, and a scorer the reader runs on their own repository.

The Architectural Reality

  • The measurement (neo-agent-brain at e27910789): 49 questions from kb_query_log with verified answer files (ai/scripts/diagnostics/fixtures/kbRankingQuestions.json), the runner ai/scripts/diagnostics/measureKbRanking.mjs, the report learn/agentos/measurements/kb-ranking-2026-11-16.md. Balanced 40, right file in the first five: nearest chunks 15, shipped ranking 26, ripgrep by summed count 10, ripgrep by distinct words 30. Indexed 34: 26 and 25. Unindexed 6: 0 and 5.
  • The repair (neomjs/neo-agent-brain#1806, pull request neomjs/neo-agent-brain#1820, merged 21:34Z as d3c614ffa8): the guide bonus is gated on a match and the base-class boost is bounded. Its receipt: 28 to 39 of 49. The same runner on the balanced 40 at that commit: 33; either the index or the sorted grep: 39; indexed 34: 32 and 25; unindexed 6: 1 and 5.
  • The BM25 check (16 Nov 22:05Z, script and output on neomjs/neo-agent-brain#1821): over the same 7,690 files and the runner's word list, BM25 scores 34 of 40 and 42 of 49; its two control orders reproduce the report's 30 and 10. BM25 and the repaired ranking miss disjoint questions: either finds all 40.
  • The index's age: source and guide rows were ingested on 6 to 14 Aug 2026; neomjs/neo-agent-brain#419 owns the replacement.
  • The June case: #14319 and pull request #14346.
  • Post mechanics: learn/blog/<slug>.md plus an entry in apps/portal/resources/data/blog.json; images in neomjs/pages under resources_pub/website/blog/<slug>/ (neomjs/pages#93).

The Fix

  1. learn/blog/codebase-knowledge-base-for-ai-coding-agents.md, with the series and part named on the first screen and a byline in the house identity form.
  2. Reader: an engineer who uses coding agents every day on a large codebase and has never heard of Neo. Hardest read: "one more vendor benchmark on its own repository." The answers: the post marks its in-sample numbers on the first screen, names its limits in a section of their own, and ends on sixteen lines of shell that score the same rule on the reader's code.
  3. Title: Codebase RAG vs grep for AI coding agents: the same grep hits scored 10, 30 or 34 of 40. Its form (the result as numbers after the search term) was the cold reader's first pick of five, twice; the BM25 row extended it.
  4. The arc: what we tested; the same grep hits ranked three ways, with a shell function and a BM25 script; the two bugs the test found in our index and their fix the same evening; where lexical and semantic search miss different questions, split by freshness and by question style; limits, with the June case as the one thing no search measures; how the reader scores their own search.
  5. Visuals: a cover (five bars), a hit grid of the 40 questions (neomjs/pages#93) and one Mermaid diagram with its PNG for the Medium import.
  6. A blog.json entry with the part label; parts 1 and 2 link part 3 in their series lists.

Acceptance Criteria

  • AC-1: The post names its series and part on the first screen and says what Neo.mjs is and who is accountable for a merge.
  • AC-2: Every number names or links its receipt: the report at a pinned commit, the second run's command and commits, neomjs/neo-agent-brain#1820, #14319, #14346.
  • AC-3: The closing says what Neo.mjs is in the README's words, carries one call to action and links the Engine and the Brain repositories.
  • AC-4: A cover and one figure, render-verified at #/news/blog/<id>; the cover's 3:2 crop and the card crop are checked.
  • AC-5: The blog.json entry carries the part label, and parts 1 and 2 link part 3.
  • AC-6: A cold read of 9 of 10 or better by a reader with no context before any review is requested (neomjs/neo-agent-skills#409). Amended on 2026-11-16 at 22:30Z, a direction taken under Nightshift: six cold reads stand at 5 to 6, the sixth says "publish as it stands: yes", and what separates them from 9 is new evidence (neomjs/neo-agent-brain#1821), so the reviews are requested below the bar and the operator's gates decide (the merges of neomjs/pages#94 and of the pull request, and the Medium click). Then at least two model reviews, one from a family other than the author's: one reads as a stranger and runs the title test and the Try-It test; a seat that did not draft the claims runs one fact check at the final version. The operator approves last.
  • AC-7: The three scripts are run as printed, and their scores on the fixture are in the pull request's Test Evidence.
  • AC-8 (post-merge): the static URL resolves before any cross-post links it.

Out of Scope

  • The Medium import and the social posts, which the operator publishes.
  • Parts 4 to 8, which get their own tickets.
  • New evidence: a re-ingested index, a held-out set of new questions, a BM25 arm in the committed runner, an agent-in-the-loop comparison, a run on a codebase that is not ours. The post names them as limits; neomjs/neo-agent-brain#1821 owns the first three.
  • Changes to the Knowledge Base itself.

Avoided Traps

  • Our failure as the headline (the operator's read of Nov 16). The title states a result the reader can use; the 26 is inside, with its repair.
  • A ranking tour. The weights are one sentence. The post is about the measurement and what it changed.
  • Hiding the choices made after the first score. They are marked under the first table and again under Limits.

Related

#20278 (series map), #20226 (part 1), #20562 (part 2), #14319, #14346, neomjs/neo-agent-brain#1800, neomjs/neo-agent-brain#1806, neomjs/neo-agent-brain#1820, neomjs/neo-agent-brain#419, neomjs/neo-agent-brain#1821, neomjs/pages#93, neomjs/neo-agent-skills#409

Decision Record impact: none.

Ownership: self-assigned. No contributor labels, because the series' author seat is assigned.

Live latest-open + closed sweep: latest 20 open (62 open, red band; the series map #20278 is closed and no open ticket or epic owns part 3) plus closed searches (knowledge base blog post, part 3, stale guide knowledge base cited; Out of Scope read on #20278) at 2026-11-16T02:57Z; no equivalent or prior exclusion. A2A: no claim on a part 3 or a Knowledge Base post in the last 30 lane claims. MC sweep (Knowledge Base repeating a stale guide … memory series part 3): no prior claim or decision. Own open assignments (#20874, #20726, #20682, #20498): none overlapping. The re-plan of 2026-11-16 amends this body in place and files no new ticket.

Origin Session ID: 3ad31d0c-550b-490a-a371-408e19d95366 (re-planned in 76a8cf2d-14b8-426b-b8f1-9c3199c15c76)

Retrieval Hint: "memory blog series part 3 RAG versus grep measured sort order distinct words index age repair"