đ Agent RAG haute performance fonctionnant 100% en local sur CPU.
Python
0
33 commits
updated Dec 13, 2025

pip install -r requirements.txtpython src/retrieval/reranker_installer.pypython models/llm/llm_model_installer.pystreamlit run app.pypython clear_cache.pypython monitoring/verify_paths.pyVEV RAG est un systĂšme de recherche documentaire intelligent qui combine :
Le projet fonctionne entiÚrement en local, sans dépendance cloud, garantissant confidentialité et autonomie.
graph TB
A[Documents PDF/DOCX/TXT/Web] --> B[Ingestion & Nettoyage]
B --> C[Chunking Sémantique]
C --> D[Embeddings BGE-M3]
D --> E[LanceDB Vectorielle]
F[Question Utilisateur] --> G[Query Expansion HyDE]
G --> H[Recherche Hybride]
E --> H
H --> I[Reranking MXBai]
I --> J[LLM Qwen3-4B]
J --> K[Réponse Générée]
L[GPTCache] -.-> H
# Cloner le dépÎt
git clone https://github.com/user257814938/VEV_RAG.git
cd VEV_RAG
# Créer un environnement virtuel
python -m venv venv
source venv/bin/activate # Sur Windows: venv\Scripts\activate
# Installer les dépendances
pip install -r requirements.txt
# Télécharger les modÚles
python src/scripts/download_reranker.py
Créez un fichier .env à la racine (optionnel) :
# Chemins personnalisés (optionnel)
DATA_DIR=./data
MODELS_DIR=./models
streamlit run app.py
Ouvrez votre navigateur Ă http://localhost:8501
from main import VEVRAGAgent
# Initialiser l'agent
agent = VEVRAGAgent()
# Ingérer des documents
agent.ingest_documents(["document.pdf", "article.docx"])
# Poser une question
response = agent.query("Quelle est la définition de l'IA ?")
print(response)
# Lancer les tests
pytest tests/
# Test d'ingestion
python tests/test_ingestion.py
# Test de recherche
python tests/test_retrieval.py
VEV_RAG/
âââ đ app.py # Interface Streamlit
âââ đ main.py # Orchestration principale (VEVRAGAgent)
âââ đ requirements.txt # DĂ©pendances Python
âââ đ src/
â âââ đ core/
â â âââ config.py # Configuration & variables d'environnement
â â âââ schemas.py # Structures de donnĂ©es (Pydantic)
â âââ đ ingestion/
â â âââ loader_doc.py # Chargement PDF/DOCX (Docling)
â â âââ loader_web.py # Extraction web (Trafilatura)
â â âââ cleaner.py # Nettoyage texte (ftfy, Spacy)
â âââ đ indexing/
â â âââ chunker.py # Chunking sĂ©mantique
â â âââ embedder.py # Embeddings (FastEmbed + BGE-M3)
â â âââ vector_store.py # Base vectorielle (LanceDB)
â âââ đ retrieval/
â â âââ cache.py # Cache sĂ©mantique (GPTCache)
â â âââ query_expansion.py # AmĂ©lioration requĂȘtes (HyDE)
â â âââ reranker.py # Reranking (MXBai)
â âââ đ generation/
â â âââ llm_engine.py # Moteur LLM (Qwen3-4B GGUF)
â â âââ system_prompts.py # Prompts systĂšme
â âââ đ evaluation/
â â âââ ragas_eval.py # Ăvaluation qualitĂ© (RAGAS)
â âââ đ scripts/
â âââ download_reranker.py # TĂ©lĂ©chargement modĂšles
â âââ verify_paths.py # VĂ©rification structure
âââ đ data/
â âââ raw/ # Documents bruts
â âââ processed/ # Documents traitĂ©s
â âââ lancedb/ # Base vectorielle
âââ đ models/
â âââ llm/ # ModĂšles LLM (GGUF)
â âââ embeddings/ # ModĂšles embeddings
âââ đ tests/
âââ test_ingestion.py # Tests ingestion
âââ test_retrieval.py # Tests recherche
| Catégorie | Format | Extension | Moteur | Statut |
|---|---|---|---|---|
| Documents Office | .pdf | Docling (v2) | â SupportĂ© (avec OCR & Tableaux) | |
| Microsoft Word | .docx | Docling (v2) | â SupportĂ© | |
| Microsoft Excel | .xlsx | Docling (v2) | â SupportĂ© (Conversion Markdown) | |
| Microsoft PowerPoint | .pptx | Docling (v2) | â SupportĂ© | |
| Texte & Web | Texte Brut | .txt | Python Natif | â SupportĂ© (Ultra-rapide) |
| Markdown | .md | Python Natif | â SupportĂ© (Ultra-rapide) | |
| HTML / XHTML | .html, .htm | Docling (v2) | â SupportĂ© | |
| XML / AsciiDoc | .xml, .adoc | Docling (v2) | â SupportĂ© | |
| WebVTT | .vtt | Docling (v2) | â SupportĂ© (Sous-titres) | |
| Images (OCR) | Images | .png, .jpg, .tiff, .bmp, .webp | Docling (OCR) | â SupportĂ© |
| Audio (IA) | Audio | .mp3, .wav | Whisper Turbo | â SupportĂ© (Transcription) |
| SpĂ©cialisĂ© | JATS/USPTO XML | .xml | Docling (v2) | â SupportĂ© |
| Docling JSON | .json | Docling (v2) | â SupportĂ© |
| Composant | Technologie | Année | RÎle |
|---|---|---|---|
| Ingestion | Docling (IBM) | 2024 | Conversion PDF/DOCX â Markdown |
| Web Scraping | Trafilatura | 2019 | Extraction contenu web |
| Nettoyage | ftfy, clean-text, Spacy | 2012-2019 | Normalisation texte |
| Chunking | Semantic Chunking | 2023 | Segmentation intelligente |
| Embeddings | FastEmbed + BGE-M3 | 2023-2024 | Vectorisation ONNX |
| Base Vectorielle | LanceDB | 2023 | Stockage hybride (FTS + Vector) |
| Cache | GPTCache | 2023 | AccĂ©lĂ©ration requĂȘtes |
| Query Expansion | HyDE | 2022 | AmĂ©lioration requĂȘtes |
| Reranking | MXBai Rerank v2 | 2024 | Affinage résultats |
| LLM | Qwen3-4B (GGUF Q4) | 2025 | Génération réponses |
| Ăvaluation | RAGAS | 2023 | MĂ©triques qualitĂ© |
| Interface | Streamlit | 2019 | UI interactive |
docling>=2.0.0
trafilatura>=1.12.0
ftfy>=6.2.0
spacy>=3.7.0
fastembed>=0.3.0
lancedb>=0.13.0
gptcache>=0.1.43
llama-cpp-python>=0.2.0
ragas>=0.1.0
streamlit>=1.35.0
Les contributions sont les bienvenues ! Pour contribuer :
git checkout -b feature/amelioration)git commit -m 'Ajout fonctionnalité')git push origin feature/amelioration)Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus de détails.
Pour toute question ou suggestion, n'hésitez pas à ouvrir une issue.
Fait avec â€ïž pour la communautĂ© IA locale
â Si ce projet vous est utile, n'hĂ©sitez pas Ă lui donner une Ă©toile !
đ Agent RAG haute performance fonctionnant 100% en local sur CPU.
Python
0
33 commits
updated Dec 13, 2025

pip install -r requirements.txtpython src/retrieval/reranker_installer.pypython models/llm/llm_model_installer.pystreamlit run app.pypython clear_cache.pypython monitoring/verify_paths.pyVEV RAG est un systĂšme de recherche documentaire intelligent qui combine :
Le projet fonctionne entiÚrement en local, sans dépendance cloud, garantissant confidentialité et autonomie.
graph TB
A[Documents PDF/DOCX/TXT/Web] --> B[Ingestion & Nettoyage]
B --> C[Chunking Sémantique]
C --> D[Embeddings BGE-M3]
D --> E[LanceDB Vectorielle]
F[Question Utilisateur] --> G[Query Expansion HyDE]
G --> H[Recherche Hybride]
E --> H
H --> I[Reranking MXBai]
I --> J[LLM Qwen3-4B]
J --> K[Réponse Générée]
L[GPTCache] -.-> H
# Cloner le dépÎt
git clone https://github.com/user257814938/VEV_RAG.git
cd VEV_RAG
# Créer un environnement virtuel
python -m venv venv
source venv/bin/activate # Sur Windows: venv\Scripts\activate
# Installer les dépendances
pip install -r requirements.txt
# Télécharger les modÚles
python src/scripts/download_reranker.py
Créez un fichier .env à la racine (optionnel) :
# Chemins personnalisés (optionnel)
DATA_DIR=./data
MODELS_DIR=./models
streamlit run app.py
Ouvrez votre navigateur Ă http://localhost:8501
from main import VEVRAGAgent
# Initialiser l'agent
agent = VEVRAGAgent()
# Ingérer des documents
agent.ingest_documents(["document.pdf", "article.docx"])
# Poser une question
response = agent.query("Quelle est la définition de l'IA ?")
print(response)
# Lancer les tests
pytest tests/
# Test d'ingestion
python tests/test_ingestion.py
# Test de recherche
python tests/test_retrieval.py
VEV_RAG/
âââ đ app.py # Interface Streamlit
âââ đ main.py # Orchestration principale (VEVRAGAgent)
âââ đ requirements.txt # DĂ©pendances Python
âââ đ src/
â âââ đ core/
â â âââ config.py # Configuration & variables d'environnement
â â âââ schemas.py # Structures de donnĂ©es (Pydantic)
â âââ đ ingestion/
â â âââ loader_doc.py # Chargement PDF/DOCX (Docling)
â â âââ loader_web.py # Extraction web (Trafilatura)
â â âââ cleaner.py # Nettoyage texte (ftfy, Spacy)
â âââ đ indexing/
â â âââ chunker.py # Chunking sĂ©mantique
â â âââ embedder.py # Embeddings (FastEmbed + BGE-M3)
â â âââ vector_store.py # Base vectorielle (LanceDB)
â âââ đ retrieval/
â â âââ cache.py # Cache sĂ©mantique (GPTCache)
â â âââ query_expansion.py # AmĂ©lioration requĂȘtes (HyDE)
â â âââ reranker.py # Reranking (MXBai)
â âââ đ generation/
â â âââ llm_engine.py # Moteur LLM (Qwen3-4B GGUF)
â â âââ system_prompts.py # Prompts systĂšme
â âââ đ evaluation/
â â âââ ragas_eval.py # Ăvaluation qualitĂ© (RAGAS)
â âââ đ scripts/
â âââ download_reranker.py # TĂ©lĂ©chargement modĂšles
â âââ verify_paths.py # VĂ©rification structure
âââ đ data/
â âââ raw/ # Documents bruts
â âââ processed/ # Documents traitĂ©s
â âââ lancedb/ # Base vectorielle
âââ đ models/
â âââ llm/ # ModĂšles LLM (GGUF)
â âââ embeddings/ # ModĂšles embeddings
âââ đ tests/
âââ test_ingestion.py # Tests ingestion
âââ test_retrieval.py # Tests recherche
| Catégorie | Format | Extension | Moteur | Statut |
|---|---|---|---|---|
| Documents Office | .pdf | Docling (v2) | â SupportĂ© (avec OCR & Tableaux) | |
| Microsoft Word | .docx | Docling (v2) | â SupportĂ© | |
| Microsoft Excel | .xlsx | Docling (v2) | â SupportĂ© (Conversion Markdown) | |
| Microsoft PowerPoint | .pptx | Docling (v2) | â SupportĂ© | |
| Texte & Web | Texte Brut | .txt | Python Natif | â SupportĂ© (Ultra-rapide) |
| Markdown | .md | Python Natif | â SupportĂ© (Ultra-rapide) | |
| HTML / XHTML | .html, .htm | Docling (v2) | â SupportĂ© | |
| XML / AsciiDoc | .xml, .adoc | Docling (v2) | â SupportĂ© | |
| WebVTT | .vtt | Docling (v2) | â SupportĂ© (Sous-titres) | |
| Images (OCR) | Images | .png, .jpg, .tiff, .bmp, .webp | Docling (OCR) | â SupportĂ© |
| Audio (IA) | Audio | .mp3, .wav | Whisper Turbo | â SupportĂ© (Transcription) |
| SpĂ©cialisĂ© | JATS/USPTO XML | .xml | Docling (v2) | â SupportĂ© |
| Docling JSON | .json | Docling (v2) | â SupportĂ© |
| Composant | Technologie | Année | RÎle |
|---|---|---|---|
| Ingestion | Docling (IBM) | 2024 | Conversion PDF/DOCX â Markdown |
| Web Scraping | Trafilatura | 2019 | Extraction contenu web |
| Nettoyage | ftfy, clean-text, Spacy | 2012-2019 | Normalisation texte |
| Chunking | Semantic Chunking | 2023 | Segmentation intelligente |
| Embeddings | FastEmbed + BGE-M3 | 2023-2024 | Vectorisation ONNX |
| Base Vectorielle | LanceDB | 2023 | Stockage hybride (FTS + Vector) |
| Cache | GPTCache | 2023 | AccĂ©lĂ©ration requĂȘtes |
| Query Expansion | HyDE | 2022 | AmĂ©lioration requĂȘtes |
| Reranking | MXBai Rerank v2 | 2024 | Affinage résultats |
| LLM | Qwen3-4B (GGUF Q4) | 2025 | Génération réponses |
| Ăvaluation | RAGAS | 2023 | MĂ©triques qualitĂ© |
| Interface | Streamlit | 2019 | UI interactive |
docling>=2.0.0
trafilatura>=1.12.0
ftfy>=6.2.0
spacy>=3.7.0
fastembed>=0.3.0
lancedb>=0.13.0
gptcache>=0.1.43
llama-cpp-python>=0.2.0
ragas>=0.1.0
streamlit>=1.35.0
Les contributions sont les bienvenues ! Pour contribuer :
git checkout -b feature/amelioration)git commit -m 'Ajout fonctionnalité')git push origin feature/amelioration)Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus de détails.
Pour toute question ou suggestion, n'hésitez pas à ouvrir une issue.
Fait avec â€ïž pour la communautĂ© IA locale
â Si ce projet vous est utile, n'hĂ©sitez pas Ă lui donner une Ă©toile !