feat: implement AgenticRAG system with datapizza-ai

Major refactoring from NotebookLM API to Agentic Retrieval System:

## New Features
- AgenticRAG backend powered by datapizza-ai framework
- Web interface for document upload and chat
- REST API with Swagger/OpenAPI documentation
- Document processing pipeline (Docling, chunking, embedding)
- Qdrant vector store integration
- Multi-provider LLM support (OpenAI, Google, Anthropic)

## New Components
- src/agentic_rag/api/ - FastAPI REST API
  - Documents API (upload, list, delete)
  - Query API (RAG queries)
  - Chat API (conversational interface)
  - Swagger UI at /api/docs
- src/agentic_rag/services/
  - Document service with datapizza-ai pipeline
  - RAG service with retrieval + generation
  - Vector store service (Qdrant)
- static/index.html - Web UI (upload + chat)

## Dependencies
- datapizza-ai (core framework)
- datapizza-ai-clients-openai
- datapizza-ai-embedders-openai
- datapizza-ai-vectorstores-qdrant
- FastAPI, Pydantic, Qdrant

## API Endpoints
- POST /api/v1/documents - Upload documents
- GET /api/v1/documents - List documents
- POST /api/v1/query - Query knowledge base
- POST /api/v1/chat - Chat interface
- GET /api/docs - Swagger documentation
- GET / - Web UI

🏁 Ready for testing and deployment!
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-06 10:56:43 +02:00
parent f1016f94ca
commit 2aa1f66227
18 changed files with 1321 additions and 0 deletions

46
src/agentic_rag/README.md Normal file
View File

@@ -0,0 +1,46 @@
# AgenticRAG - Agentic Retrieval System
Powered by [datapizza-ai](https://github.com/datapizza-labs/datapizza-ai)
## Quick Start
```bash
# Install dependencies
pip install datapizza-ai datapizza-ai-clients-openai datapizza-ai-embedders-openai datapizza-ai-vectorstores-qdrant
# Start Qdrant (vector store)
docker run -p 6333:6333 qdrant/qdrant
# Run the API
python -m agentic_rag.api.main
```
## Features
- 🌐 **Web Interface** - User-friendly UI for document upload and chat
- 🔌 **REST API** - Full API with Swagger documentation at `/api/docs`
- 🤖 **Agentic RAG** - Powered by datapizza-ai framework
- 📄 **Document Processing** - PDF, DOCX, TXT, MD support
- 🔍 **Semantic Search** - Vector-based retrieval with Qdrant
- 💬 **Chat Interface** - Conversational AI with context
## API Endpoints
- `POST /api/v1/documents` - Upload document
- `GET /api/v1/documents` - List documents
- `POST /api/v1/query` - Query knowledge base
- `POST /api/v1/chat` - Chat endpoint
- `GET /api/health` - Health check
- `GET /api/docs` - Swagger UI
## Architecture
```
Web UI (React/Vanilla JS)
FastAPI REST API
datapizza-ai RAG Pipeline
Qdrant Vector Store
```