Skip to main content

victor-rag

RAG (Retrieval-Augmented Generation) Vertical for Victor AI

A complete RAG implementation showcasing document ingestion, vector search, and knowledge management with Victor AI.

Features

  • 📄 Multi-format Document Ingestion

    • PDF, Markdown, Text, Code files
    • Semantic chunking with configurable overlap
    • Automatic document type detection
  • 🔍 Hybrid Search

    • Vector search (semantic similarity)
    • Full-text search (keyword matching)
    • Combined reranking for best results
  • 💾 Embedded Vector Storage

    • LanceDB (no server required)
    • Persistent local storage
    • Fast similarity search
  • 🎯 Query Enhancement

    • Context retrieval from relevant documents
    • Source attribution and citations
    • Confidence scoring

Installation

# Install with Victor core
pip install victor-ai

# Install RAG vertical
pip install victor-rag

Quick Start

from victor.framework import Agent

# Create agent with RAG vertical
agent = await Agent.create(
    provider="ollama",
    model="qwen2.5-coder:7b",
    vertical="rag"
)

# Ingest a document
await agent.chat("Ingest README.md into the knowledge base")

# Query the knowledge base
result = await agent.chat("What does this project do?")

Available Tools

Once installed, the RAG vertical provides these tools:

  • rag_ingest - Ingest documents into the knowledge base
  • rag_search - Search for relevant document chunks
  • rag_query - Query with context retrieval
  • rag_list - List all indexed documents
  • rag_delete - Delete documents from knowledge base
  • rag_stats - Get knowledge base statistics

System Prompt

The RAG vertical includes specialized prompt contributions:

  • Query Strategy: When to use semantic vs keyword search
  • Citation Format: How to reference sources
  • Document Handling: Chunking strategies by document type
  • Quality Rules: Grounding rules to prevent hallucination

Configuration

The RAG vertical can be configured via environment variables:

# Vector store location
export VICTOR_RAG_DB_PATH=./rag_db

# Chunking configuration
export VICTOR_RAG_CHUNK_SIZE=512
export VICTOR_RAG_CHUNK_OVERLAP=50

# Search configuration
export VICTOR_RAG_TOP_K=5
export VICTOR_RAG_MIN_CONFIDENCE=0.3

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Format code
black victor_rag/

# Type check
mypy victor_rag/

License

Apache License 2.0 - see LICENSE for details.

Metadata

Release files for victor-rag 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for victor-rag 0.13.0
File Size Uploaded
victor_rag-0.13.0.tar.gz 101.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for victor-rag 0.13.0
File Interpreter ABI Platform
victor_rag-0.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 220.0 kB

Release files / victor_rag-0.13.0.tar.gz

Download URL victor_rag-0.13.0.tar.gz
Size 101.6 kB
Tags Source
SHA-256 checksum
How to use checksums
16c57cc8be568c470b4496137b14c5fb03fb3516935d53403ab1307ea1e42c25
BLAKE2b-256 checksum
How to use checksums
19696e21126166fb7f05662307984c8e38c71881c2a30885ab1c175fc6f8159a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / victor_rag-0.13.0-py3-none-any.whl

Download URL victor_rag-0.13.0-py3-none-any.whl
Size 118.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50f6135b8a09b5bc2e4344b87a7e732f0bb34b1f639f09d6cb52487e64a6539c
BLAKE2b-256 checksum
How to use checksums
1b919a1303fd99aadda9b0564d613b3832e29ce4623a602adbbb78f2a5bbb47e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.13.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.5.7

2 release files

0.5.6

2 release 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