# Test

## Test Environment

As mentioned, Dhee.AI facilitates testing of your bot before deploying. This is highly useful to figure out our early bugs and ensure your production server is not affected. The developer can test the bot using the *Test and Deploy->Test*.

![Test UI](/files/mmEByrq7bK8zTcndimxt)

The Test UI is divided into two key subsections.

### Testing your bot.

You can test the Agent using the *Test Agent* section of the Test Module.

![Testing your bot](/files/gCMezEC7ykoS4R0OSdMX)

You can provide the language of your choice, along with Username and phone number. You could also opt to skip providing Username and phone number. This would invoke the agent. You can now test your bot by communicating with it.

![Testing your bot](/files/zohbDPKeUmTmqnS9UBoV)

As seen in the image above, the *trigger* "I am sick" successfully helped in identifying the *applyLeave*. In response, the bot also requested the user for one of the slots *startDate*.

You can use the Test Agent to test your bot within the sandbox environment.

### Debug Insights

Dhee.AI also allows you to debug your bot and understand the behavior better. This is useful for developers in understanding the response of the bot to queries.

![Debug Insights](/files/1a5GrDgZBiKmijNAyJQW)

**Parse**

The Parse section allows the developer to debug the bot and understand the parsed information (described in JSON format). Developer can use these insights to define their bot better.

![Parse input ](/files/lhwYOkn8Nd8p5mHf4YOd)

**Extract Intent**

If the developer needs to verify that the bot is correctly recognizing the intent in the test environment, he can use the *Extract Intent* section.

![Extract Intent ](/files/5wTjELlqvCUaZUVSLOos)

This would display the intent identified by the bot. For example, for the text *"I am sick"*, the following displays the intent recognized.

```
Output

{
  "success": true,
  "result": {
    "userIntent": {
      "createdBy": "35dad000-9246-11ea-9ba6-69dfff26a0d5",
      "createdDate": 1644827200351,
      "lastModifiedBy": "e2b0c7a0-7b27-11ec-b23b-837257ce5410",
      "lastModifiedDate": 1645330104597,
      "id": "d5705d80-8d6f-11ec-b6a7-a372c48d3432",
      "name": "applyLeave",
```

Once again, these insights would help in further improving the bot performance.

**Extract Slot**

Similarly, the slots recognization could be debugged using the *Extract Slot* section.

![Extract Slot](/files/hDNOGILSwci04UZpZWHy)

Consider the following Text.

```
I want to take leave from 24th
```

Debugging the text in *Extract Slot* would result in the following

```
{
  "startDate": {
    "value": "24-03-2022",
    "tokenOrder": 7,
    "sentenceId": "fb37db2a-73f5-4ca8-a8d7-ebde25c0d78e"
  }
}
```

As seen in the output, the slot value has been recognized correctly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://readme.dhee.ai/getting-started/build-and-deploy/test.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
