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
- Victor AI: https://github.com/vjsingh1984/victor
- Documentation: https://docs.victor.dev/verticals/rag
- Victor Registry: https://github.com/vjsingh1984/victor-registry
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file victor_rag-0.5.7.tar.gz.
File metadata
- Download URL: victor_rag-0.5.7.tar.gz
- Upload date:
- Size: 89.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7949255e4299e00445d523c9eb3443400d568346808fdd0df66a9e237079ac9
|
|
| MD5 |
3f7611f72c9f78a6910db216ba28034b
|
|
| BLAKE2b-256 |
a37a6bbd8ef637d4bf5f3385376db4d43aee808931380c4aebdb0103125694c4
|
Provenance
The following attestation bundles were made for victor_rag-0.5.7.tar.gz:
Publisher:
publish.yml on vjsingh1984/victor-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
victor_rag-0.5.7.tar.gz -
Subject digest:
c7949255e4299e00445d523c9eb3443400d568346808fdd0df66a9e237079ac9 - Sigstore transparency entry: 979482308
- Sigstore integration time:
-
Permalink:
vjsingh1984/victor-rag@5fae49a37d74eacfbc0b7ba1fabebda45bca4708 -
Branch / Tag:
refs/tags/v0.5.7 - Owner: https://github.com/vjsingh1984
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5fae49a37d74eacfbc0b7ba1fabebda45bca4708 -
Trigger Event:
release
-
Statement type:
File details
Details for the file victor_rag-0.5.7-py3-none-any.whl.
File metadata
- Download URL: victor_rag-0.5.7-py3-none-any.whl
- Upload date:
- Size: 106.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10dd209aed49a8daf4f288f16a2f5d9907c81a1e8e35f163e9140581797c88b3
|
|
| MD5 |
51fa2417b26bb45da85dc8e84a8d0a46
|
|
| BLAKE2b-256 |
6cff81e2558198fa9df6a9f43e9799ecdf1e917592d5500d074ba81bbdb8ebde
|
Provenance
The following attestation bundles were made for victor_rag-0.5.7-py3-none-any.whl:
Publisher:
publish.yml on vjsingh1984/victor-rag
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
victor_rag-0.5.7-py3-none-any.whl -
Subject digest:
10dd209aed49a8daf4f288f16a2f5d9907c81a1e8e35f163e9140581797c88b3 - Sigstore transparency entry: 979482366
- Sigstore integration time:
-
Permalink:
vjsingh1984/victor-rag@5fae49a37d74eacfbc0b7ba1fabebda45bca4708 -
Branch / Tag:
refs/tags/v0.5.7 - Owner: https://github.com/vjsingh1984
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5fae49a37d74eacfbc0b7ba1fabebda45bca4708 -
Trigger Event:
release
-
Statement type: