# RAGGER - Setup TODO ## Debug Utility ```bash cd /home/codex/RAGGER source venv/bin/activate python debug.py # Menu interattivo python debug.py health # Health check completo python debug.py status # Mostra stato processi python debug.py kill # Kill streamlit python debug.py clean # Pulisci locks python debug.py reset-db # Reset database (vectors) python debug.py reset-uploads # Reset uploads (files) python debug.py reset-all # Reset completo (DESTROY ALL) python debug.py logs # Mostra log python debug.py test-embed # Test embedding python debug.py test-gen # Test generazione python debug.py test-qdrant # Test Qdrant ``` --- ## Comandi da eseguire ### 1. Installa dipendenze sistema (richiede sudo) ```bash sudo apt-get update sudo apt-get install -y tesseract-ocr tesseract-ocr-ita tesseract-ocr-eng poppler-utils ``` ### 2. Verifica installazione ```bash tesseract --version pdftoppm -v ``` ### 3. Health Check ```bash python debug.py health ``` ### 4. Avvia l'applicazione ```bash streamlit run app.py ``` ### 5. Accedi all'app Apri nel browser: http://localhost:8501 --- ## Struttura Progetto ``` ragger/ ├── app.py # UI Streamlit ├── core.py # Logica RAG ├── ocr.py # Tesseract OCR ├── chunker.py # Text chunking ├── ollama_client.py # Client Ollama ├── vectorstore.py # Qdrant ├── config.py # Settings ├── logger.py # Logging system ├── debug.py # Debug utility ├── .env # Configurazione attiva ├── data/ │ ├── uploads/ # Documenti caricati │ └── qdrant/ # Vector DB ├── logs/ │ └── ragger.log # Log file └── venv/ # Virtual environment ``` --- ## Configurazione (.env) ``` LLM_PROVIDER=ollama OLLAMA_HOST=https://ollama.solarpi.net OLLAMA_MODEL=gemma2:9b OLLAMA_EMBED_MODEL=pedrovillalobos/nomic-embed-text-no-gpu LOG_LEVEL=DEBUG ``` --- ## Note - L'app usa Tesseract per OCR su PDF e immagini - I documenti vengono convertiti in chunks da 512 token - Gli embedding sono salvati in Qdrant locale - Ollama remoto per generazione e embedding - Logging verboso in `logs/ragger.log`