Skip to main content
POST
Test a search
Searches knowledge bases the way an assistant does during a call, and answers the five closest passages with what the search does with each: hand it over (sent), or leave it out and why. Use it to check that a question your callers ask finds the right passage, and to choose an assistant’s kbTopK and kbMinSimilarity. It searches ready files only, and places no call.

Body

string[]
required
The knowledge bases to search: 1 to 25 UUIDs, each once. An assistant’s are its kbStoreIds.
string
required
The question, as a caller would ask it. 1 to 1,000 characters.
number
default:"3"
Results per search, as an assistant’s kbTopK: a whole number from 1 to 5.
number
default:"0.55"
Match strictness, as an assistant’s kbMinSimilarity: 0.40 to 0.80 in steps of 0.05.

Request

Response

200 OK. The passages come best first.
number
required
How close the passage is to the question, from 0 to 1.
string
required
sent: the search hands it over. Left out: past_top_k (beyond the results per search), below_cutoff (not above min_similarity) or far_from_best (more than close_to_best below the best match).

Errors