query
: natural language query, like “What is the capital of France?”wishlist
: metadata filters, find out more about wishlistslimit
: the maximum number of results to return
Query request
How SID runs queries
The easiest type of query is a semantic query, but for most production systems, many queries will be more complex. For example, “give me the ten newest documents on token selection for pre-training” cannot be answered by a semantic query. You might think this is an edge case, but over our production traffic, they can easily make up 25% of all queries. To solve this, SID uses multiple query engines under the hood, and we dynamically switch between them. A single request may be parsed into multiple subqueries.What a query returns
A query will return a list of objects that are subsections of the original data (aka. chunks). The response will have at most as many items as specified in thelimit
parameter.
Query response
The query API may return no or fewer items than the
limit
parameter if the scores are too low.