Automatic search
One question, one answer. The service answers with a one-pass fact search or an agent that reads documents, queries tables, and selects documents from the metadata catalog, and returns that route’s result (with a catalog table when the agent answered from the catalog), plus which route it took. Single-shot: the request takes nosession_id, and
the agent never asks a clarification question back. An agent answer still
reports its own run’s thread in output.answer.session_id; for follow-ups, use
QA. When the service picks fact search and it cannot settle the
question, the agent answers instead (routing.selected fact, routing.final
agent); a “not found” over material it read whole stands. Pass
mode fact or agent to run that route directly, with no router model, no
routing charge, and no hand-over.
QA
A conversation instead of a single query. Each turn runs the automatic search agent on its own; pass a result’sanswer.session_id to ask a follow-up, and
the agent may ask back on a genuinely ambiguous question. Chain follow-ups with
that conversation’s session; do not share a session across unrelated
questions.
Ground quote locations
Search does not wait for bounding boxes. The fact route and journal-entry testing plan Ground jobs for their evidences and list them ingrounding_job_ids: on output for an automatic search answered by the fact
route, and on the result itself for journal-entry testing. After a succeeded
answer, poll every id instead of posting duplicate Ground requests. An agent
answer has none; see Agent and QA answers.
<n>#<k>, where n is the
evidence’s 1-based position in evidences and k is the piece index starting
at 0. A quote that was not split stays one target, and its id is n. Piece
targets ask for two matches. A piece with two matches repeats in the file, so
which copy the quote used is unknown, and the console draws no box for it.
Quotes are split only for PDF, Word and PowerPoint files that Ground reads from
the PDF text layer.
Agent and QA answers
An agent answer comes back without Ground jobs:output.answer.grounding_job_ids
on an automatic search the agent answered, and answer.grounding_job_ids on a
QA turn, are null. To locate its quotes, run Ground yourself
on the answer’s evidences. Each evidence names its file in source_file_id,
the text in quote, and, for a spreadsheet, the tab in component. Start one
Ground job per file, with that workspace file as the source and its quotes as
targets (up to 30 per job), and pass component as the target’s sheet.
Number each target by its evidence’s 1-based position in evidences so a match
maps back to its citation. Skip an evidence whose source_file_id is null; it
names no file to ground against.
result.answer (the job’s result is the
AutomaticAgentResult itself) and ground them the same way. When an evidence
has passages, its quote was stitched from those pieces of the file: ground
each piece as its own target instead of quote, the way a planned job does
(above), after replacing each | cell boundary with a space.
Catalog tables
When automatic search’s agent, or a QA turn, answers a filter, rank, or count question from the metadata catalog, the result carries acatalog table:
typed columns, one row per matching catalog entry, and exact totals.
Search returns matching catalog entries with identities established from the
source data. Native register entries stay separate; supporting sections keep
their own values and citations in components. total_matches counts entries
and total_files counts their distinct source files. Both totals describe all
confirmed matches before top-N and paging. Each row has a query-independent
entry_id in the current catalog and a source_file_id for its supporting
uploaded file. See the API reference for
identity behavior on rebuild.
You can also ask for fields to show beside each match. These columns carry
requested=true. Missing output values remain unexamined without removing the
entry; conditions that filter on those values must still be satisfied.
A table carries up to 200 rows. When there are more, next_cursor pages the
rest: client.search.filtered_page in Python, or
POST /v1/workspaces/{id}/filtered-search with
{ "type": "page", "cursor": "..." }. A page is a new job and re-runs the
table’s query against the current catalog.
exhaustive before treating a table as a census. catalog_drifted on a
later page means the catalog changed since the first page.
Journal-entry testing
Not retrieval. The run writes its own SQL over the ingested ledger tables and publishes every statement as a receipt insql_receipts, so each figure traces
to the query behind it. Reach for it when the deliverable is a tested criterion
rather than a cited passage.
- Python
- TypeScript
- curl
reasoning_effort (none, minimal, low, medium, high) sets the thinking
budget without changing the engine; omit it for the default (low). figures
is the checkable half of the answer; sql_receipts is its working. exhausted means the step budget ran out before
the procedure finished — a partial answer, not a failure. Full field reference:
Python, TypeScript.
Deprecated: fact, deep, and filtered search
These keep working, as do their endpoints, until they are retired. New code should not start on them.
See Fact and deep search and
Filtered search for their reference.
Coverage
Every search response can includecoverage.restricted_candidates and
labels_required when your key cannot see every matching file. See
Access labels.