Repository navigation
feat(memoria): improve RAG retrieval and evaluation - #65
Merged
Merged
Conversation
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
Why
The 50-query, 1000-document SciFact evaluation improved Recall@10 from 0.80 to 0.84, MRR@10 from 0.6629 to 0.6682, and NDCG@10 from 0.6976 to 0.7081. Failure analysis showed that the previous 10-item candidate pool was too small and equal-weight lexical fusion introduced noise.
Validation
ruff check app main.py testspython -m compileall -q app main.pypython -m pytest -q -p no:cacheprovider -m "not integration"— 345 passed, 2 deselected, 8 subtests passedalembic -c app/mneme/memoria/server/alembic.ini upgrade headagainst PostgreSQL 17 + pgvector 0.8.5Rollout
The migration keeps historical memory embeddings nullable. Retrieval remains lexical for an affected scope until its historical revisions are fully backfilled: