Case study · Nawatech internship · Oct 2025 – Feb 2026
DemoLabs AI Chatbot
An analytics assistant that answers questions in one chat interface: document QnA, RAG-based Text-to-SQL, PDF/OCR analysis and chart generation. I built it as a Machine Learning Engineer Intern at Nawa Darsana Technology (Nawatech).
- Answer correctness
- 0.885
- Mean across 60 DeepEval test cases
- End-to-end latency
- 3.23s
- Mean over 60 benchmark queries: 0.40s retrieval, 2.57s generation
- Backend
- 6 / 5 / 4
- Containers / RabbitMQ queues / Celery workers
Problem
Analytics users needed answers from complex datasets, but writing SQL by hand, reviewing PDFs and preparing charts slowed every decision. Each of those tasks needs a different pipeline, and users should not have to know which one to pick.
What I built
- Intent routing that sends each question to QnA retrieval, Text-to-SQL, PDF/OCR analysis or chart generation.
- A RAG and Text-to-SQL pipeline on pgvector with Azure OpenAI embeddings: schema retrieval first, then few-shot SQL generation.
- The async backend: FastAPI, Celery, RabbitMQ, Redis and Docker.
- An automated evaluation and regression-testing setup with DeepEval and Azure OpenAI.
Architecture
Requests enter through FastAPI. Work is split by type across 5 RabbitMQ queues and handled by 4 Celery workers, so QnA, PDF and SQL workloads don't compete for the same worker. Redis is part of the stack, and the system runs as 6 Docker containers.
- FastAPIRequest and intent routing
- RabbitMQ5 queues, split by workload
- Celery4 workers: QnA, PDF, SQL
- pgvectorChunk and schema retrieval
- Azure OpenAIEmbeddings and generation
Evaluation
A DeepEval suite of 60 test cases across difficulty levels scores answer correctness and writes Excel and Markdown reports, so a change to retrieval or model settings can be compared against the previous run.
The latency split points to where future work should go. Retrieval takes 0.40s of the 3.23s mean; LLM generation takes 2.57s.