Query multiple corpora
POST/v2/query
Queries one or more corpora and generates a response with Retrieval Augmented Generation (RAG). Similar to the advanced single corpus query.
- Set the unique
corpus_keyfor each corpus to query. You create the key in the Vectara Console or the Create Corpus API. You can assign a customcorpus_keythat follows your preferred naming convention. Search requests reference the corpus by this key. - Customize the search with the query text (
query), pagination (offsetandlimit), and metadata filters (metadata_filter). - Apply reranking (
reranker) to improve the order of results. Opt in to generation by setting thegenerationproperty. If you exclude the property or set it to null, the response does not include generation. Learn more - Set
generation_preset_nameto Vectara's RAG-focused LLM (Mockingbird). Learn more - Control summarization with parameters such as
max_response_characters,temperature, andfrequency_penalty. Learn more - Customize citation formats in summaries with the
citationsobject: numeric, HTML, or Markdown links. Learn more
Request
Responses
- 200
- 400
- 403
- 404
A response to a query.
Query request was malformed.
Permissions do not allow querying one or more corpora in the request.
One or more of the corpora were not found.