A simple Proof of Concept (PoC) for a Retrieval-Augmented Generation (RAG) service using:
- FastAPI → backend API
- Qdrant → vector database
This service allows:
- Uploading documents (PDF, DOCX, TXT)
- Extracting and splitting text into chunks
- Generating embeddings for each chunk
- Storing embeddings in Qdrant
- Answering questions by searching relevant chunks via vector similarity
docker-compose up
- REST API → http://localhost:6333
- Web UI → http://localhost:6333/dashboard
- API → http://localhost:8000
Run locally in development mode:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000or via Docker-compose:
docker-compose up --buildPOST /upload-file- Receive uploaded files (PDF, DOCX, TXT)
- Extract and split text into chunks
- Generate embeddings
- Store vectors in Qdrant
POST /ask- Receive a question
- Generate question embedding
- Search Qdrant for similar vectors
- Return relevant context to answer the question