-
Notifications
You must be signed in to change notification settings - Fork 94
feat(recall): add min_score threshold and adaptive floor filtering (#73) #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bf39116
feat(bench): add health check, baseline results, and fix eval harness
jack-arturo 3896311
feat(recall): add min_score threshold and adaptive floor filtering (#73)
jack-arturo 82b1c3d
docs: update experiment log with #73 results
jack-arturo 7b43f24
fix(recall): address score-filter review findings
jack-arturo 8897cf8
chore(merge): resolve conflicts with main
jack-arturo fcbe5c5
fix(bench): align locomo-mini counts and normalize dates to UTC
jack-arturo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Docs Dispatch | ||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| check-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Get changed files | ||
| id: changed | ||
| run: | | ||
| BASE_SHA="${{ github.event.before }}" | ||
| HEAD_SHA="${{ github.event.after }}" | ||
|
|
||
| if [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then | ||
| BASE_SHA=$(git rev-list --max-parents=0 "$HEAD_SHA") | ||
| fi | ||
|
|
||
| FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" | jq -R -s -c 'split("\n") | map(select(. != ""))') | ||
| echo "files=$FILES" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Check file-doc mapping | ||
| id: check | ||
| run: | | ||
| MAP=$(curl -sf "https://raw.githubusercontent.com/verygoodplugins/automem-website/main/scripts/file-doc-map.json") | ||
| if [ $? -ne 0 ]; then | ||
| echo "Failed to fetch file-doc-map.json, skipping" | ||
| echo "affected=none" >> $GITHUB_OUTPUT | ||
| exit 0 | ||
| fi | ||
|
|
||
| REPO_KEY="${{ github.event.repository.name }}" | ||
| CHANGED='${{ steps.changed.outputs.files }}' | ||
|
|
||
| AFFECTED=$(echo "$MAP" | jq -r --arg repo "$REPO_KEY" --argjson changed "$CHANGED" ' | ||
| def matches_pattern($file; $pattern): | ||
| if ($pattern | endswith("/**")) then | ||
| ($file | startswith($pattern[0:-3])) | ||
| else | ||
| $file == $pattern | ||
| end; | ||
|
|
||
| .[$repo] // {} | to_entries | map( | ||
| select(.key as $pattern | $changed | any(. as $file | matches_pattern($file; $pattern))) | ||
| ) | map(.value) | flatten | unique | .[] | ||
| ') | ||
|
|
||
| if [ -z "$AFFECTED" ]; then | ||
| echo "affected=none" >> $GITHUB_OUTPUT | ||
| else | ||
| AFFECTED_JSON=$(echo "$AFFECTED" | jq -R -s -c 'split("\n") | map(select(. != ""))') | ||
| echo "affected=$AFFECTED_JSON" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Dispatch to automem-website | ||
| if: steps.check.outputs.affected != 'none' | ||
| uses: peter-evans/repository-dispatch@v3 | ||
| with: | ||
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | ||
| repository: verygoodplugins/automem-website | ||
| event-type: docs-update | ||
| client-payload: | | ||
| { | ||
| "source_repo": "${{ github.event.repository.full_name }}", | ||
| "source_sha": "${{ github.event.after }}", | ||
| "changed_files": ${{ steps.changed.outputs.files }}, | ||
| "affected_docs": ${{ steps.check.outputs.affected }}, | ||
| "commit_url": "${{ github.event.head_commit.url }}", | ||
| "compare_url": "${{ github.event.compare }}" | ||
| } | ||
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # AutoMem Experiment Log | ||
|
|
||
| Tracks recall quality experiments with before/after benchmark results. | ||
|
|
||
| **Baselines** are created with Voyage 4 embeddings (`EMBEDDING_PROVIDER=voyage`, `VECTOR_SIZE=1024`) | ||
| on the snapshot-based bench infrastructure (PR #97, merged 2026-03-02). | ||
|
|
||
| ## Tiered Benchmarking | ||
|
|
||
| | Tier | Benchmark | Runtime | Cost | When to use | | ||
| |------|-----------|---------|------|-------------| | ||
| | 0 | `make test` (unit) | 30s | free | Every change | | ||
| | 1 | `locomo-mini` (2 convos, 198 Qs) | 2-3 min | free | Rapid iteration | | ||
| | 2 | `locomo` (10 convos, 1986 Qs) | 5-10 min | free | Before merge | | ||
| | 3 | `longmemeval-mini` (20 Qs) | 15 min | ~$1 | Scoring/entity changes | | ||
| | 4 | `longmemeval` (500 Qs) | 1-2 hr | ~$10 | Milestones only | | ||
|
|
||
| ## Results | ||
|
|
||
| | Date | Issue/PR | Branch | LoCoMo-mini | LoCoMo-full | LME-mini | Notes | | ||
| |------|----------|--------|-------------|-------------|----------|-------| | ||
| | 2026-03-02 | baseline | main | 76.97% (234/304) | 80.06% (1590/1986) | -- | Voyage 4, 1024d. Health: DEGRADED (low score variance) | | ||
| | 2026-03-02 | #73 | exp/73-min-score-threshold | 76.97% (+0.0) | -- | -- | min_score + adaptive floor. No regression. Needs #78 for impact | | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## How to add an entry | ||
|
|
||
| 1. Run the benchmark: `make bench-eval BENCH=locomo-mini CONFIG=baseline` | ||
| 2. Record the overall accuracy from the output JSON | ||
| 3. Add a row to the table above with the date, issue/PR, branch, and scores | ||
| 4. For deltas, show as `XX.X% (+Y.Y)` relative to the baseline row | ||
|
|
||
| ## Snapshot metadata | ||
|
|
||
| | Snapshot | Created | Git SHA | Embedding | Memories | | ||
| |----------|---------|---------|-----------|----------| | ||
| | locomo-mini | 2026-03-02 | main @ 80a6f93 | voyage:voyage-4 1024d | 788 (2 convos) | | ||
| | locomo | 2026-03-02 | main @ 80a6f93 | voyage:voyage-4 1024d | 5828 (10 convos) | | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| { | ||
| "overall": "DEGRADED", | ||
| "timestamp": "2026-03-02T11:19:03Z", | ||
| "base_url": "http://localhost:8001", | ||
| "checks": [ | ||
| { | ||
| "check": "score_distribution", | ||
| "verdict": "WARN: low score variance \u2014 weak differentiation", | ||
| "total_scores": 50, | ||
| "global_stats": { | ||
| "min": 0.2093, | ||
| "max": 0.4506, | ||
| "mean": 0.3562, | ||
| "stddev": 0.0497, | ||
| "spread": 0.2413 | ||
| }, | ||
| "latency": { | ||
| "p50_ms": 504.3, | ||
| "p95_ms": 715.2, | ||
| "mean_ms": 541.6 | ||
| }, | ||
| "per_query": [ | ||
| { | ||
| "query": "What was discussed about authentication and security?", | ||
| "count": 10, | ||
| "scores": { | ||
| "min": 0.2903, | ||
| "max": 0.3311, | ||
| "mean": 0.2982, | ||
| "spread": 0.0408 | ||
| }, | ||
| "latency_ms": 504.3, | ||
| "query_time_ms": 489.8 | ||
| }, | ||
| { | ||
| "query": "Tell me about the birthday party last weekend", | ||
| "count": 10, | ||
| "scores": { | ||
| "min": 0.3719, | ||
| "max": 0.4156, | ||
| "mean": 0.3871, | ||
| "spread": 0.0437 | ||
| }, | ||
| "latency_ms": 461.4, | ||
| "query_time_ms": 452.16 | ||
| }, | ||
| { | ||
| "query": "What programming languages does the team use?", | ||
| "count": 10, | ||
| "scores": { | ||
| "min": 0.3589, | ||
| "max": 0.413, | ||
| "mean": 0.379, | ||
| "spread": 0.054 | ||
| }, | ||
| "latency_ms": 483.5, | ||
| "query_time_ms": 473.6 | ||
| }, | ||
| { | ||
| "query": "Plans for the upcoming vacation trip", | ||
| "count": 10, | ||
| "scores": { | ||
| "min": 0.3952, | ||
| "max": 0.4506, | ||
| "mean": 0.41, | ||
| "spread": 0.0554 | ||
| }, | ||
| "latency_ms": 715.2, | ||
| "query_time_ms": 706.11 | ||
| }, | ||
| { | ||
| "query": "Recent decisions about database architecture", | ||
| "count": 10, | ||
| "scores": { | ||
| "min": 0.2093, | ||
| "max": 0.3287, | ||
| "mean": 0.3066, | ||
| "spread": 0.1194 | ||
| }, | ||
| "latency_ms": 543.5, | ||
| "query_time_ms": 533.7 | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "check": "entity_quality", | ||
| "verdict": "OK: 0.0% garbage (0/32)", | ||
| "sampled_memories": 30, | ||
| "memories_with_entities": 26, | ||
| "memories_without_entities": 4, | ||
| "total_entity_tags": 32, | ||
| "garbage_tags": 0, | ||
| "garbage_pct": 0.0, | ||
| "garbage_examples": [] | ||
| }, | ||
| { | ||
| "check": "cross_query_overlap", | ||
| "verdict": "OK: different queries return different results", | ||
| "overlap_pairs": 0, | ||
| "total_pairs": 3, | ||
| "query_results": { | ||
| "What was discussed about authentication ": [ | ||
| "4dafb907-0779-4085-8058-90a9ff97e858", | ||
| "c711668b-b70f-4bd9-b12a-5f4e587100fe", | ||
| "90021543-0f07-4572-b5a3-870a9aed9f63", | ||
| "4b34c8e0-31ee-41f1-ad2d-b8c74c2fb713", | ||
| "7997eb95-e7f8-42fa-8960-1f0d9cf2be58" | ||
| ], | ||
| "Tell me about the birthday party last we": [ | ||
| "25fef83e-5a6a-4798-8dd3-2cb10d2dc7a0", | ||
| "eb1d8f46-bb8f-4539-90e9-27ef9f769fc7", | ||
| "1bd67e29-77e0-400a-8aeb-69161c957cc7", | ||
| "72feb3cf-0f35-4593-8476-8b2c79dc0319", | ||
| "0f889be1-3406-4afb-aba0-c534e044d03f" | ||
| ], | ||
| "What programming languages does the team": [ | ||
| "fc05eb7e-b9c4-4ea4-a63a-43f553da9730", | ||
| "928bdcd7-0f89-4fe2-8053-54375e199555", | ||
| "1bdf3cc4-bbf7-462f-8050-cb957f8dbc26", | ||
| "b32e87a8-b064-46fa-bc70-53c01dbaab3d", | ||
| "955e3c23-728f-4b4d-bfdc-a433631bc261" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.