Skip to main content

RAG question-answering over a KB

POST 

/v1/knowledge-bases/:kb_id/ask

Ask a natural-language question and get a written answer grounded in the knowledge base.

This is retrieval-augmented generation: the service searches the knowledge base, then passes the retrieved chunks to an LLM that answers from that context. The response carries both the answer and the source chunks behind it, so you can cite or verify it. Optional model and top_k override the defaults.

Unlike /search, this call runs an LLM and therefore draws AI credits from your organization's balance. Requires the knowledge:read scope.

Request

Responses

Successful Response