chore: bump LocalAGI + localrecall (fix pgvector hybrid search seqscan, #10186)#10192
Merged
Conversation
8e10ecb to
25c774f
Compare
Bumps the agent stack to pull in the PostgreSQL hybrid-search fix: - mudler/localrecall -> v0.6.3-...-9a3b3321a9cd (mudler/LocalRecall#46, merged) - mudler/LocalAGI -> ...-14aed1ae4336 (mudler/LocalAGI#477, merged) localrecall's hybrid search previously sorted on a wrapped scalar similarity expression, which blinded the planner into a full sequential scan over every row and exceeded the statement timeout on large collections, returning an empty result set. It now uses the canonical Reciprocal Rank Fusion pattern (index-backed candidate retrieval + FULL OUTER JOIN + weighted RRF). Fixes #10186 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
25c774f to
b2d3eaf
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
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.
What
Bumps the agent stack to pull in the PostgreSQL hybrid-search fix:
github.com/mudler/localrecall->v0.6.3-...-a6485bf68230(fix(postgres): index-backed RRF hybrid search (#10186) LocalRecall#46)github.com/mudler/LocalAGI->...-0ec165c86c05(re-pins localrecall)go.mod/go.sum only; no LocalAI source changes (the
localrecallSearchAPI is unchanged).Why
Closes #10186. The hybrid search query in
localrecallwrapped the vector distance operator in a scalar similarity expression and sorted on the alias (ORDER BY similarity DESC). pgvector's HNSW/DiskANN index can only serve a bareORDER BY embedding <=> $vecpath, so the wrapped form degraded to a full sequential scan over every row. On the reporter's ~2.4M-row collection this exceeded the 10s statement timeout and returned{"count":0,"results":[]}.The fix adopts the canonical Reciprocal Rank Fusion hybrid pattern recommended by pgvector and Timescale (
pg_textsearch+pgvectorscale): each arm retrieves its top-N candidates via a bare, index-served operator and a rank; the arms are fused with aFULL OUTER JOIN+ weighted RRF, then joined back by PK. Verified withEXPLAINon the DiskANN + pg_textsearch stack:Seq Scan-> index scans on both arms (Order By: (embedding <=>/(full_text <@>), planner cost 5128 -> 648.Chain
chore/bump-localrecall-10186(intermediate bump)Pseudo-versions point at those branch HEADs and will update as the upstream PRs merge.
Fixes #10186