You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(memory-router): augmented routing for backend × retrieval-config dispatch
Adds the data plumbing and the MemoryRouter integration for per-query
dispatch on a composite (backend × retrieval-config) key, calibrated
from the 2026-04-26 LongMemEval-M Phase A N=54 ablation matrix.
New primitives:
- RetrievalConfigRouter (retrieval-config.ts): six retrieval-config
variants spanning HyDE × top-K × rerank-multiplier with per-category
accuracy/cost tables and the M-tuned per-category dispatch table.
selectBestRetrievalConfig + computeOracleAggregate forecast the
per-category-oracle aggregate (68.5% on M Phase A, vs 57.4% static
M-tuned).
- MemoryDispatchKey + AugmentedRoutingTable + selectAugmentedDispatch
(routing-tables.ts): composite dispatch key extending the legacy
MemoryBackendId axis with a RetrievalConfigId axis, the
MINIMIZE_COST_AUGMENTED_TABLE preset (S backend choices crossed with
M retrieval-config choices, every cell empirically justified), and
the pure SAFE_FALLBACK_DISPATCH_KEY guard.
- MemoryRouter.decideAugmented + decideAndDispatchAugmented: classify
the query, resolve the composite dispatch key, optionally dispatch
through IMemoryDispatcher with retrievalConfig threaded to the
executor as the third-arg MemoryBackendExecutorContext.
- Dispatcher contract: optional retrievalConfig field on
MemoryDispatchArgs; FunctionMemoryDispatcher forwards it as the
third executor arg only when set, preserving the legacy two-arg
call shape for existing executors.
Tests: 65 new contract tests across retrieval-config, augmented
routing primitives, and augmented MemoryRouter integration. Full
memory-router suite at 154/154; existing dispatch + classifier
behavior unchanged.
Spec: packages/agentos-bench/docs/specs/2026-04-26-retrieval-config-router-productionization-plan.md
Phase 1 + Phase 2 of the productionization plan; Phase 3 (bench
wiring + Phase A validation) follows.
0 commit comments