Knowledge · Search the workspace’s knowledge bases by passage
Knowledge · Search the workspace’s knowledge bases by passage
Returns the passages that best answer a question, ranked across every knowledge base searched rather than per base, with the source title and URL each came from so an answer can cite where it came from.
Pass knowledge_bases to restrict the search; omit it to search the
whole workspace. An empty results means nothing indexed answers the
question — not that the question is unanswerable elsewhere.
Authentication
AuthorizationApi-Key
Header authentication of the form Api-Key <token>
OR
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
query
What to look for, in natural language. Matching is by meaning rather than keyword, so a question works better than a bag of terms.
top_k
How many passages to return. Defaults to 8.
knowledge_bases
Knowledge base UUIDs to search. Omit to search every knowledge base in the workspace. An id the workspace does not own is a 404 rather than a silently wider search.
Response
results, each with content, score, title, url, source_id and kb_id, plus a count.
Errors
404
Not Found Error
