# Enhance with Sub Agents

## File-tune Procedure

To further fine-tune your Aissistant for full automation, we recommend the following procedure:

1. Categorize your customer queries
2. Turn on “Respond only to messages recognized by listed sub-agents” options in Sub Agent
3. Develop a sub agent for one of your primary queries.
4. Populate the assets with relevant information and provide precise instructions associated with that sub agent.
5. Monitor how Aissistant handles events associated with that sub agent.
6. Adjust the assets, sub agent, and instructions as necessary for optimization.
7. After Aissistant consistently manages events in this category without any problems, return to step 3 and select a different category. Repeat the process until all categories are addressed efficiently.
8. Turn on auto-pilot

## Fine-tune Examples

To illustrate the process, we'll use our customers as case studies to demonstrate the enhancement of Aissistant's responses.&#x20;

<details>

<summary>Example: Contextual instructions in Sub Agent</summary>

CityRelay, a property rental business similar to Airbnb, often receives inquiries about early check-ins and late check-outs.\
To streamline handling these questions, we created a **"check\_in/checkout\_out" sub-agent** specifically for customer messages related to check-in or checkout.\
We provided contextual instructions outlining the check-in and checkout policies, along with a smart action to check the availability of early check-ins and late check-outs.\
With this setup, Aissistant can accurately and efficiently respond to users' questions.

<figure><img src="/files/5GLFFmUReKD7wDTYEd8d" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Example: Resolve conflicted information</summary>

Open Goaaal operates a Shopify store specializing in the sale of soccer goals in various sizes. Open Goaaal often receives requests for installation manuals from customers. Over time, people tend to misplace their manuals, and when it comes time to disassemble the goal, they find themselves in need of the detailed instructions. Consequently, they reach out to Open Goaaal requesting a copy. Here's an example of how Aissistant initially responded.

> Hello Lifan, Thank you for reaching out. I can certainly assist with that. I will send you the PDF of the installation instructions for the "Large" size Open Goaaal. Please check your email shortly for the instructions. If you have any further questions or need additional assistance, feel free to reach out.

A human agent flagged this response as incorrect, noting that the Google Doc asset contains specific directions for Aissistant to provide a Google Drive link to the appropriate product. Instead of doing so, Aissistant responded with, "I will email you the PDF of installation instructions.”

> **Installation Manual**
>
> If the user asks for an installation manual or instruction, verify the exact product and then provide the correct manual.
>
> For Open Goaaal Targets, provide <https://drive.google.com/file/d/1QnQqZJrdtk6H2k47kIn84XId5stiopng/view>
>
> For Open Goaaal Starter, provide <https://drive.google.com/file/d/1peMptCdI7sLQGvi1WcSfkkbQaWVoDsNY/view>
>
> For Open Goaaal Lacrosse, provide <https://drive.google.com/file/d/1stttNSnU\\_kvIFbLP5Wie0G-yH5-PpLQv/view>
>
> For Open Goaaal Full size, provide <https://drive.google.com/file/d/1twOBsFhpr67ORkwQqIrBvqh8wpvYwSlv/view>
>
> For Open Goaaal Standard & Large, provide <https://drive.google.com/file/d/105I\\_IhH69iSZYFAmZraey4Fl-TPF7keI/view>
>
> For Open Goaaal Junior, provide <https://drive.google.com/file/d/1GuHIvghq6TuU4b4wbZRAse9\\_fFfYX8lT/view>

This was due to a instruction in the workspace configuration that instructed Aissistant to reply with an offer to email the manual, inadvertently overriding the information from the Google Doc. To rectify this, we removed the conflicting instruction and introduced an 'installation\_manual' sub agent with the appropriate configuration.

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

This adjustment enabled Aissistant to respond accurately with the Google Drive link to the precise manual needed.

> Hello Lifan, Thank you for reaching out to us. I'm sorry to hear that the instructions were not included with your Open Goaaal Soccer 3-in-1 Trainer (Standard). I can certainly help you with that. Here is the PDF manual for the Standard size which you can download and view: [Open Goaaal Standard Size Installation Manual](https://drive.google.com/file/d/105I_IhH69iSZYFAmZraey4Fl-TPF7keI/view) Please feel free to reach out if you need any further assistance.

</details>

<details>

<summary>Example : Handover to human team</summary>

Return requests are a frequent occurrence in e-commerce, and Open Goaaal is no exception. However, to initiate a return, Open Goaaal requires the creation of a return authorization, a process managed by an internal system that's not publicly accessible. Consequently, for all return requests, we created a return\_or\_refund sub agent and included contextual instructions prompting the user to provide their order number, shipping address, the reason for the return, and a photo showing the current condition of the product. We also activated the post-action to suspend subsequent interactions. As a result, once the user submits the necessary information, Aissistant ceases to respond, allowing the human team to take over and manage the return authorization process.

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

For additional information on transitioning tasks from Aissistant to the human team, please refer [Streamline with human team](/tutorial/streamline-with-human-team.md).

</details>


---

# 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://doc.aissist.io/tutorial/tune-instructions/enhance-with-sub-agents.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.
