Conversation
Contributor
|
Claude Code Review — skipped: PR author 'arkash20' is not a public member of the 'caura-ai' org |
pm-0918-c-01 claims PersonaMem's 85.4% was scored against a store still enriching: migration 034 put `title` in `memories.search_vector` and widened the trigger to `UPDATE OF content, title`, so a deferred enrichment title rebuilds that row's vector after it is already searchable and reorders it against its neighbours. Verified in code, then measured offline on the existing local corpus, read-only: no prod access, no seed, no LLM call, no write to the shared DBs. The mechanism is sound. The trigger fires on a title-only UPDATE and moves different rows by different factors (x1.00 / x2.75 / x3.33 on a temp-table probe borrowing the real trigger function). On a fully-titled tenant, 93% of scored rows do not move, but top-10 agreement falls to 0.92, Kendall tau-b to 0.94, and the top-1 answer changes on 15-27% of queries. The effect scales with title coverage: at 6.6% coverage it is exactly zero. Two things the row gets wrong or cannot have: - "Non-uniform therefore reorders" is not automatic. On `default`, every matched row moved (x2.17-x3.67) and nothing reordered at all - tau 1.000. The spread has to interleave, and the doc reports the counterexample. - The row's decisive test asks for the gap between `created_at` and when the title was written. `memories` has no `updated_at` and no migration ever adds one, so that test is unrunnable even with the prod access it is blocked on. The doc gives the `audit_log` substitute, which answers the count and the direction but still not the timestamp. What this corpus cannot do is say the mechanism explains 85.4%: it holds no PersonaMem data, and neither measured tenant traverses the bulk-write -> deferred -> fully-enriched path. Stated in the doc, along with the fact that the sign is unknown - a finished store could score higher. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Arkady Mankovsky <arkash20@gmail.com>
arkash20
force-pushed
the
docs/c01-title-fts-rank-movement
branch
from
September 23, 2026 11:51
b71d08f to
433263f
Compare
Contributor
|
Claude Code Review — skipped: PR author 'arkash20' is not a public member of the 'caura-ai' org |
This branch has not been deployed
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.
The row
pm-0918-c-01(CRITICAL) argues PersonaMem's 85.4% record (8-10 Sep) was measured against a store that had not finished enriching, so it was never a reproducible baseline. Claimed mechanism: migration034_memories_search_vector_title_weightingputstitleinto the FTSsearch_vectorat content's weight and widens the trigger toUPDATE OF content, title, so a deferred-enrichment title rebuilds that row's vector after the row is already searchable — by a non-uniform amount, reordering neighbours.The row's own decisive test needs prod read access. This PR tests the mechanism offline, read-only, at zero cost: no prod, no seed, no LLM call, no write to the shared local databases.
Verdict
titlein the tsvector at content's weightUPDATErebuildssearch_vectorMechanism: SOUND. Cause of the 85.4%: still open, and this corpus cannot close it.
Numbers
Temp-table probe borrowing the real trigger function,
contentnever touched:Tenant
dev-9ff0ca, 8,850 rows, 100% titled, 40 two-term queries per set:Reproduced on a disjoint query set (
--seed c01-seedB): aggregate agreement stable to ~0.02; the top-1 rate is not (4/26 vs 9/33), so the doc reports 15-27%, not 27%.Dose-response in title coverage —
defaultat 6.6% coverage shows zero movement of any kind;dev-9ff0caat 100% shows the churn above. A store draining its enrichment backlog travels that curve with no deploy to blame.Two corrections to the row
default, the title-derived set moved every matched row (592/592, ratios 2.17-3.67) and reordered nothing — tau 1.000, top-1 unchanged on all 6 queries. They moved together, past nobody. Spread is necessary, not sufficient.created_atand when the title was written;memorieshas noupdated_atand no migration ever adds one. The doc gives theaudit_logsubstitute (create-detail records the title at insert), which answers the count and the direction but still not the timestamp — so it cannot say whether titles landed before or after 10 Sep.Stated limits
No PersonaMem data here (no
%amb%/%persona%tenant; newest local row 2026-09-08). Neither measured tenant traverses bulk-write → deferred → fully-enriched:dev-9ff0cais the destination without the transition (titled at insert),defaultis an early state that stalled. And the sign is unknown — 034 exists because content-only FTS could not find title-distinguished rows, so a finished store could plausibly score higher.The search-path bisect the row lists as its fallback should not be cancelled on the strength of this document.
Changes
docs/fts-title-weighting/c01-title-rank-movement-findings.md— findingsbenchmark/c01_title_fts_rank_movement.py— re-runnable measurement; read-only apart from a rolled-backON COMMIT DROPtemp tableNo product code touched.
ruff checkandruff format --checkclean.🤖 Generated with Claude Code