Modular RAG framework with support for FAISS, Weaviate, and Hybrid Search.
Project description
Hayagriva – Modular Retrieval-Augmented Generation Framework
सर्वविद्याप्रसूत्यर्थं हयग्रीवोऽवतारतः वेदान् संरक्ष्य जगतां हितकारी सदा भवेत्
"To restore and protect all knowledge, Hayagriva has manifested. He safeguards the Vedas for the good of the world."
Hayagriva is a lightweight, modular Retrieval-Augmented Generation (RAG) framework designed to combine large language models with efficient document retrieval. It focuses on accuracy, grounded responses, and ease of integration. The framework supports programmatic use, making it suitable for developers, researchers, and production-oriented teams.
Key Features
Retrieval-Augmented Generation
Built around a clean abstraction that connects LLMs with contextual retrieval to produce grounded answers.
Supports major LLM providers including Groq and OpenAI, with planned expansion to Anthropic, Gemini, DeepSeek, and local GGUF-based models.
Configurable pipelines for:
- Embedding generation
- Vector indexing with FAISS
- Context-aware prompting
- Streamed or batched inference
Modular and Lightweight Architecture
Hayagriva is intentionally minimal. Each component can be used independently:
- Document ingestion
- Embedding and indexing
- Query execution
- Reranking (planned)
- Model backends
This modularity allows seamless integration into applications, agent frameworks, backend systems, or research workflows.
Flexible Document Handling
Documents can be added programmatically or ingested through the CLI. Supports:
- Text files
- Markdown files
- Directory-level ingestion
Automatic chunking and metadata assignment provide efficient retrieval.
Streamlined CLI
Hayagriva provides a CLI to:
- Ingest files and build indexes
- Perform quick queries
Installation
pip install hayagriva
Python Usage
Basic Example
from hayagriva import Hayagriva, HayagrivaConfig
config = HayagrivaConfig(
backend="groq",
api_key="YOUR_GROQ_KEY",
model="llama-3.1-8b-instant",
)
rag = Hayagriva(config)
rag.add_documents(["Hayagriva restores forgotten knowledge."])
response = "".join(rag.ask("Who retrieved the lost Vedas?"))
print(response)
Streaming Example
for token in rag.ask("Explain retrieval-augmented generation"):
print(token, end="", flush=True)
CLI Usage
Ingest Files
hayagriva ingest ./docs
Query
hayagriva query "What is RAG?"
Requirements
- Python 3.10+
- sentence-transformers
- faiss-cpu
- API key for Groq or OpenAI
Roadmap
Expanded LLM Provider Support
- Anthropic Claude
- Google Gemini
- DeepSeek
- Local GGUF models and llama.cpp
External Vector Database Integration
- Pinecone
- Weaviate
- Additional pluggable backends
Memory-Augmented Chat
- Multi-turn memory
- Embedding-based long-term memory
- Summarization-based memory compression
Use Cases
- Building retrieval-augmented assistants
- Knowledge-base and enterprise search
- Research and benchmarking of RAG pipelines
- Lightweight production deployments
- Internal document Q&A systems
Contributing
Contributions to model integrations, retrieval modules, and documentation are welcome. Submit issues or pull requests.
Support
For questions, bugs, or feature requests, open an issue on the project repository.
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
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 hayagriva-0.2.0.tar.gz.
File metadata
- Download URL: hayagriva-0.2.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c17bbebd37cc572d22db79ad0928d0083560d22da0c180d92f0f370674f8a91
|
|
| MD5 |
443441ff9b000195b132e49764ff4e62
|
|
| BLAKE2b-256 |
36ee884419c9754e9e9c1a47136bb0892a0b4d61aa7e61c8151f14d56597bb61
|
File details
Details for the file hayagriva-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hayagriva-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
683bbe9fabc807e67e73b9585c8a4b5dbfeeebb4934c9490bc9112e817d55aab
|
|
| MD5 |
daa7ed676172a0b82bad30eaf44308c9
|
|
| BLAKE2b-256 |
a95b9e9c4dd80260b1d3bcbb8a4e60b6316dcd396bb1e6df1f0d5b18dc777a62
|