I recently worked on a project. To better understand which method works better for us, it is very important to understand the nature of the database. The database I was working on consisted of 16 columns and 20,001 rows, all related to company addresses and a few other details regarding their statuses. I was tasked with fetching data according to user queries, but I had to ensure there was zero hallucination. The system also needed to support aggregate functions, such as calculating maximums and averages. Since the chatbot was developed as a Proof of Concept (POC), the database size was intentionally kept small.
Now that I am clear on the requirements and the nature of the dataset, I'll explain my approach and would like feedback on how I can improve it, as I am fairly new to the trade. I opted for a Text-to-SQL architecture because it provides higher deterministic accuracy than RAG and can perform average, max, and other operations; this is what we wanted to use on the database as it was a core functionality of the chatbot. Furthermore, since there will be a maximum of 100 concurrent users and the database supports horizontal scaling without the computational overhead of re-indexing vectors, I believe it is a more efficient approach—especially since the type of dataset I am working on has columns (like 'capital') that might be changed frequently.
Top comments (0)