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

# Inworld Graph Runtime Data Knowledge

[Overview](../overview) > [Inworld Graph Runtime Data](./InworldGraphRuntimeData) > Inworld Graph Runtime Data Knowledge

**Class:** `UInworldGraphRuntimeData_Knowledge` | **Inherits from:** `UInworldGraphRuntimeData`

Runtime data class for managing knowledge retrieval in Inworld graphs. This class manages knowledge sets used for information retrieval and question-answering operations within Inworld graphs. It supports dynamic adding, removing, enabling, and disabling of knowledge sets, with text embeddings used for semantic search and retrieval.

## Methods

* [AddKnowledgeTextEmbeddingAsset](#addknowledgetextembeddingasset)
* [AddKnowledgeTextEmbeddings](#addknowledgetextembeddings)
* [DisableKnowledge](#disableknowledge)
* [EnableKnowledge](#enableknowledge)
* [GetKnowledgeMapKeys](#getknowledgemapkeys)
* [RemoveKnowledge](#removeknowledge)
* [Set](#set)

## Reference

### AddKnowledgeTextEmbeddingAsset

Adds a new knowledge set to the runtime data, with an option to replace an existing set.

<img src="https://mintcdn.com/inworldai/StlB2j_TRDiuzJEK/img/unreal/runtime/nd_img_AddKnowledgeTextEmbeddingAsset.png?fit=max&auto=format&n=StlB2j_TRDiuzJEK&q=85&s=459d448eef530fc0ba38fd7f6e71da68" alt="AddKnowledgeTextEmbeddingAsset Blueprint Node" width="285" height="231" data-path="img/unreal/runtime/nd_img_AddKnowledgeTextEmbeddingAsset.png" />

## Examples

```c++ theme={"system"}
void AddKnowledgeTextEmbeddingAsset(
    FName Id,
    const UInworldTextEmbeddingAsset* Knowledge,
    bool Replace
)
```

#### Parameters

| Parameter | Type                                | Description                                                                      |
| --------- | ----------------------------------- | -------------------------------------------------------------------------------- |
| Id        | `FName`                             | The unique identifier of the knowledge set to be added.                          |
| Knowledge | `const UInworldTextEmbeddingAsset*` | The TextEmbeddings Asset to be added.                                            |
| Replace   | `bool`                              | If true, replaces an existing knowledge set with the same ID. Defaults to false. |

***

### AddKnowledgeTextEmbeddings

Adds a new knowledge set to the runtime data, with an option to replace an existing set.

<img src="https://mintcdn.com/inworldai/StlB2j_TRDiuzJEK/img/unreal/runtime/nd_img_AddKnowledgeTextEmbeddings.png?fit=max&auto=format&n=StlB2j_TRDiuzJEK&q=85&s=8607ecbf3ffba3ecf4127752439041d7" alt="AddKnowledgeTextEmbeddings Blueprint Node" width="255" height="207" data-path="img/unreal/runtime/nd_img_AddKnowledgeTextEmbeddings.png" />

## Examples

```c++ theme={"system"}
void AddKnowledgeTextEmbeddings(
    FName Id,
    const TArray<FInworldTextEmbedding>& Knowledge,
    bool Replace
)
```

#### Parameters

| Parameter | Type                                   | Description                                                                      |
| --------- | -------------------------------------- | -------------------------------------------------------------------------------- |
| Id        | `FName`                                | The unique identifier of the knowledge set to be added.                          |
| Knowledge | `const TArray<FInworldTextEmbedding>&` | The TextEmbeddings to be added.                                                  |
| Replace   | `bool`                                 | If true, replaces an existing knowledge set with the same ID. Defaults to false. |

***

### DisableKnowledge

Disables a specific knowledge set within the runtime data.

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_DisableKnowledge.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=124f62a452e3955eafa36ad4c860f950" alt="DisableKnowledge Blueprint Node" width="203" height="143" data-path="img/unreal/runtime/nd_img_DisableKnowledge.png" />

## Examples

```c++ theme={"system"}
void DisableKnowledge(FName Id)
```

#### Parameters

| Parameter | Type    | Description                                                 |
| --------- | ------- | ----------------------------------------------------------- |
| Id        | `FName` | The unique identifier for the knowledge set to be disabled. |

***

### EnableKnowledge

Enables a specific knowledge set within the runtime data.

<img src="https://mintcdn.com/inworldai/mZNEEtl7pbzQ55cC/img/unreal/runtime/nd_img_EnableKnowledge.png?fit=max&auto=format&n=mZNEEtl7pbzQ55cC&q=85&s=8858ae53a018949fa80f7f7b1661d9d3" alt="EnableKnowledge Blueprint Node" width="203" height="143" data-path="img/unreal/runtime/nd_img_EnableKnowledge.png" />

## Examples

```c++ theme={"system"}
void EnableKnowledge(FName Id)
```

#### Parameters

| Parameter | Type    | Description                                                |
| --------- | ------- | ---------------------------------------------------------- |
| Id        | `FName` | The unique identifier for the knowledge set to be enabled. |

***

### GetKnowledgeMapKeys

Retrieves all knowledge set IDs currently stored in the runtime data.

<img src="https://mintcdn.com/inworldai/jW_EGJyM8Okshayp/img/unreal/runtime/nd_img_GetKnowledgeMapKeys.png?fit=max&auto=format&n=jW_EGJyM8Okshayp&q=85&s=41709117e803da31d7b6e7ab7421ba2e" alt="GetKnowledgeMapKeys Blueprint Node" width="212" height="76" data-path="img/unreal/runtime/nd_img_GetKnowledgeMapKeys.png" />

## Examples

```c++ theme={"system"}
TArray<FName> GetKnowledgeMapKeys()
```

#### Returns

**Type:** `TArray<FName>`

***

### RemoveKnowledge

Removes a specific knowledge set identified by its unique ID.

<img src="https://mintcdn.com/inworldai/UjBJ5lUznbajzMw5/img/unreal/runtime/nd_img_RemoveKnowledge.png?fit=max&auto=format&n=UjBJ5lUznbajzMw5&q=85&s=7ce8826c5515ea2eab9baae4b17fd481" alt="RemoveKnowledge Blueprint Node" width="203" height="143" data-path="img/unreal/runtime/nd_img_RemoveKnowledge.png" />

## Examples

```c++ theme={"system"}
void RemoveKnowledge(FName Id)
```

#### Parameters

| Parameter | Type    | Description                                               |
| --------- | ------- | --------------------------------------------------------- |
| Id        | `FName` | The unique identifier of the knowledge set to be removed. |

***

### Set

Sets the initial knowledge assets for the runtime data.

<img src="https://mintcdn.com/inworldai/UjBJ5lUznbajzMw5/img/unreal/runtime/nd_img_Set.png?fit=max&auto=format&n=UjBJ5lUznbajzMw5&q=85&s=cfaf0a12692e49dc755b7538b2329e8b" alt="Set Blueprint Node" width="229" height="162" data-path="img/unreal/runtime/nd_img_Set.png" />

## Examples

```c++ theme={"system"}
void Set(const TMap<FName, UInworldTextEmbeddingAsset*>& KnowledgeAssets)
```

#### Parameters

| Parameter       | Type                                              | Description                                                                   |
| --------------- | ------------------------------------------------- | ----------------------------------------------------------------------------- |
| KnowledgeAssets | `const TMap<FName, UInworldTextEmbeddingAsset*>&` | Map of knowledge set identifiers to their corresponding text embedding assets |

***
