Skip to main content
A model knows SQL but it does not know that revenue was replaced by revenue_v2 last March, that “active” excludes trialing accounts, or that MRR is computed net of credits. Grounding provides the missing context. The agent retrieves the relevant context for each question before it writes a line of SQL.
search_knowledge=True lets the agent pull the matching context per question instead of carrying the entire data dictionary in every prompt.

The layers worth curating

A production data agent grounds each answer in several layers. The first set is curated and stored in a vector database. The rest are live.

Validated queries are the highest-leverage layer

One known-good query for “monthly recurring revenue” is worth more than a page of schema notes. When the agent retrieves a validated query for a similar question, it adapts a correct shape instead of inventing one. Seed the store with the queries your analysts already trust.

Grounding vs raw text-to-SQL

Next steps

Developer Resources