Skip to main content

RAG vertical for Victor AI - Document ingestion, vector search, and knowledge management

Project description

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.

Links

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

victor_rag-0.5.6.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

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

victor_rag-0.5.6-py3-none-any.whl (74.3 kB view details)

Uploaded Python 3

File details

Details for the file victor_rag-0.5.6.tar.gz.

File metadata

  • Download URL: victor_rag-0.5.6.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for victor_rag-0.5.6.tar.gz
Algorithm Hash digest
SHA256 bc42616288ecfe93dfa3cbf2976dbb55641adc984b75713a83a3019ad2835a47
MD5 b1d6cd6f0f69f2bedd786579e374dd9e
BLAKE2b-256 cf385160df776c5fee1969ebd80474e9d6e35c0732a6f8ac93da0aa604280a5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for victor_rag-0.5.6.tar.gz:

Publisher: publish.yml on vjsingh1984/victor-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file victor_rag-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: victor_rag-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 74.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for victor_rag-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 53f0a20da83962b014624392046962449bf269a04af0e3c637463cf8ba2ca974
MD5 fac668608d09a1dd86cd026013b8b011
BLAKE2b-256 5bc3999b88e93422dd61e3a403e8d0148327fbe644918917c8bf16b4171e4d84

See more details on using hashes here.

Provenance

The following attestation bundles were made for victor_rag-0.5.6-py3-none-any.whl:

Publisher: publish.yml on vjsingh1984/victor-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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