Action Transformer¶
The Action Transformer is the central component in the Alan AI Platform. It is a specialized language model designed to effectively manage user interactions and execute user queries.
The Action Transformer acts as an intelligent AI agent supporting natural conversations with users. It interprets user intent, plans actions, retrieves data and generates responses. The Action Transformer leverages Alan AI’s external memory (Semantic DB) to deliver precise, contextually relevant responses based on accurate and real-time data.
act() function¶
To control the behavior of the Action Transformer, you can use the act()
function. With the act()
function, you can define parameters and transforms to:
Provide the Action Transformer with the UI context
Guide which data sources the Action Transformer must access and prioritize
Direct the Action Transformer to collect additional information for comprehensive responses
Instruct what tasks the Action Transformer must execute
The instructions provided through the act()
function are applied to all queries, regardless of the data corpus invoked by the AI agent.
act({
uiContext: getUiContext,
context: getContext,
fallback: transforms.act_fallback,
execution: transforms.act_execute,
merge: transforms.act_merge
})
act() parameters¶
Name |
Type |
Required/Optional |
Description |
---|---|---|---|
|
function |
Optional |
Function used to retrieve the UI context of the page currently open in the app when the user query is given. For details, see UI context. |
|
function |
Optional |
Function used to gather conversational context to pass it to the Action Transformer. For details, see UI context. |
|
function |
Optional |
Transforms function used to handle unclear queries that require additional information, sensitive or biased queries. For details, see Fallback transforms. |
|
function |
Optional |
Transforms function used to specify what actions the AI agent must take in response to the user query. For details, see Action execution. |
|
function |
Optional |
Transforms function used to combine data from different corpuses to provide a comprehensive response. For details, see Data merging. |