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

# Validate and Test Answers

This guide is for Administrators responsible for ensuring the accuracy of WisdomAI responses. This workflow typically begins after an end-user [provides negative feedback on an answer](/setting-up-wisdom-ai/feedback-mechanisms/provide-feedback-to-the-system).

Here, you will learn how to edit, test, and validate responses to build confidence and improve the system's knowledge base.

## Prerequisites

* You must have **Administrator** permissions. For details, see [Access Management](/manage-account/access-management).

## 1. Edit the SQL query

When an answer is incorrect, you can directly edit the underlying SQL query.

1. Click the **Edit** button on the answer card in the chat interface.

<img src="https://mintcdn.com/wisdomai/oq67V3T9jhHN9WJO/images/chat-workstream-edit.png?fit=max&auto=format&n=oq67V3T9jhHN9WJO&q=85&s=379f6e43c2a0d54eab09a1ba8cda50e6" alt="Chat workstream showing the edit button" className="mx-auto" style={{ width:"95%" }} width="762" height="938" data-path="images/chat-workstream-edit.png" />

2. The **Editor** window will open. Go to the **SQL Code** tab.
3. Modify the SQL statement to fix inaccuracies, add joins, or correct filters.
4. Click **Update response** to run the revised query and refresh the data.
5. (Optional) Switch back to the **Editor** tab to configure chart types, add filters, or drag-and-drop columns for visualization.

<img src="https://mintcdn.com/wisdomai/82xgEVWUP7cwhDHG/images/update-response.png?fit=max&auto=format&n=82xgEVWUP7cwhDHG&q=85&s=2ff080ae1ca72ba76af18131be1e6177" alt="Update response option" width="1209" height="630" data-path="images/update-response.png" />

## 2. Test the updated answer

After editing the query, you must test the new response.

* **Retry with Adjustments:** Use the **Retry** option in the chat window to have the system regenerate the response using your new SQL.
* **Cross-Reference:** Validate the new result by cross-referencing it with a known value or an external report.
* **Test for Accuracy:** Try rephrasing the original question in a few different ways (e.g., "revenue by region" vs. "how much did each territory earn?"). If the system doesn't return the correct answer, you may need to [Add Context](#3-add-knowledge-context) to help it with precise queries.

## 3. Add Context (knowledge)

If the system consistently misunderstands terms, you can add explicit context. This helps the system formulate more precise queries.

1. Navigate to **Domains** > (Select your Domain)
2. Navigate to the **Context** tab.
3. Select the **Knowledge** tab inside the Context section.
4. Click the **+ Add Knowledge** button to begin a new entry and add natural language context. Add natural language sentences to define business terms.
   * *Example 1:* `Regions are the same as Territories.`
   * *Example 2:* `My sales stages are: Prospect, Negotiation, Closed.`
5. Click **SAVE**.

<Frame>
  <img src="https://mintcdn.com/wisdomai/LpgaD9q2532CSQrt/images/NEW-add-knowledge-steps.png?fit=max&auto=format&n=LpgaD9q2532CSQrt&q=85&s=1d45f755137a336835febf12887dc61f" alt="NEW Add Knowledge Steps" width="1822" height="988" data-path="images/NEW-add-knowledge-steps.png" />
</Frame>

<Info>
  To learn more about adding context to a domain, refer to the [**Add Domain-Specific Knowledge**](/setting-up-wisdom-ai/add-domain-specific-knowledge) guide.
</Info>

## 4. Mark the answer as reviewed

Once you have confirmed the SQL is correct and the answer is accurate, save it to the system's knowledge base.

1. From the **SQL Code** tab in the **Editor** window, click **Mark as reviewed**.
2. In the **Review Question** window, add a clear title for the question (e.g., "Official Quarterly Revenue by Region").
3. Click **Confirm**.

<img src="https://mintcdn.com/wisdomai/82xgEVWUP7cwhDHG/images/review-question-v02-em.png?fit=max&auto=format&n=82xgEVWUP7cwhDHG&q=85&s=4f8b3ee46e270c4d7411643285b4e521" alt="Review question option" width="759" height="462" data-path="images/review-question-v02-em.png" />

This action saves the question and its validated SQL as a [Validated Query](/setting-up-wisdom-ai/feedback-mechanisms/reviewed-queries), which serves as a trusted reference for similar future questions.

To ensure that the information provided in the answer is accurate, relevant, and reliable, you can:

* Test and validate both natural language responses and SQL query results directly within the chat interface.
* Review the generated output by providing feedback.
* Edit or vet the SQL query when necessary.

These features help you iterate efficiently and build confidence in the outputs you receive.

<img src="https://mintcdn.com/wisdomai/JQ4LJpo88z8ml9ZD/images/new-ui-reviewed-queries-01.png?fit=max&auto=format&n=JQ4LJpo88z8ml9ZD&q=85&s=8194a7554f37cfce7f244a0d5de31724" alt="Reviewed queries are displayed" width="1792" height="894" data-path="images/new-ui-reviewed-queries-01.png" />

## Next steps

<CardGroup cols={2}>
  <Card icon="clipboard-list" href="/using-wisdom-ai-everyday/auditing" title="Auditing">
    Organize insights by tagging chats, navigating history, and sharing vetted answers with your team.
  </Card>

  <Card icon="sitemap" href="/setting-up-wisdom-ai/advanced-data-modeling-creating-context" title="Advanced Data Modeling">
    Define relationships and Knowledge in your data to enable more powerful analysis.
  </Card>
</CardGroup>
