Multiple Corpora Query
POST/v2/query
Perform a multipurpose query to retrieve relevant information from one or more corpora and generate a response using Retrieval Augmented Generation (RAG). Similar to the advanced corpora search.
- Specify the unique
corpus_keyidentifying the corpus to query. Thecorpus_keyis created in the Vectara Console or the Create Corpus API, and the corpus key is part of that process. When creating a new corpus, you have the option to assign a customcorpus_keyfollowing your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. - Customize your search by specifying the query text (
query), pagination details (offsetandlimit), and metadata filters (metadata_filter) to tailor your search results. - Leverage advanced search capabilities like reranking (
reranker) and opt-in Retrieval Augmented Generation (RAG) (generation) for enhanced query performance. Generation is opt-in by setting thegenerationproperty. By excluding the property or by setting it to null, the response will not include generation. Learn more - Specify Vectara's RAG-focused LLM (Mockingbird) for the
generation_preset_name. Learn more - Use advanced summarization options that utilize detailed summarization parameters such as
max_response_characters,temperature, andfrequency_penaltyfor generating precise and relevant summaries. Learn more - Customize citation formats in summaries using the
citationsobject to include 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.