Skip to main content

Vectara Query Tool

This tool connects to a Vectara corpus and allows agents to make semantic search or retrieval augmented generation (RAG) queries.

Usage

Please note that this usage example relies on version >=0.3.0.

This tool has a more extensive example usage documented in a Jupyter notebook here

To use this tool, you'll need a Vectara account (If you don't have an account, you can create one here) and the following information in your environment:

  • VECTARA_CORPUS_KEY: The corpus key for the Vectara corpus that you want your tool to search for information. If you need help creating a corpus with your data, follow this Quick Start guide.
  • VECTARA_API_KEY: An API key that can perform queries on this corpus.

Here's an example usage of the VectaraQueryToolSpec.

from llama_index.tools.vectara_query import VectaraQueryToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

# Connecting to a Vectara corpus about Electric Vehicles
tool_spec = VectaraQueryToolSpec()

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("What are the different types of electric vehicles?"))

The available tools are:

semantic_search: A tool that accepts a query and uses semantic search to obtain the top search results.

rag_query: A tool that accepts a query and uses RAG to obtain a generative response grounded in the search results.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_vectara_query-0.6.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_tools_vectara_query-0.6.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_vectara_query-0.6.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_vectara_query-0.6.0.tar.gz
Algorithm Hash digest
SHA256 76bf80967d4f1bd8dc78338fc3ad10c3f3f43aa553d040b80cdcbd0d43f25c28
MD5 f114eaf97ef17f518c0b0d00cac5590f
BLAKE2b-256 8201dd80b000bfce6187f57603fa5896d1e62bf7127ceb636ebaf8760b33a609

See more details on using hashes here.

File details

Details for the file llama_index_tools_vectara_query-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_vectara_query-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_vectara_query-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c8acdb7fb1b8858721cb2b945e6277ed0448b2686bde430626950828178195a
MD5 b0d949bad8bfc107164379c8c2a004f0
BLAKE2b-256 64583b84b038040f05804e56740a56ee6d0d29975d4aace1989a7652ce7cd884

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page