Query knowledge base
Searches the knowledge base and returns the passages a retrieval would surface, which is how to see what an agent will be grounded on before it answers.
Authorizations
Voiceflow bearer token
Query Parameters
The ID of the project to operate on.
The alias of the environment to operate on (e.g. main).
Body
Whether to query the draft or the published version of the knowledge base.
draft, published The natural-language question to ask the knowledge base.
Metadata filters used to narrow down which document chunks are searched.
Whether to synthesize an answer from the retrieved chunks; when false, only raw chunks are returned.
The maximum number of document chunks to retrieve.
1 <= x <= 30An additional instruction applied when synthesizing the answer from the retrieved chunks.
Response
Returns the answer generated from the knowledge base and the chunks it was drawn from, alongside the model used, the duration, and the token accounting for the call.
The result of the knowledge base query, including the synthesized answer and token usage.