Skip to content

B1: Symbolic drawer index over verbatim + micro-benchmark gate (flagged) #12555

Closed

Description

@mrveiss

Part of #12551 (Gap B). Conditional — merged flag-on only if the benchmark wins.

Add a MemPalace-style symbolic pre-index to memory/verbatim_store.py so narrow-scope recall can skip a full vector scan.

Scope

  • On VerbatimStore.append: extract salient entities/keywords and write an inverted entity/keyword → chunk_id index + a coarse 'drawer' grouping (session/entity) in Redis ('knowledge' DB).
  • New optional search path: resolve candidate drawers symbolically, then vector-rerank within them (fall back to current full path on miss).
  • Behind flag AUTOBOT_VERBATIM_SYMBOLIC_INDEX (default off).
  • Ship a micro-benchmark (fixed corpus) comparing latency + recall@k: symbolic-prefilter vs current path.

Gate (hidden-cost)

Merge flag-on ONLY if recall-neutral (no regression) AND latency improves. Otherwise land flag-off and record the benchmark numbers on this issue as the rationale.

Acceptance

  • Index stays consistent across append + delete_session.
  • Benchmark posted with numbers.
  • Flag-off path byte-identical to today.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions