# Step-by-step Setup for Knowledge Generation

The steps that are required before running the Knowledge Generation are:&#x20;

1. Application/Bot Creation&#x20;
2. Tickets Ingestion&#x20;
3. Workflow Creation&#x20;
4. Event Setup&#x20;
5. Loading the JSON file to show knowledge fields and values on the Knowledge Mapping page.&#x20;
6. KB Gen Configuration Setup&#x20;
7. Job Run&#x20;

### Application/Bot Creation&#x20;

Make sure you have created an Aisera application or bot and added a Data Source to it.&#x20;

Review the Knowledge Base Article Generation Policy for your bot, and choose an AI model for your generation job (you might need your Aisera team to do this for you&#x20;

depending on permissions).&#x20;

Click View Policy under the Knowledge Generation Policy section. A configuration window opens, displaying the prompt settings used for KB Article generation.&#x20;

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

From the dropdown, select the supported AI model based on your agreement during onboarding or sales discussions.&#x20;

Supported Models Include:&#x20;

* GPT-4o&#x20;
* LLaMA 3.3&#x20;
* LLaMA 3.1&#x20;

### Ticket Ingestion&#x20;

When you choose a Data Source for your application from the Aisera Admin UI, the fields to transfer data from the Aisera Gen AI platform to your data source have already been mapped.&#x20;

Review and customize the field mapping for your application, as needed. For KB Generation, while ingesting the tickets below conditions are mandatory.&#x20;

You need a minimum of 40K tickets to form a homogeneous cluster. Less than 40K tickets create more chances to we get heterogenous clusters where you see slight different topics merge into one.&#x20;

Ensure that all relevant comment fields are ingested from the source system to you Aisera Gen AI platform. KB Generation considers comments to be of utmost importance, so it's crucial to include all types of comments present in the source system. Keep in mind that each customer may maintain different fields to store their comments, so it's essential to understand these fields and ingest them accordingly.&#x20;

During the ingestion of comments, it is crucial to map various comments fields to the ‘CaseComment text’ field in the Data source from where we ingested the tickets (Contact connectors team for custom script).&#x20;

You can also map the ticket fields that store issue-related information. These fields can be mapped to the comments section to enrich the knowledge details.&#x20;

You can use the comments attached to **CaseComment text** and **Resolution Notes.**

The following columns must be properly mapped and are mandatory for KB Generation.&#x20;

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

Tickets should be filtered for KB Generation in the Generate Knowledge module, or you can ingest the tickets into DS and use DS without any additional filters&#x20;

Choose the right Type of tickets - Incidents, Service Requests etc.&#x20;

Select the tickets that are marked as closed or resolved. This selection in the conditions (configuration) is based on the assumption that closed and resolved tickets tend to have valuable comments that provide meaningful resolutions. However, it's important to note that our system has the capability to scan and extract meaningful resolution notes from all tickets, not just limited to closed or resolved ones. Note: The quality of the resulting Knowledge Document is determined by the quality of the Tickets you provide.&#x20;

### Workflow Creation&#x20;

The Knowledge Generation workflow is used to upload AI-generated documents to the external knowledge management system.&#x20;

Please contact the Aisera team to configure this workflow. The workflow configuration is customized based on the target integration system (for example, Salesforce, ServiceNow, or Confluence).&#x20;

### Event Setup&#x20;

Use events to trigger the workflow when you want the application/bot user to have the ability to upload an AI generated document to the external source system.&#x20;

1. Navigate to **AI Automation -> Event Studio** (if you dont see **Event Studio**, go to **Settings -> Configuration -> Feature Flags ->** and select **Enable Event Studio (Beta)**).
2. Select **New Event.**&#x20;
3. Enter the **Event Name.**
4. Set the **Trigger Type** to **internal**.
5. Set the **Status** option to **Active**.
6. Select **Next**.&#x20;

<div align="left"><figure><img src="/files/93GZNQfbMJ63lf7WXY7g" alt="" width="563"><figcaption></figcaption></figure></div>

7. Set **Data Type** to **Knowledge Base Article.**
8. Set **Event Type** as **PublishToSOR**.
9. For **Triggering condition**, use Template = \<Template of the document that was configured while generating the document.

<div align="left"><figure><img src="/files/ZmuZyU9XsZ3gmJu7cVY3" alt="" width="563"><figcaption></figcaption></figure></div>

10. In the **Event Handler**, select the workflow that was configured in the above step and select all input parameters shown below. Than add corresponding mapping values (same as in the screenshot below).

<div align="left"><figure><img src="/files/jbb6UAxySFqUQYi15hvf" alt="" width="563"><figcaption></figcaption></figure></div>

11. Select the **OK** button.

With this step we successfully created the event&#x20;


---

# 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.aisera.com/aisera-platform/content-generation/contents-why-extract-solutions-from-the-ticket-comments/set-up-for-knowledge-generation/step-by-step-setup-for-knowledge-generation.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.
