fennec-community
Production-grade RAG framework with Arabic NLP support
fennec-community is a modular Python library for building Retrieval-Augmented Generation (RAG) pipelines. It ships with first-class support for Arabic text and integrates with all major LLM providers, embedding models, and vector databases.
Features
- Smart Chunking — Semantic, adaptive, structure-aware, context-aware, and Arabic-specific chunkers
- Embeddings — OpenAI, Gemini, Mistral, Ollama, HuggingFace, and a dedicated Arabic embedder
- LLM Interfaces — Unified API over OpenAI, Anthropic, Gemini, Mistral, Groq, and Ollama
- Vector Databases — FAISS, ChromaDB, and Pinecone
- RAG Variants — Standard, Agentic, Conversational, Graph, Hybrid, Multi-Doc, Multi-Hop, Streaming, Domain-Specific, Self-Improving
- Prompt Engine — Dynamic context-aware prompt building with strategy support
- Router — Hierarchical semantic routing with caching, feedback, and observability
- Plugin System — Extensible plugin architecture with security controls
- Output Parsers — JSON, YAML, CSV, Pydantic, structured output with auto-fix and retry
- Document Loaders — PDF, DOCX, HTML, CSV, JSON, plain text, web, and directory loaders
Installation
pip install fennec-community
Install with optional extras for your provider of choice:
pip install fennec-community[openai] # OpenAI LLM + embeddings
pip install fennec-community[anthropic] # Anthropic Claude
pip install fennec-community[gemini] # Google Gemini
pip install fennec-community[ollama] # Local Ollama models
pip install fennec-community[faiss] # FAISS vector store
pip install fennec-community[chroma] # ChromaDB vector store
pip install fennec-community[pinecone] # Pinecone vector store
pip install fennec-community[arabic] # Arabic NLP tools
pip install fennec-community[all] # Everything
Quick Start
Basic RAG Pipeline
from fennec_community.rag.core import RAGSystem, RAGConfig
from fennec_community.embeddings import OpenAIEmbedder
from fennec_community.vector_database import FAISSVectorDatabase
config = RAGConfig(top_k=5)
embedder = OpenAIEmbedder(api_key="sk-...")
db = FAISSVectorDatabase(embedder=embedder)
rag = RAGSystem(config=config, vector_db=db)
rag.load_documents(["path/to/docs/"])
answer = rag.query("What is the capital of France?")
print(answer)
Arabic Chunking
from fennec_community.chunks import ArabicTextChunker, ChunkConfig
chunker = ArabicTextChunker(config=ChunkConfig(chunk_size=512))
chunks = chunker.chunk("النص العربي هنا...")
for chunk in chunks:
print(chunk.text)
Conversational RAG
from fennec_community.rag.types.conversational_rag import ConversationalRAG
crag = ConversationalRAG(rag_system=rag)
response = crag.chat("Tell me about the report.")
response2 = crag.chat("Can you summarize the key points?")
Semantic Router
from fennec_community.router import HierarchicalRouter, Route, RouteGroup
router = HierarchicalRouter()
router.add_group(
RouteGroup(
name="support",
routes=[
Route(name="billing", keywords=["invoice", "payment", "refund"]),
Route(name="technical", keywords=["error", "bug", "crash"]),
]
)
)
result = router.route("I need help with my invoice")
print(result.matched_route) # "billing"
LLM Interface
from fennec_community.llm import OpenAIInterface
llm = OpenAIInterface(api_key="sk-...")
response = llm.chat("Explain RAG in one sentence.")
print(response)
Output Parsing
from fennec_community.output_parser import OutputParser
parser = OutputParser()
result = parser.parse('{"name": "Alice", "age": 30}', format="json")
print(result) # {'name': 'Alice', 'age': 30}
Modules
| Module | Description |
|---|---|
fennec_community.chunks |
Text chunking strategies including Arabic support |
fennec_community.embeddings |
Embedding models for multiple providers |
fennec_community.llm |
LLM provider interfaces |
fennec_community.vector_database |
Vector store backends (FAISS, Chroma, Pinecone) |
fennec_community.rag |
Full RAG system with multiple retrieval strategies |
fennec_community.prompt |
Prompt engineering and context management |
fennec_community.router |
Semantic routing with hierarchical matching |
fennec_community.context |
Context window management and retrieval |
fennec_community.output_parser |
Structured output parsing and validation |
fennec_community.document_loaders |
Document ingestion from various sources |
fennec_community.plugins |
Plugin system for extending functionality |
fennec_community.chain |
Sequential, parallel, and conditional chains |
RAG Variants
| Variant | Class | Use Case |
|---|---|---|
| Standard RAG | RAGSystem |
General question answering |
| Agentic RAG | AgenticRAG |
Multi-step reasoning with tool use |
| Conversational RAG | ConversationalRAG |
Multi-turn chat with memory |
| Graph RAG | GraphRAG |
Knowledge graph-based retrieval |
| Hybrid Search RAG | HybridSearchRAG |
Dense + sparse retrieval |
| Multi-Doc RAG | MultiDocRAG |
Cross-document reasoning |
| Multi-Hop RAG | MultiHopRAG |
Complex multi-step queries |
| Streaming RAG | StreamingRAG |
Token-by-token streaming responses |
| Domain RAG | DomainSpecificRAG |
Domain-constrained retrieval |
| Self-Improving RAG | SelfImprovingRAG |
Iterative refinement with HyDE |
| Federated RAG | FederatedRAG |
Multi-source distributed retrieval |
Requirements
- Python >= 3.9
- pydantic >= 2.0
- numpy >= 1.24
- tiktoken >= 0.5
All other dependencies are optional and installed via extras.
License
MIT License — see LICENSE for details.
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
Metadata
Release files for fennec-community 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fennec_community-0.1.0.tar.gz | 439.0 kB | Without provenance | Details for fennec_community-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fennec_community-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fennec_community-0.1.0-py3-none-any.whl |
Total release size: 979.5 kB
Release files / fennec_community-0.1.0.tar.gz
| Download URL | fennec_community-0.1.0.tar.gz |
|---|---|
| Size | 439.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c63b73115cd323092eda44ec6a008efffe2ff592be6afdda95e5fb30bbaf4732
|
|
BLAKE2b-256 checksum How to use checksums |
fb37556c3f36e73384b72342bd212a22fbf27be75a54893c950c41c4ebd75e74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / fennec_community-0.1.0-py3-none-any.whl
| Download URL | fennec_community-0.1.0-py3-none-any.whl |
|---|---|
| Size | 540.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccf73e3e825262f0f151e0b07f652765e08aa544c807304cf4f9b06c054fb0ed
|
|
BLAKE2b-256 checksum How to use checksums |
25fa996819b95f9000c6d6367a10eac056f1a4ecb48f4d87b47caa8c03495a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for fennec-community 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.