Documentation Index
Fetch the complete documentation index at: https://dev.docs.inworld.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview > Inworld Graph Runtime Data > 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
Reference
AddKnowledgeTextEmbeddingAsset
Adds a new knowledge set to the runtime data, with an option to replace an existing set.
Examples
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.
Examples
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.
Examples
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.
Examples
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.
Examples
TArray<FName> GetKnowledgeMapKeys()
Returns
Type: TArray<FName>
RemoveKnowledge
Removes a specific knowledge set identified by its unique ID.
Examples
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.
Examples
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 |