Files
stack/tests/llm/test_migrate.py
kert 51a5abf3bc fix(llm): code-cited query filtered by collection + GIN index; cached replica handle; prompt caps (refs P48)
The code-cited query joined every embedding to langchain_pg_collection
before filtering, and matched codes with no index to help it; it now
filters on a scalar collection_id subquery, and ensure_hnsw builds a GIN
index over the codes array plus one on collection_id. The DuckDB replica
is opened once and kept, reopened only when publish_replica swaps the
file (mtime_ns). Prompt size: at most two vintages once a question
touches more than three codes, and code-cited snippets cap at 250 chars.
2026-09-08 23:40:22 -04:00

2.1 KiB