Skip to main content

Semantic/hybrid search over a KB

POST 

/v1/knowledge-bases/:kb_id/search

Search a knowledge base semantically and get back the most relevant chunks with their similarity scores and source documents.

Send a query string, optionally with top_k to cap how many chunks come back and similarity_threshold to drop weak matches. Whichever RAG enhancements the knowledge base has enabled — cross-encoder re-ranking, MMR diversification, hybrid keyword blending, semantic caching — are applied automatically from its settings, so the request stays a single query.

Use this when you want raw context to feed your own model, and /ask when you want a written answer. Requires the knowledge:read scope.

Request

Responses

Successful Response