[perf] TOPK_RETRIEVE=60 dilutes 1-hop graph neighbours on small vaults (bridge Recall@12 0.066 at topk=60 -> 0.141 at topk=20 -> 0.267 at topk=10)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading retrieve_candidates, expand_1hop, and the TOPK_RETRIEVE/GHOPS settings; the issue does not name their files. Reproduce the reported sweep with eval/build_gold.py bench/vault --n-per-class 30 --seed 42 and compare bridge Recall@12 and 1-hop slots. Done means choosing and implementing a retrieval-pool adjustment, then showing before-and-after evaluation results.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What
Following up on @tonydzi's observation in https://github.com/tonydzi/sqlite-graph-memory/pull/86#issuecomment-6612611484:
"the
topk-20bridge result (Recall@12 0.068 to 0.141) is worth its own issue: on a small vault a 60-note pool may be drowning the graph neighbours."
We swept topk in [10, 15, 20, 30, 40, 60, 80] across the 100-question bench/vault gold set (eval/build_gold.py bench/vault --n-per-class 30 --seed 42; 202 notes / 204 chunks) for both 0-hop (vector) and 1-hop (graph) and measured both the candidate pool composition and how many 1-hop graph neighbours survive into the cross-encoder's top-12.
Measured Curve on bench/vault (100 gold questions: 30 title, 30 body, 30 bridge, 10 temporal)
1. bridge (n=30) & overall (n=100) Recall@12 / MRR / nDCG@12 across topk
topk |
bridge 0-hop (R@12 / MRR / nDCG@12) |
bridge 1-hop (R@12 / MRR / nDCG@12) |
bridge ΔRecall@12 |
bridge ΔnDCG@12 |
overall 0-hop (R@12 / MRR / nDCG@12) |
overall 1-hop (R@12 / MRR / nDCG@12) |
overall ΔnDCG@12 |
|---|---|---|---|---|---|---|---|
| 10 | 0.130 / 0.086 / 0.073 |
0.267 / 0.154 / 0.155 |
+0.137 |
+0.082 |
0.739 / 0.652 / 0.667 |
0.770 / 0.670 / 0.687 |
+0.020 |
| 15 | 0.136 / 0.092 / 0.077 |
0.179 / 0.125 / 0.106 |
+0.043 |
+0.030 |
0.731 / 0.650 / 0.663 |
0.744 / 0.659 / 0.671 |
+0.008 |
| 20 | 0.091 / 0.072 / 0.055 |
0.141 / 0.107 / 0.085 |
+0.050 |
+0.029 |
0.717 / 0.644 / 0.657 |
0.732 / 0.653 / 0.664 |
+0.008 |
| 30 | 0.069 / 0.081 / 0.047 |
0.075 / 0.081 / 0.052 |
+0.006 |
+0.005 |
0.711 / 0.647 / 0.654 |
0.712 / 0.645 / 0.654 |
+0.000 |
| 40 | 0.075 / 0.084 / 0.050 |
0.075 / 0.081 / 0.051 |
+0.000 |
+0.001 |
0.713 / 0.646 / 0.653 |
0.712 / 0.645 / 0.654 |
+0.000 |
| 60 | 0.068 / 0.074 / 0.045 |
0.066 / 0.076 / 0.047 |
-0.002 |
+0.001 |
0.711 / 0.643 / 0.652 |
0.710 / 0.644 / 0.652 |
+0.000 |
| 80 | 0.066 / 0.075 / 0.047 |
0.066 / 0.075 / 0.047 |
+0.000 |
+0.000 |
0.710 / 0.643 / 0.652 |
0.710 / 0.643 / 0.652 |
+0.000 |
(No other class degrades when shrinking topk from 60 to 10..20: title stays at 1.000 / 1.000 / 1.000, temporal stays at 1.000 / 0.700 / 0.779, and body improves slightly from 0.967 / 0.836 / 0.868 at topk=60 to 0.967 / 0.844 / 0.875 at topk=10.)
2. Candidate Pool & Top-12 Composition on bridge (n=30, 1-hop)
topk |
base Pool |
Distractor meeting-* in base (of 40) |
1-hop Added (added) |
Gold Share in base |
Gold Share in added (1-hop) |
Total Gold Share in base ∪ added |
Top-12 meeting-* Slots |
Top-12 1-hop (+graph) Slots |
Top-12 Gold Hits (notes) |
|---|---|---|---|---|---|---|---|---|---|
| 10 | 10.00 | 3.77 / 40 (9.4%) | 35.10 | 0.130 | 0.837 | 0.967 | 2.63 | 3.87 | 1.47 |
| 15 | 15.00 | 5.97 / 40 (14.9%) | 39.53 | 0.195 | 0.772 | 0.967 | 3.17 | 2.67 | 1.03 |
| 20 | 20.00 | 8.13 / 40 (20.3%) | 38.90 | 0.255 | 0.711 | 0.967 | 3.53 | 1.87 | 0.80 |
| 30 | 30.00 | 12.83 / 40 (32.1%) | 38.10 | 0.334 | 0.633 | 0.967 | 3.87 | 0.90 | 0.43 |
| 40 | 40.00 | 17.30 / 40 (43.3%) | 37.17 | 0.451 | 0.519 | 0.971 | 3.77 | 0.67 | 0.43 |
| 60 | 60.00 | 23.73 / 40 (59.3%) | 34.77 | 0.600 | 0.375 | 0.975 | 3.73 | 0.27 | 0.40 |
| 80 | 80.00 | 29.67 / 40 (74.2%) | 32.27 | 0.685 | 0.294 | 0.979 | 3.70 | 0.07 | 0.40 |
Root Cause
- Candidate recall is already saturated at
topk=10(96.7%of all goldbridgelink targets are inbase ∪ added:13.0%frombase+83.7%viaexpand_1hop). - Dense pool dilution on small vaults: On a 202-note vault,
TOPK_RETRIEVE = 60scoops 30% of the entire vault intobasebeforeexpand_1hopeven runs (94.77 / 202 = 46.9%of the vault inbase + added). Thatbasepool pulls in23.73 / 40(59.3%) of the vault's distractormeeting-*.mdnotes plus dozens of unlinked notes from dense ranks16..60that share template phrasing with the query paragraph. - Cross-encoder false positives crowd out 1-hop entity cards: Because
rerank_candidatesscores(query, title + '. ' + snippet)purely by pairwise text similarity without knowing whether a candidate came from top dense ranks, tail dense ranks (16..60), or a 1-hop[[wikilink]]from the #1 hit, unlinked tail candidates crowd out concise 1-hop target cards — dropping1-hopslots in the top-12 from3.87(topk=10) and1.87(topk=20) down to0.27(topk=60).
Options to Consider
- Vault-proportional cap on
retrieve_candidates(e.g., capping the default dense pool atmin(TOPK_RETRIEVE, max(15, n_unique_files // 10))whentopkis not explicitly overridden), so a 200-note vault does not feed half the corpus into the cross-encoder while a 2,000+ note vault still uses60. - Aligning
--graphdense pool withGHOPS = 15(or20), sinceexpand_1hoponly expands outgoing links frombase_order[:ghops](15seeds) anyway —base_order[15:60]never seeds the graph hop.
Happy to take this on and run the before/after eval tables once you decide which direction you prefer!
— TangleClaw'd by Jason Vaughan
Human-directed. Agent-executed. Evidence-backed.
TangleClaw.com
- Lingua principale
- Python
- Stelle
- 9
- Fork
- 6
- Merge medio
- 13h 8m
- PR unite (30g)
- 40
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tonydzi/sqlite-graph-memory
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
tonydzi/sqlite-graph-memory#133 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
tonydzi/sqlite-graph-memory#131 ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
tonydzi/sqlite-graph-memory#132 ·
I maintainer di solito rispondono entro 1 giorno
-
sgm-index on a mistyped or empty folder overwrites the existing index with an empty one and exits 0Apertabug good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
tonydzi/sqlite-graph-memory#130 ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
tonydzi/sqlite-graph-memory#126 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di tonydzi/sqlite-graph-memory
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
LearningCircuit/local-deep-research#10161 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
chore: contact address [email protected]Forse già presa @larsrollik l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Gustavo-Galvao-e-Silva/panchi#228 ·
I maintainer di solito rispondono entro 1 giorno