← All evidence
P-006 · Memory Grounding

Real symbols. Real citations. Sub-second.

Live Reproducible

Agents reason from real symbols with file path, line range, and relevance score — not from text excerpts a model "remembers." Hybrid FTS + vector search at ~1.2s p50; up to 1,479 RPS at 2,000 concurrent in keyword mode.

Source of truth

FAFO Memory's search_code over an AST-chunked code index. Real query captured against an index with 5,447 documents.

Mechanism

Source is parsed at index time and chunked by AST node. Each chunk is embedded + indexed for FTS. At query time, hybrid_search runs FTS and vector in parallel, fuses the rankings via weighted RRF, and returns chunks with full citation metadata. The substrate is recursive: it indexes its own implementation.

Evidence
$ search_code(
    query = "hybrid search by intent, not string match",
    index = "your-codebase"
  )

  → 8 ranked hits across rust + typescript
  → top result: hybrid_search() at code_search/search.rs
    "FTS + vector search with file-level grouping"
  → score: 0.034 (highest), 0.017 (lowest)
  → latency: ~1.2s p50 semantic mode
  → throughput: 1,271–1,479 RPS @ 2,000 concurrent (keyword mode)

  Every hit: file path · line range · language · score · code excerpt.
  Agents reason from this, not from what the model "remembers."
Reproduction
Source artifact
your AST-chunked code index in FAFO Memory
Command
search_code(query=<intent>, index=<your-codebase>)
Expected output
ranked chunk hits with file path · line range · language tag · score · code excerpt
Verification
pick any result; open the file at the cited line; confirm the chunk matches
Caveats
Latency varies by index size + query mode. The ~1.2s p50 figure is for semantic mode on a working-code index; keyword mode is far faster. Throughput envelope (1,271–1,479 RPS) is from the published Gate 9.5 bench at 2,000 concurrent.