Hereโs how they built the system end-to-end:
The system is called QueryGPT and is built on top of multiple agents each handling a part of the pipeline.
1. First, the Intent Agent interprets user intent and figures out the domain workspace which is relevant to answer the question (e.g., Mobility, Billing, etc).
2. The Table Agent then selects suitable tables using an LLM, which users can also review and adjust.
3. Next, the Column Prune Agent filters out any unnecessary columns from large tables using RAG. This helps the schema fit within token limits.
4. Finally, QueryGPT uses Few-Shot Prompting with selected SQL samples and schemas to generate the query.
QueryGPT reduced query authoring time from 10 minutes to 3, saving over 140,000 hours annually!
Link to the full article: https://www.uber.com/en-IN/blog/query-gpt/?uclick_id=6cfc9a34-aa3e-4140-9e8e-34e867b80b2b