Repository navigation
Fix hybrid search bindings, result limit and SQLAlchemy row mappings - #1022
Merged
msitarzewski merged 1 commit intoOct 4, 2026
Merged
msitarzewski merged 1 commit into
msitarzewski merged 1 commit into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
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.
Agent information
Existing agent: RAG Pipeline Engineer
File:
engineering/engineering-rag-pipeline-engineer.mdMotivation and change
The hybrid_search example parses :embedding::vector as a truncated SQLAlchemy bind, doubles the final result limit instead of just each candidate pool, and calls dict() on SQLAlchemy Row objects. Use explicit CAST bindings, separate candidate_k from top_k, and materialize mapping rows. These changes repair one documented query flow.
Testing
7 native SQLAlchemy 2 tests pass; unchanged source fails 3. Tests compile the actual text query through the PostgreSQL dialect, inspect binds and both candidate/final limits, and map real SQLite Row objects through a controlled async adapter. Empty-result, metadata-filter and RRF expression controls pass.
Changed-agent lint passes and full 282-agent conversion across 15 tools passes all 32 checks on this signed head. Content checksum drift remains advisory; no generated outputs or manifest changes are included.
Scope and limitations
No live PostgreSQL/pgvector service or retrieval-quality benchmark was run. Compiler and native Row tests establish these specific interface failures; vector codec/database configuration remains external to this example.
Only one existing agent file changes, retaining personality, structure and unrelated examples. Candidate listed in issue #917 before publication. Investigation and preparation were AI-assisted; native evidence was executed and exact source independently reviewed.
References: SQLAlchemy text binds, Result.mappings.