Skip to main content
POST
Semantic Search

Body

application/json

Request body for semantic search.

query
string
required

The text to search for.

knowledge_base_id
string
required

The knowledge base to search. Note that this travels in the body, not the path.

top_k
integer
default:5

Maximum number of chunks to return, ranked by similarity.

Required range: 1 <= x <= 100
filter
Filter · object | null

Optional metadata filter, passed straight through to the vector backend. Omit it entirely unless you are genuinely filtering: whatever you send becomes a real metadata condition, so leaving an interactive-playground placeholder such as {"additionalProp1": {}} in place will make the search error or silently return nothing. Knowledge-base scoping is applied automatically either way and cannot be bypassed through this field. Only the $eq operator is portable across the supported backends. For example, to match only chunks tagged with a given department, send {"department": {"$eq": "billing"}}.

Response

Ranked chunks. An empty results array means nothing matched.

query
string
required

The query that was searched, echoed back.

results
SearchResult · object[]
required

Matched chunks, ranked by similarity.