Skip to main content
Version: 2.0

Vectara Python SDK

The Vectara Python SDK enables you to access Vectara’s semantic search, Retrieval-Augmented Generation (RAG), and document management capabilities from your Python applications. Use this SDK to connect to Vectara, manage corpora and documents, apply metadata, and run advanced queries.

This guide covers installation, authentication, and essential workflows. Each section includes practical code examples and best practices to help you integrate Vectara’s features into your projects efficiently.

Quickstart

Get up and running with the Vectara Python SDK in minutes.

Learn how to authenticate, create your first corpus, and run your first semantic search query.

Corpora

Organize and manage collections of documents using corpora.

Configure access, set metadata filters, and optimize your knowledge base for search and retrieval.

Upload Files

Ingest files such as PDFs, Word documents, or images for automatic parsing and indexing.

Bulk upload new business content and make it instantly searchable.

Indexing Documents

Manage documents with ease, from creation and updates to deletion and auditing.

Leverage structured and core document types to support a wide range of content.

Queries

Unlock the full power of Vectara’s search and RAG APIs.

Filter, rerank, and generate contextual answers tailored to your data and use case.

Metadata

Tag documents and parts with metadata to enable fine-grained filtering and targeted retrieval.

Use metadata to power advanced queries and business-specific use cases.

Chats

Build chat-enabled AI assistants on your data with Vectara’s chat APIs.

Enable conversational retrieval and integrate with popular messaging platforms.

Generation Presets

Customize language model behavior with generation presets.

Define prompt templates, control output style, and manage LLM configurations at scale.

Rerankers

Improve search quality using advanced reranking algorithms.

Apply customer-specific models to boost relevance for your unique data.

Users

Manage user access, roles, and permissions for secure, multi-tenant environments.

Streamline onboarding and ensure compliance for enterprise deployments.

API Keys

Secure your application with fine-grained API key management.

Create, rotate, and revoke API keys to control access and protect your data.

Error Handling

Troubleshoot errors in the Vectara Python SDK.

Understand the signs of client-side validation errors, network and transport errors, and Vectara API errors.