A RAG-powered chatbot that retrieves relevant context from diverse sources using a vector database and generates precise, context-aware answers with an LLM.
-
Watch the demo recording: https://www.loom.com/share/ea8a35c957784b0280f09998dfe10346
-
Screenshots of the app are available in the img folder.
- Upload multiple documents: Select and query any uploaded document.
- Natural Language to SQL: Hybrid RAG approach for converting questions to SQL.
- Database integration: Connect your database; QueryBox extracts schemas and retrieves context for LLM-generated SQL queries.
- Context-aware answers: LLM processes SQL results and returns precise responses.
- Hybrid RAG Natural Language SQL Query:
Connect your database, QueryBox extracts relevant schemas, LLM generates SQL queries, and the results are fed back into LLM to produce accurate, context-aware responses.
/frontend # Next.js app
/backend # FastAPI app
QueryBox uses Docker Compose to run the frontend, backend, and required services (PostgreSQL, Redis, Qdrant) together.
- Docker (>= 24.x)
- Docker Compose (included with Docker Desktop)
Before running Docker, copy each directory's .env.example to .env and set required variables.
Commands (run from repo root):
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envFrom the root of the repository:
-
Build all services:
docker-compose build -
Start all services in detached mode:
docker-compose up -d -
Verify running containers:
docker ps
You should see containers for:
- frontend-app (Next.js): http://localhost:3000
- backend-api (FastAPI): http://localhost:8000
- postgres-db, redis, qdrant
-
Stop all containers:
docker-compose down -
Stop and remove containers, networks, and volumes:
docker-compose down -v
- The frontend communicates with the backend using the Docker network: use
http://backend:8000inside Docker. - Update
.envfiles in/backendfor database credentials, Redis, and Qdrant configuration. - The backend Dockerfile is reused; the frontend Dockerfile is in
/frontend/Dockerfile.
MIT License