Skip to content

Fix hybrid search bindings, result limit and SQLAlchemy row mappings - #1022

Merged
msitarzewski merged 1 commit into
msitarzewski:mainfrom
rudycelekli:fix/agency-hybrid-search-20261003
Oct 4, 2026
Merged

msitarzewski merged 1 commit into
msitarzewski:mainfrom
rudycelekli:fix/agency-hybrid-search-20261003

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Agent information

Existing agent: RAG Pipeline Engineer
File: engineering/engineering-rag-pipeline-engineer.md

Motivation 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.

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
@msitarzewski
msitarzewski merged commit 0dea7cc into msitarzewski:main Oct 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants