1. Work
  2. About
  3. Experience
  4. Highlights
  5. Contact
View résumé

All work

Case study · 03 · LLM application · Team lead

Chat‑DB: ask the question before you remember the syntax.

A Gemini‑powered application that turns plain‑language questions into reviewable MySQL or MongoDB queries. It cut query‑construction time by roughly 60% for people who were not comfortable writing database syntax by hand.

Category
LLM application, data tooling
Stack
Python · Streamlit · Google Gemini API · MySQL · MongoDB
Timeline
Mar 2025 — May 2025 · USC
Recognition
Team lead
Four‑person graduate project
Chat-DB converting an English question into a SQL query with a run button

Overview

A person can understand the business question and still get blocked by joins, field names or MongoDB aggregation syntax. Chat‑DB removes that first barrier. The user connects a database, asks in ordinary language, and gets a query they can review, edit and run.

I led the four‑person team, shaped the architecture, managed the delivery plan, and worked with teammates on prompting and API integration. The project also showed us where language models need structure: real schema context, dialect‑specific instructions and a human‑controlled execution step.

How it works

  • Schema grounding. On connect, the app reads available tables, collections and fields, then compresses that schema into the model context so Gemini generates against the real database instead of guessing names.
  • Dialect‑aware prompting. Separate prompt paths handle SQL and MongoDB's aggregation pipeline, because the two engines need different syntax and reasoning.
  • Review before run. The generated query appears in an editable block. Nothing executes until the user confirms.
  • Results and explanation. After execution the app renders the result table and explains in plain language what the query did.
  • Guard rails. Potentially destructive statements are flagged and need an extra confirmation.

Impact

~60%
faster query construction
2
engines: MySQL and MongoDB
4
person team, which I led

What I learned

Language models need structure to be trustworthy near a database. Real schema context, dialect-specific instructions and a human-controlled execution step did more for output quality than any amount of prompt polish.

Leading the team taught me to split an ambiguous brief into reviewable pieces, and to make the risky part, query execution, the most visible part of the interface.