haiku.rag/tests/cassettes/test_multi_db_ask
Yiorgis Gozadinos fdb5710491
Ask and analyze across several databases
Chunk 2 gave search a configured set to fan out over. ask and analyze
covered one database still: the RAG capability had no way to be told which
databases a question spanned, and the analysis sandbox mounted one
document tree.

The selection travels as sources on EvidenceState, beside the filter it
scopes with, so both capabilities read it the same way. clients_covering
is the one rule that turns a selection into clients, used by search, the
sandbox mount and the cite fallback, so a question scoped to some
databases cannot search, mount or cite another. Citations carry the
database they came from, and format_for_agent names it, so the model can
attribute evidence while it answers rather than only afterwards.

The sandbox keeps one flat /documents/{id}/ namespace and resolves each id
to the client holding it, which rests on ids being UUID4. A database
copied from another breaks that, so an id held twice is refused rather
than resolved to whichever arrived last.

On the CLI, search, ask and analyze cover the configured set and label
each result with its database. Every other command works on one, named
with --database NAME (a name reaches a database behind a URI, which --db
cannot) or --db PATH, and refuses a set it cannot choose from instead of
silently reading the default database. Cold databases open together, so a
first query costs the slowest open rather than their sum.
2026-08-24 10:03:46 +03:00
..
TestAnalyzeAcrossDatabases.test_the_capability_searches_the_selected_databases.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestAskAcrossDatabases.test_searching_all_databases_reaches_both.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestAskAcrossDatabases.test_the_capability_searches_the_selected_databases.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestCiteFallback.test_an_id_from_a_selected_database_resolves_with_its_source.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestCiteFallback.test_an_id_outside_the_selected_databases_does_not_resolve.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestDatabaseIdentityForTheModel.test_in_code_search_names_the_database.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00
TestStandaloneCapabilities.test_a_rag_capability_opens_the_configured_set.yaml Ask and analyze across several databases 2026-08-24 10:03:46 +03:00