IDinsight builds pseudo-agent Text-to-SQL pipeline for WhatsApp-based data access (Ask-a-Metric)
IDinsight's simple pipeline for Ask-a-Metric produced insufficiently accurate LLM responses, suffered from brittle prompt engineering where improving one query set hurt another, and had a tightly coupled sequential architecture that made iteration slow.
How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · User submits natural language question
Ask-a-Metric collects a user's natural language question.
Tools used
LLMsFastAPICrewAILangchainRAG
Outcome
The pseudo-agent pipeline achieves response times under 15 seconds and costs below USD 0.02 per query while maintaining accuracy, combining the low cost and quick response time of the simple pipeline with the better accuracy of the agentic approach.
What failed first
The CrewAI agentic pipeline answered all test questions correctly but was prohibitively slow and expensive for production: response times exceeded one minute per query and cost approximately USD 0.3 per query, both well above the production targets of under 30 seconds and under USD 0.03.