# Module 5: Hands-on Lab: Training a Support Agent

This hands-on lab will guide you through the process of preparing and uploading a knowledge base to train a support agent. We will use the concepts from the previous modules to create a well-structured and effective knowledge base.

{% embed url="<https://youtu.be/W5DC1tMIUJ8>" %}

**Objective:** To prepare a set of documents, consolidate them, and upload them to an agent's knowledge base.

**Materials:**

* A set of sample support documents (provided)
* Access to raia Academy
* The support agent you created in the previous lab

**Step 1: Analyze the Source Documents**

1. Review the provided sample documents. You will find a collection of small text files, each containing a single FAQ.
2. Notice that having many small files is not ideal for knowledge management.

**Step 2: Consolidate the Documents**

1. We will consolidate these small files into a single, well-structured markdown file.
2. Create a new file named `consolidated_support_faq.md`.
3. Copy the content from each individual FAQ file into the consolidated file. Use markdown headings to separate the questions.

**Step 3: Use raia Academy to Clean the Document (Optional)**

1. For this lab, our consolidated file is already in clean markdown. However, if you were working with a .docx or .pdf file, you would use raia Academy to convert it.
2. Familiarize yourself with the raia Academy interface by uploading the `consolidated_support_faq.md` file and observing how it is processed.

**Step 4: Upload the Consolidated File to Your Agent**

1. Go to the raiaAI Launch Pad and open the support agent you created in the previous lab.
2. Navigate to the "Training" tab.
3. If you have the old `training_faq.md` file in your knowledge base, remove it.
4. Upload the new `consolidated_support_faq.md` file.

**Step 5: Update Your Instructions**

1. Navigate to the "Instructions" tab.
2. Update the "Knowledge Sources and Routing" section to reference the new file name.

**Step 6: Test the Agent**

1. Go to the "Test" tab and ask the same questions you asked in the previous lab.
2. Verify that the agent is still providing accurate answers, but now it should be citing the new, consolidated file.

This lab has demonstrated the importance of good knowledge management. By consolidating small files into a single, well-organized document, you have made the knowledge base easier to manage and maintain, which is a critical skill for building scalable AI solutions.


---

# 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://docs.raiaai.com/ai-training/partner-training/raia-labs-training/part-2-agent-training/module-5-hands-on-lab-training-a-support-agent.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.
