agenticRetrieveStream
abstract suspend fun <T> agenticRetrieveStream(input: AgenticRetrieveStreamRequest, block: suspend (AgenticRetrieveStreamResponse) -> T): T
Retrieves information from one or more knowledge bases using an agentic approach. Agentic retrieval uses a foundation model to intelligently decompose complex queries into sub-queries and iteratively retrieve relevant information from your knowledge bases. This approach improves retrieval accuracy for complex, multi-step questions that a single retrieval pass might not fully address.
The operation returns results through a stream that includes retrieval results, trace events for visibility into the process, and a generated response synthesized from the results by default, which can be turned off.