Skip to main content

🦊 fennec-rag

A comprehensive, production-ready Retrieval-Augmented Generation (RAG) framework with first-class Arabic language support.

PyPI version Python License: MIT

✨ 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

Metadata

Release files for fennec-rag 1.1.1

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

Source distribution (sdist)

Source distribution for fennec-rag 1.1.1
File Size Uploaded
fennec_rag-1.1.1.tar.gz 413.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fennec-rag 1.1.1
File Interpreter ABI Platform
fennec_rag-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 923.5 kB

Release files / fennec_rag-1.1.1.tar.gz

Download URL fennec_rag-1.1.1.tar.gz
Size 413.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d2a0a0c7bdb814bda0df05fab6cbcc2af3d17c6189a67de5d055fc9e1d79d5b8
BLAKE2b-256 checksum
How to use checksums
9d24ba05aab17461b6c2fc4c5a6c6158282ee50e27ddf431c8b0e58d62583e8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / fennec_rag-1.1.1-py3-none-any.whl

Download URL fennec_rag-1.1.1-py3-none-any.whl
Size 509.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
243f120396eee25430fb37f446b0c12e7b200c3f7fa536ab8c97b5083ead835a
BLAKE2b-256 checksum
How to use checksums
cad7451ef17bc696864d20b9fb72f23bedad626abfcd901c18b40d408fd8cc06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.1.1 This release

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