bench: add distilled-knowledge retrieval corpus (30 docs, 30 QA pairs)#1111
Open
LavaDMan wants to merge 2 commits intoMemPalace:developfrom
Open
bench: add distilled-knowledge retrieval corpus (30 docs, 30 QA pairs)#1111LavaDMan wants to merge 2 commits intoMemPalace:developfrom
LavaDMan wants to merge 2 commits intoMemPalace:developfrom
Conversation
All existing benchmarks test episodic memory (conversational recall). This adds a benchmark for semantic/procedural memory: retrieving engineering constraints, architectural decisions, and system invariants from prose documents — the kind of knowledge engineers capture in runbooks and ADRs. Results on raw ChromaDB baseline (all-MiniLM-L6-v2, n=30): Recall@1: 76.7% (23/30) Recall@5: 100% (30/30) Self-contained — no external data download required. Corpus is embedded in the script. See benchmarks/distilled_knowledge/README.md for full methodology notes.
Replace internal names with generic equivalents: - injection_scan_score → security_scan_score - vram_mutex parenthetical removed (Redis lock kept) - complete_mandate_task → a completion handler - authorized_ring filter → access-ring filter Engineering principles remain intact; no AEGIS project name changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All existing benchmarks test episodic memory — conversational recall
(LongMemEval, LoCoMo, MemBench, ConvoMem). This PR adds a benchmark for a
different memory category that currently has no coverage:
Semantic / procedural memory — retrieving engineering constraints,
architectural decisions, and system invariants from prose documents. The kind of
knowledge engineers distill into runbooks, architecture decision records, and
internal wikis.
What's in this PR
benchmarks/distilled_knowledge_bench.py— self-contained benchmark script(no external data download; corpus embedded in the file)
benchmarks/distilled_knowledge/README.md— methodology and resultsbenchmarks/BENCHMARKS.md— updated to document the new benchmarkCorpus: 30 prose documents covering cross-cutting engineering constraints:
concurrency / locking, database driver gotchas, package security gates, process
isolation, lifecycle state management, and error handling edge cases.
QA pairs: 30 paraphrased queries. Question wording deliberately avoids the
exact vocabulary in the target document to test semantic similarity, not keyword
matching. Each pair includes a
paraphrase_notedocumenting the specificvocabulary shift.
Results on raw ChromaDB baseline
Measured with MemPal v3.3.x, ChromaDB ephemeral client, default
all-MiniLM-L6-v2embeddings:Recall@5 is perfect — every correct document appears in the top-5. The ~23pp
gap to Recall@1 is consistent with the pattern seen on LongMemEval and LoCoMo;
hybrid retrieval or reranking would likely push R@1 into the 90s.
How to run
# No data download needed python benchmarks/distilled_knowledge_bench.py python benchmarks/distilled_knowledge_bench.py --top-k 1 --verboseRelation to existing benchmarks
This is additive, not critical of the existing suite:
Real production systems accumulate both types. A memory system that handles
episodic recall perfectly but cannot retrieve "why do we use file locks instead
of asyncio.Lock?" is incomplete for agentic use cases.
🤖 Generated with Claude Code