# Examples: Reviewed SQL for Your AI Agent

> Pair a question your team asks with SQL you’ve run and reviewed. A Supaboard agent reads its examples before it answers, and marks answers whose SQL matches one.

HTML version: https://supaboard.ai/product/agent-examples

Give recurring questions SQL your team has reviewed.

An example pairs a question your team asks with SQL you’ve run and checked. Your agent reads its examples before it answers, so related questions start from the joins, definitions and filters your team already uses.

## How it works

1. **Choose the question.** One your team asks often, the way they ask it.
2. **Add and run the SQL.** Save & Run Query runs it; check the result answers the question.
3. **Save the example.** The agent reads it before it answers related questions.

## Save the logic behind a familiar question

Choose a question your team asks regularly, like “What was net revenue in September?”, add the SQL and run it against your data. Check the result before you save it as an example for the agent to reuse.

- Save & Run Query runs the SQL before you save it
- Each example keeps the question, the SQL and its source

## Make important filters part of the example

An example records more than a number: the joins, date boundaries and exclusions behind it. When the agent reads a table, the examples on it show the filters your team applies, like leaving out test accounts.

- Examples on a table show the agent its usual filters
- The agent reads your examples before it answers

## See when an answer matches one

When the SQL behind an answer matches an example, the answer is marked as a verified query and rated high confidence. Add the same question as an eval, and rerun it after changes to check the agent still answers it your way.

- Marked as a verified query, rated high confidence
- Add the question as an eval to keep checking it

## FAQ

### What is an example?

A question your team asks, paired with SQL you’ve run and reviewed. When the SQL behind an answer matches one, the answer is marked as a verified query.

### Does a question need to use the same wording?

No. The agent reads your examples before it answers, so related questions in other words can use them. When a question changes the period, the metric or who’s counted, add that variation as an eval to check it.

### What should I check before saving one?

That the SQL runs, which Save & Run Query does for you, and that the result answers the question: the right joins, filters and definition.

### How are examples different from evals?

Examples show the agent how your team answers a question. Evals test how it answers. Use the same question in both, and add evals for variations your examples don’t cover.

### Where do I add them?

In the agent’s Examples tab.

Part of [Agents](https://supaboard.ai/product/agents).

---

- Site index for agents: https://supaboard.ai/llms.txt
- Sitemap: https://supaboard.ai/sitemap.xml
- Blog feed: https://supaboard.ai/blog/rss.xml
- Product documentation: https://docs.supaboard.ai

Any page on https://supaboard.ai is available as markdown: append `.md` to its path, or send `Accept: text/markdown`.
