# The workflow

It consists of 3 parts

1\. AI detector\
2\. AI responder\
3\. AI closure

<figure><img src="/files/a7al0xQpBp2isWRjcykO" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
AI detector working as shown in the picture above
{% endhint %}

<figure><img src="/files/Hi1qxfuf3XH9PzGFKhFY" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
AI responder and closure working as shown in the picture above. AI response may vary according to your knowledge base, questions etc
{% endhint %}

User shows need for help/assistance in the general chat -> Ai detects using confidence scale\
-> 80% confidence -> bot will prompt to open the ticket for user\
<- 80% confidence -> bot detector will not respond

if user prompt to open the ticket, the bot will create a ticket for user same as clicking the open button on the ticket panel

once inside the ticket, the AI responder will work answering the user queries\
it can detect informal, formal, casual, slang etc all types of sentence formation

if issue is still not resolved after 2 AI responses, it will ping the admin roles added through /add pingrole command

if issue is to be solved by backend team (technical issues etc) , it will respond with what you have added to "continue response" section using /learn-from or learn-from-docs command + ping the admin role\
otherwise, it will work as intended

if the users shows positive sentiment, AI closure will prompt to close the ticket\
if the user choose "close the ticket" , it will close the ticket\
if the user choose "no", it will keep responding


---

# 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://ansari-labs.gitbook.io/ansari-labs/products/ai-powered-ticket-tool/the-workflow.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.
