> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brewit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluation

> Evaluate text-to-SQL on your db to ensure accurate query generation.

## Overview

Evaluation feature allows you to evaluate the text-to-SQL model against your database to ensure accurate query generation and answers.
This feature is useful for verifying the model's performance and identifying areas for improvement.

<Frame>
  <img src="https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/images/screenshots/evaluation-overview.png?fit=max&auto=format&n=pyjAYulKSUrvhjf5&q=85&s=e6c13ada2c7d60719688a5c16a129485" alt="Evaluation overview" width="3024" height="1890" data-path="images/screenshots/evaluation-overview.png" />
</Frame>

## Evaluate text-to-SQL against your database

<Steps>
  <Step title="Create test questions">
    There are 2 ways to create test questions:

    * **Manual**: Manually create test questions by typing them in the input field.
    * **Upload CSV**: Upload a CSV file containing test questions.
  </Step>

  <Step title="Run questions">
    Select the test questions you want to evaluate and run them against your database.

    <Frame>
      <img src="https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/images/screenshots/evaluation-run-questions.gif?s=12290873fe152cf7beede2312ac630f2" alt="Run questions" width="1152" height="720" data-path="images/screenshots/evaluation-run-questions.gif" />
    </Frame>
  </Step>

  <Step title="Verify answers">
    Verify the generated SQL queries and answers to ensure they are accurate.

    <Frame>
      <img src="https://mintcdn.com/brewit-84/pyjAYulKSUrvhjf5/images/screenshots/evaluation-verify-answer.png?fit=max&auto=format&n=pyjAYulKSUrvhjf5&q=85&s=3bd13cdee7435d30009c54fd82620b0d" alt="Verify answers" width="3024" height="1890" data-path="images/screenshots/evaluation-verify-answer.png" />
    </Frame>
  </Step>
</Steps>

## FAQs

### How do I correct an incorrect query?

If the generated SQL query is incorrect, here are some steps you can take:

* **Add correct query into [<u>Query Library</u>](/docs/data-agent/train/query-library)**: Save the correct query in the Query Library for future reference.
* **Enrich data catalog**: Add missing information to the data catalog to help the model generate accurate queries.
* **Storing distinct values**: Use the [<u>Distinct Values</u>](/docs/data-agent/train/distinct-values) feature to store unique string values of a column.

### Can I evaluate multiple questions at once?

Yes, you can evaluate multiple questions at once by selecting them and running the evaluation.
