Skip to main content
NDI has several retrieval surfaces. They are not aliases. To pick one for a question, follow Choose the right tool. Fact search (client.search.fact), deep search (client.search.deep), and filtered search (client.search.filtered) are deprecated. Use automatic search with mode fact instead of fact search, QA or automatic search with mode agent instead of deep search, and automatic search instead of a new filtered search. Their endpoints keep working until they are retired; the ndi fact-search and ndi deep-search commands are removed from CLI 0.27.0. See Search. Automatic search, QA, and journal-entry testing return jobs. Once a knowledge graph is built for the workspace, automatic search (both routes) and QA use it without any extra argument. Automatic search is single-shot. It answers with a one-pass fact search, or with an agent that opens on the pages and tables a navigator over the workspace located for the query (for a workspace in a bring-your-own bucket or customer storage, on what a search of it found), then reads documents, queries tables, and can select documents from the metadata catalog. routing.final names the route that answered (fact or agent; results stored earlier can read deep or filtered). Under auto, a fact search that finds no answer hands the query to the agent, so routing.selected can read fact while routing.final reads agent. output is the answering route’s result, and output_job_id owns receipts and cursors. An agent output carries its answer (a deep-search result) and, when it answered from the catalog, a catalog table of up to 200 rows whose next_cursor pages the rest through filtered search’s page form, which is not deprecated. Grounding ids for a fact route are on output. mode fact or agent runs that route with no router model, no routing charge, and no hand-over; routing.router.kind then reads requested. In any mode, a query that asks for nothing (a keyboard mash) and none of whose words a document contains is answered without a search. Journal-entry testing is the one entry here that is not retrieval. Automatic search and QA retrieve and cite; je-testing performs a test — it writes its own SQL over the ingested ledger tables and publishes every statement as a receipt in sql_receipts, so each figure in the answer traces to the query behind it. Reach for it when the deliverable is a tested criterion, not a cited passage. QA is the conversation. Chain follow-ups with the previous turn’s answer.session_id. Sharing a session across a suite of unrelated questions is unsupported. An automatic fact answer and journal-entry testing plan Ground jobs into grounding_job_ids: on output for the fact answer and on the result itself for journal-entry testing. After the search result, poll each id with client.jobs.wait (or GET /v1/jobs/{id}). The list may be empty when deployment policy turns off automatic grounding for API searches, when the run sets postprocessing="none", or when nothing can be grounded; it is absent on older results. When it is empty or absent and you need quote locations, call client.documents.ground explicitly. 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 client.documents.ground yourself on the answer’s evidences: one job per file (source_file_id, as a workspace file source), with the evidences’ quotes as targets. See Agent and QA answers for an example. See the search guide for runnable examples.