Skip to main content

llama-index tools vectara query integration

Project description

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 notebok 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.

Project details


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.5.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.5.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_vectara_query-0.5.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.5.0.tar.gz
Algorithm Hash digest
SHA256 0274c8005d45447370fd0a04419a66e14004acd7d8606a3b7e8d7c0510623c13
MD5 4b120e696ce3fc75a2cf456bc378443a
BLAKE2b-256 a7cc4d3f9ae59a1202f06c339d92c506690b2c2549a3e7c9598feb8991bbf906

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_tools_vectara_query-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abd670e9fa6f9cf7d8814851a52abfb1b68769c2f23f938e591b355e0388e50d
MD5 37393d16f6e6740203ec2e30fe4b3817
BLAKE2b-256 833b599a3e74d428d0744c7d99664bbe7456de0977431228c65d4999aed71ff8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page