POST
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
query

Authorizations

x-api-key
string
headerrequired

Path Parameters

knowledge_base_id
string
required

Body

application/json
query
string
required

The natural language query to be answered by referencing the data ingested into the knowledge base

top_k
integer
required

Number of chunks to return. Must be greater than 0 if specified. If not specified, all chunks will be returned.

Required range: 0 < x < 10000
include_embeddings
boolean
default: true

Whether or not to include the embeddings for each chunk

metadata_filters
object

Optional filter by metadata fields, encoded as a JSON object

wildcard_filters
object

Optional wildcard filter for fields. Only fields that are part of the metadata will be accepted.

verbose
boolean
default: false

Enable or disable verbose logging

Response

200 - application/json
chunks
object[]
required

An ordered list of the k most similar chunks and their similarity scores from most to least similar

started_at
string

Timestamp at which the query was begun by the server.

completed_at
string

Timestamp at which the query was completed by the server.

request_id
string

query request ID for verbose logging