A comprehensive RAG framework with Arabic language support, multi-provider embeddings, and advanced RAG strategies
Project description
🦊 fennec-rag
A comprehensive, production-ready Retrieval-Augmented Generation (RAG) framework with first-class Arabic language support.
✨ Features
- 🌍 Arabic-first NLP — dedicated Arabic chunker, embedder, and prompt templates
- 🔌 Multi-provider LLMs — OpenAI, Anthropic, Gemini, Mistral, HuggingFace, Ollama
- 🗄️ Multiple vector databases — FAISS, ChromaDB, Pinecone
- 🧩 Advanced RAG strategies — Conversational, Agentic, Graph, Multi-hop, Federated, Self-improving, Streaming
- 🛡️ Hallucination Guard — built-in hallucination detection and grounding
- 📊 Observability & Evaluation — tracing, metrics, dashboards, evaluation suite
- 📄 Rich document loaders — PDF, DOCX, HTML, CSV, JSON, Excel, Web, Directory
📦 Installation
# Basic
pip install fennec-rag
# With specific providers
pip install "fennec-rag[openai,faiss]"
pip install "fennec-rag[anthropic,chroma]"
pip install "fennec-rag[gemini,pinecone]"
# Arabic NLP
pip install "fennec-rag[arabic]"
# Full install
pip install "fennec-rag[all]"
🚀 Quick Start
from fennec.rag.core import RAGSystem, RAGConfig
from fennec.embeddings import OpenAIEmbedder
from fennec.vector_database import FAISSVectorDatabase
from fennec.llm import OpenAIInterface
embedder = OpenAIEmbedder(api_key="your-key")
vector_db = FAISSVectorDatabase(embedder=embedder)
llm = OpenAIInterface(api_key="your-key")
config = RAGConfig(chunk_size=512, overlap=128, top_k=5)
rag = RAGSystem(config=config, vector_db=vector_db, llm=llm)
rag.load_documents(["document.pdf"])
response = rag.query("What is the main topic?")
print(response)
🗂️ Modules
| Module | Description |
|---|---|
fennec.rag.core |
RAGSystem, MultiDocRAG, Reranker, PromptRouter |
fennec.rag.conversational_rag |
Multi-turn conversation RAG |
fennec.rag.agentic_rag |
Agent-based RAG |
fennec.rag.graph_rag |
Knowledge graph RAG |
fennec.rag.hybrid_search |
BM25 + semantic hybrid search |
fennec.rag.multi_hop |
Multi-hop question decomposition |
fennec.rag.self_improving_rag |
HyDE + recursive refinement |
fennec.rag.streaming_rag |
Token streaming |
fennec.embeddings |
OpenAI, Gemini, HuggingFace, Mistral, Ollama, Arabic |
fennec.vector_database |
FAISS, ChromaDB, Pinecone |
fennec.llm |
OpenAI, Anthropic, Gemini, Mistral, HuggingFace, Ollama |
fennec.llm.hallucination |
HallucinationGuard, ProtectedLLMInterface |
fennec.chunks |
Arabic & multilingual text chunkers |
fennec.document_loaders |
PDF, DOCX, HTML, CSV, JSON, Excel, Web, Directory |
fennec.memory |
Buffer, Window, Summary, Entity memory |
fennec.router |
SemanticRouter |
fennec.prompt |
PromptTemplate, ChatTemplate, FewShotTemplate |
fennec.output_parser |
JSON, YAML, CSV, Pydantic parsers |
fennec.evaluator |
RAG evaluation & reporting |
fennec.observability |
Tracing, metrics, dashboards |
fennec.cache |
Multi-level cache |
fennec.persistence |
State persistence & backup |
fennec.plugins |
Extensible plugin system |
📝 License
MIT License
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
fennec_rag-0.1.3.tar.gz
(413.8 kB
view details)
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
fennec_rag-0.1.3-py3-none-any.whl
(509.9 kB
view details)
File details
Details for the file fennec_rag-0.1.3.tar.gz.
File metadata
- Download URL: fennec_rag-0.1.3.tar.gz
- Upload date:
- Size: 413.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5741ace1c7340d6ee31d470472fad69363a0761818dd22ff157390e5502ddab1
|
|
| MD5 |
da1df3e87e461dfb526ae8dece4fb285
|
|
| BLAKE2b-256 |
2b3d8ea0566b4f48253e687ea97f1f0ff5cdbef296e1a7172ce63cca8dd4afc0
|
File details
Details for the file fennec_rag-0.1.3-py3-none-any.whl.
File metadata
- Download URL: fennec_rag-0.1.3-py3-none-any.whl
- Upload date:
- Size: 509.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a618016e35b2fc63b0e63d5ed75d753c37724da3c7cd014f9603297d0212766c
|
|
| MD5 |
5bac7e206d34b22dcd264eb6cc736dd9
|
|
| BLAKE2b-256 |
eec585661ef0bbbe9c839c379744a4518c94a56cb6a58cc642de3078e0791ad0
|