> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a Knowledge Graph

<Badge icon="arrow-left" color="gray">[Back to NLP Topics](/ai-for-service/automation/natural-language/nlp-topics)</Badge>

The Knowledge Graph (KG) turns FAQ content into a structured conversational experience. You can use an ontology-based hierarchy or the LLM-based Few-Shot model (no ontology required). See [Knowledge Graph Terminology](/ai-for-service/automation/knowledge-ai/knowledge-graph-terminology#knowledge-graph-terminology) for concept definitions.

<Note>
  Few-Shot KGs support all features below except: Default terms, ontology-based path qualification, Lemmatization using Parts of Speech, Search in Answer, and Contextual Paths Qualification. Path-Level and KG Synonyms are supported only for Mandatory Terms and Tags. In Few-Shot mode, all synonyms are treated at a global level.
</Note>

***

## Open the Knowledge Graph Builder

1. Log in to the Platform and open your AI Agent.
2. Go to **Automation AI > Knowledge AI > FAQs**.

***

## Create Node Structure

The AI Agent's name becomes the root node by default (editable).

**Add a node:**

1. Go to **Automation AI > Knowledge AI > FAQs > Manage KG**.
2. Hover over the root node and click **+**.
3. Type the node name and press **Enter**. (Duplicate child node names under the same parent are not allowed.)
4. Repeat to create additional first-level nodes.
5. To create child nodes: hover over any node and click **+**.

To delete a node, click the **Delete** icon on the right of the node.

***

## Build the Knowledge Graph

### Add FAQs

Add question-answer sets to nodes. See [Manage FAQs](/ai-for-service/automation/knowledge-ai/manage-faqs) for full details. Limit: 50,000 FAQs across 20,000 nodes.

### Link a Dialog Task

Use when an FAQ requires a multi-turn conversation.

1. Go to **Automation AI > Knowledge AI > FAQs > Manage KG > Add Intent** and select **Task**.
2. (Optional) Enter a **Display Name** shown to users in ambiguity scenarios.
3. Select a task from the drop-down. Add the utterance that triggers it.
4. Add alternate utterances if needed.
5. (Optional) Add a **Reference ID** linking to an external source.
6. Click **Save**.

### Manage Traits, Synonyms, and Stop Words

Add tags, synonyms, traits, and stop words to improve KG performance. See [Knowledge Graph Training](/ai-for-service/automation/knowledge-ai/knowledge-graph-training).

### Manage Variable Namespaces

Associate Variable Namespaces with this KG under **Manage Variable Namespaces** (visible only when namespaces are enabled). See [Managing Namespace](/ai-for-service/app-settings/managing-namespace).

***

## Update the Knowledge Graph

<Note>
  After any change, click **Train** (top-right) to send updates to the KG engine. Untrained changes do not affect responses.
</Note>

By default, intents in child nodes are visible to all ancestor nodes up to the root. To restrict visibility:

* Select the parent node and click the exclude-child-terms icon on the **Questions** pane. Intents from child nodes become visible only to that parent, not its ancestors.

### Move Intents Between Nodes

1. Click the source node. Intents appear in the right pane.
2. Check the intents to move (supports multi-select).
3. Drag and drop onto the target node.

### Edit and Delete Terms

1. Hover over the node and click the **gear icon**.
2. Edit the name, term type, status, traits, synonyms, or context.

To delete a term:

1. Hover over the node and click **Delete**.
2. Choose one of:
   * **Delete FAQs along with the term** — removes the term and all its FAQs.
   * **Delete term and move FAQs to root** — removes the term but moves FAQs to root.

<Warning>
  Deleting a term also deletes all its child nodes.
</Warning>

<Note>
  * If the AI Agent is published, train after deletion for changes to take effect.
  * Deleting a first-level term: use selective training to remove it from the published copy.
  * Deleting an nth-level child: select the entire parent term for training.
</Note>

### Edit Intents and Responses

1. Select the node. Intents appear in the right pane.
2. Hover over the intent or response and click **Edit**.
3. Make changes and click **Save**.
4. To delete: click the **Delete** icon. Select multiple intents for bulk deletion.

***

## Improve Performance

1. Define terms, synonyms, primary and alternate questions.
2. Configure KG parameters:

| Parameter                                    | Description                                                                             |
| -------------------------------------------- | --------------------------------------------------------------------------------------- |
| **Path Coverage**                            | (Ontology only) Minimum % of user utterance terms that must match a path to qualify it. |
| **Definite Score for KG**                    | Minimum score to treat a KG intent as a definitive match, discarding other matches.     |
| **Min/Definitive Level for Knowledge Tasks** | Thresholds for identifying and responding to knowledge tasks.                           |
| **KG Suggestions Count**                     | Max FAQ suggestions shown when no definite match is found.                              |
| **Proximity of Suggested Matches**           | Max score difference between top and next suggestions to treat them equally.            |
| **Qualify Contextual Paths**                 | Populates and retains context with terms from the matched intent for improved UX.       |

3. Use **Traits** to qualify nodes even when the utterance doesn't contain the term, and to filter the suggested intent list.

***
