Answer business data questions in plain language by writing and running SQL

QuintoAndar built Tars, a data agent that writes and runs SQL for staff questions. In one month several hundred employees ran about 47,000 queries and got about 9,000 questions answered.

Done withCustom agentinGitHub· Nov 25, 2026

What they did

Luisa Rodrigues describes the data agent her team at the Brazilian property company QuintoAndar released in February 2026. Staff in product, design and operations used to message data engineers to find tables and join keys. Tars began as a rule in the analytics monorepo that people called from Cursor, then shipped as a plugin for Claude once the company rolled Claude out widely. It takes a question in natural language, reads its context only from the DataHub catalog, writes SQL and runs it on Trino under the asking user's own SSO permissions. Each business entity and metric has a markdown file with tables, joins, traps and golden queries. A second agent, Luigi, interviews business owners in the internal chat, checks their answers and opens a GitHub pull request on their behalf. Every change to those files runs an eval harness where an LLM judge scores the generated SQL.

How it went

In a recent month several hundred employees across six lines of business ran roughly 47,000 queries and took about 9,000 questions from asked to answered, which the team says saved thousands of work hours. A ten-question test in one domain showed grounded answers beat the bare model, though the team says that is not a benchmark. The bigger effect was on the data itself: an audit found about 75% of table metadata was low quality, and the project turned into a governance effort. Data engineers now spend less time on discovery questions.

Worth knowing

This is the company's own engineering blog, written by the team that built it. The agent is only as good as the catalog behind it; wrong answers traced back to stale or vague table descriptions. Official numbers often had extra rules in spreadsheets outside the repo, so the team added separate metric files to capture them. Queries run under each user's permissions, so the agent cannot widen data access.

Try it

With Custom agent· 3 parts to fill in

Act as a data analyst for [my company]. When I ask a question in plain language, look up the relevant tables, joins and metric definitions only in [our data catalog or context files], then write SQL for [our warehouse, for example Trino or Snowflake]. Use the official metric definition and filters when one exists and say which one you used. Show me the SQL and the tables it reads before running it, run it only with my own credentials, and stop if no documented table covers the question instead of guessing.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related