ask_vectara
Query Vectara's RAG system to retrieve search results and generate contextual responses using specified corpus keys and API parameters for accurate information extraction.
Instructions
Run a RAG query using Vectara, returning search results with a generated response.
Args:
query: str, The user query to run - required.
corpus_keys: list[str], List of Vectara corpus keys to use for the search - required. Please ask the user to provide one or more corpus keys.
api_key: str, The Vectara API key - required.
n_sentences_before: int, Number of sentences before the answer to include in the context - optional, default is 2.
n_sentences_after: int, Number of sentences after the answer to include in the context - optional, default is 2.
lexical_interpolation: float, The amount of lexical interpolation to use - optional, default is 0.005.
max_used_search_results: int, The maximum number of search results to use - optional, default is 10.
generation_preset_name: str, The name of the generation preset to use - optional, default is "vectara-summary-table-md-query-ext-jan-2025-gpt-4o".
response_language: str, The language of the response - optional, default is "eng".
Returns:
The response from Vectara, including the generated answer and the search results.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
api_key | No | ||
corpus_keys | No | ||
generation_preset_name | No | vectara-summary-table-md-query-ext-jan-2025-gpt-4o | |
lexical_interpolation | No | ||
max_used_search_results | No | ||
n_sentences_after | No | ||
n_sentences_before | No | ||
query | Yes | ||
response_language | No | eng |
Input Schema (JSON Schema)
{
"properties": {
"api_key": {
"default": "",
"title": "Api Key",
"type": "string"
},
"corpus_keys": {
"default": [],
"items": {
"type": "string"
},
"title": "Corpus Keys",
"type": "array"
},
"generation_preset_name": {
"default": "vectara-summary-table-md-query-ext-jan-2025-gpt-4o",
"title": "Generation Preset Name",
"type": "string"
},
"lexical_interpolation": {
"default": 0.005,
"title": "Lexical Interpolation",
"type": "number"
},
"max_used_search_results": {
"default": 10,
"title": "Max Used Search Results",
"type": "integer"
},
"n_sentences_after": {
"default": 2,
"title": "N Sentences After",
"type": "integer"
},
"n_sentences_before": {
"default": 2,
"title": "N Sentences Before",
"type": "integer"
},
"query": {
"title": "Query",
"type": "string"
},
"response_language": {
"default": "eng",
"title": "Response Language",
"type": "string"
}
},
"required": [
"query"
],
"title": "ask_vectaraArguments",
"type": "object"
}