This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
ATRIA operational workflows
ATRIA operational workflows
These documents include various ATRIA technical operational flows, designed as sequence diagrams to provide a clear, step-by-step representation of ATRIA capabilities and processes, interactions between components or systems, and the overall ATRIA workflow
Index of technical operational workflows
1 - NLP as a Service
NLP as a Service operational workflow
ATRIA technical operational flow corresponding to the operation of the NLP as a Service capability
Operational flowchart
The sequence diagram of the process executed by the NLP Apps capability is shown below:
@startuml
title NLP resolution API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
Application -> Kernel: Create two-legged token with scope aura-ai-services:nlp-messaging:write
Note right of Kernel: this token needs refreshing
Kernel -> Application: Response two-legged token
Application -> Kernel: Request to aura-aiservices/nlp/query with token
Kernel -> AuraGatewayApi: Request to aiservices/nlp/query with token-info header
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AuraNLPApp: Request recognition
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 200 and message
Kernel -> Application: response 200 and message
@enduml
NLP Apps operational sequence diagram
2 - Agent AI operational workflow
Agent AI operational workflow
ATRIA technical operational flow corresponding to the operation of the Agents AI capability
Operational flowchart
The sequence diagram of the process executed by the agents AI capability is shown below:
@startuml
title Agent API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
participant AgentsManager #0796f5
participant MongoDeviceRecommender #11f5cf
participant AtriaModelGateway #f58e11
participant AzureOpenAI #9476e7
Application -> Kernel: Create two-legged token with scope aura-ai-services:agents-messaging:write
Note right of Kernel: this token needs refreshing
Kernel -> Application: Response two-legged token
Application -> Kernel: Request to aura-aiservices/agents/messages with token and correlatorId (x-correlator)
Kernel -> AuraGatewayApi: Request to aiservices/agents/messages with token-info header and correlatorId
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AgentsManager: Send Request to an agent
AgentsManager -> AgentsManager: Check if the context exists && retrieves it
AgentsManager -> AgentsManager: routing to the agents
AgentsManager -> MongoDeviceRecommender: Send Request to an agent with the context
MongoDeviceRecommender -> MongoDeviceRecommender: process the Request
group Agents process
loop XX times
MongoDeviceRecommender -> AtriaModelGateway: Send prompt to atria-model-gateway
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway -> MongoDeviceRecommender: Response prompt
MongoDeviceRecommender -> MongoDeviceRecommender: Analyze the response
end
end
MongoDeviceRecommender -> AgentsManager: response 200 and message
AgentsManager -> AgentsManager: Store the context
AgentsManager --> AuraGatewayApi: response 200 and message
AuraGatewayApi -> AuraGatewayApi: process response
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 200 and message
Kernel -> Application: response 200 and message
@enduml
Agents AI operational sequence diagram
3 - Generative AI
Generative AI operational workflow
ATRIA technical operational flow corresponding to the operation of the Generative AI capability
Operational flowchart
The sequence diagram of the process executed by the Generative AI capability is shown below:
@startuml
title Generative API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
participant AtriaModelGateway #f58e11
participant AzureOpenAI #9476e7
Application -> Kernel: Create two-legged token with scope aura-aiservices:messaging:write
Note right of Kernel: this token needs refreshing
Kernel -> Application: Response two-legged token
Application -> Kernel: Request to aura-aiservices/generative/prompts with token and correlatorId (x-correlator)
Kernel -> AuraGatewayApi: Request to aiservices/generative/prompts with token-info header and correlatorId
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AuraGatewayApi: Generate prompt
AuraGatewayApi -> AtriaModelGateway: Send prompt to atria-model-gateway
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway -> AuraGatewayApi: Response prompt
AuraGatewayApi -> AuraGatewayApi: process atria-model-gateway response
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 200 and message with session_id
Kernel -> Application: response 200 and message with session_id
@enduml
Generative AI operational sequence diagram
4 - General RAG
ATRIA General RAG operational workflow
ATRIA technical operational flow corresponding to the operation of the RAG capability, specifically to the so-named General RAG predefined chain.
Flow diagram
Calls to the atria-rag-server component (AtriaRAG in the sequence diagram) executes the predefined RAG chain General RAG.
@startuml
title RAG API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
participant AtriaModelGateway #f58e11
participant AtriaRAG #f5de11
participant AzureOpenAI #9476e7
Application -> Kernel: Create two-legged token with scope aura-aiservices:messaging:write
Note right of Kernel: this token needs refreshing
Kernel -> Application: Response two-legged token
Application -> Kernel: Request to aura-aiservices/generative/prompts with token and correlatorId (x-correlator)
Kernel -> AuraGatewayApi: Request to aiservices/generative/prompts with token-info header and correlatorId
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AuraGatewayApi: Generate prompt
AuraGatewayApi -> AtriaModelGateway: Send prompt to atria-model-gateway
activate AtriaModelGateway
AtriaModelGateway -> AtriaRAG: 1.0: Enrich request
activate AtriaRAG
AtriaRAG -> AtriaRAG: securityStg
opt translateStg.enabled == true
AtriaRAG -> AtriaRAG: 1.1: Translate user query
AtriaRAG -> AtriaModelGateway: Send request to LLM
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response with translated query
end
opt cleanStg.enabled == true
AtriaRAG -> AtriaRAG: 1.2: Clean the user query
AtriaRAG -> AtriaModelGateway: Send request to LLM
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response with new cleaned query
end
opt contextStg.enable == true
alt Ask LLM
AtriaRAG -> AtriaModelGateway: 1.3: Request LLM to validate the conversational context
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response [SAME CONTEXT] or [DIFFERENT CONTEXT]
AtriaRAG -> AtriaRAG: Recreate Query
end
alt Recreate Query
AtriaRAG -> AtriaModelGateway: 1.4: Call LLM to generate new question
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: Response with new question
end
end
AtriaRAG -> AtriaRAG: retrievalStg
opt postFilteringStg.enable == true
AtriaRAG -> AtriaRAG: Post Filtering
note right: Batch request
AtriaRAG -> AtriaModelGateway: 1.5: Request LLM for each chunk
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response [RELEVANT] or [IGNORABLE]
end
AtriaRAG -> AtriaModelGateway: 1.6: Request LLM generativeStg
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response
AtriaRAG --> AtriaModelGateway: 2: Final response
deactivate AtriaRAG
deactivate AtriaModelGateway
AtriaModelGateway -> AuraGatewayApi: Response Model Gateway
AuraGatewayApi -> AuraGatewayApi: process atria-model-gateway response
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 200 and message with session_id
Kernel -> Application: response 200 and message with session_id
@enduml
5 - Germany General RAG
Germany ATRIA General RAG operational workflow
ATRIA technical operational flow corresponding to the operation of the RAG capability, specifically to the so-named General RAG predefined chain, for one OB: Germany.
Flow diagram
Calls to the atria-rag-server component (AtriaRAG in the sequence diagram) executes the predefined RAG chain General RAG.
@startuml
title Germany RAG API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
participant AtriaModelGateway #f58e11
participant AtriaRAG #f5de11
participant AzureOpenAI #9476e7
Application -> Kernel: Create two-legged token with scope aura-aiservices:messaging:write
Note right of Kernel: this token needs refreshing
Kernel -> Application: Response two-legged token
Application -> Kernel: Request to aura-aiservices/generative/prompts with token and correlatorId (x-correlator)
Kernel -> AuraGatewayApi: Request to aiservices/generative/prompts with token-info header and correlatorId
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AuraGatewayApi: Generate prompt
AuraGatewayApi -> AtriaModelGateway: Send prompt to atria-model-gateway
activate AtriaModelGateway
AtriaModelGateway -> AtriaRAG: 1.0: Enrich request
activate AtriaRAG
AtriaRAG -> AtriaRAG: securityStg
alt Ask LLM
AtriaRAG -> AtriaModelGateway: 1.3: Request LLM to validate the conversational context
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response [SAME CONTEXT] or [DIFFERENT CONTEXT]
AtriaRAG -> AtriaRAG: Recreate Query
AtriaRAG -> AtriaModelGateway: 1.4: Call LLM to generate new question
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: Response with new question
end
AtriaRAG -> AtriaRAG: retrievalStg
AtriaRAG -> AtriaRAG: Post Filtering
note right: Batch request
AtriaRAG -> AtriaModelGateway: 1.5: Request LLM for each chunk
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response [RELEVANT] or [IGNORABLE]
AtriaRAG -> AtriaModelGateway: 1.6: Request LLM generativeStg
AtriaModelGateway -> AzureOpenAI: Send Request to ChatCompletation endpoint
AzureOpenAI --> AtriaModelGateway: Response from AzureOpenAI
AtriaModelGateway --> AtriaRAG: LLM response
AtriaRAG --> AtriaModelGateway: 2: Final response
deactivate AtriaRAG
deactivate AtriaModelGateway
AtriaModelGateway -> AuraGatewayApi: Response Model Gateway
AuraGatewayApi -> AuraGatewayApi: process atria-model-gateway response
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 200 and message with session_id
Kernel -> Application: response 200 and message with session_id
@enduml
6 - Ingestion Process Automation operational workflow
Ingestion Process Automation
Technical operational flow of RAG data processing, specifically the automation of the atria-rag-generate-db process
Flow diagram
Flow of calls made to launch the generate-db process.
@startuml
title Ingestion Process Automation Flow
' Define participants with themed colors and clear names
actor User
participant "Azure Blob Storage" as AzureStorage #A2C4E0
participant "Gateway API" as GatewayAPI #bfb1f2
participant "Config Watcher" as ConfigWatcher #f296ee
participant "Deployment API" as DeploymentAPI #f77cbc
participant "Generate DB Process" as GenerateDBProcess #D9EAD3
' === Upload Files Stage ===
User -> AzureStorage : Upload training files
AzureStorage --> User : Response 200 OK
' === Launch generate-db ===
User -> GatewayAPI : Request to /aura-services/v2/operations/data to launch ingestion process
GatewayAPI -> ConfigWatcher : Request to Config Watcher
ConfigWatcher -> GenerateDBProcess : Start generate-db process
GenerateDBProcess --> ConfigWatcher : Response 200 OK
ConfigWatcher --> GatewayAPI : Response 200 OK
GatewayAPI --> User : Response 200 OK
' === Processing Stage ===
GenerateDBProcess -> AzureStorage : Read training files
AzureStorage --> GenerateDBProcess : Response 200 OK
GenerateDBProcess -> GenerateDBProcess : Processing training files
' === Logs Querying ===
... Logging queries can occur anytime ...
User -> GatewayAPI : Request to /aura-services/v2/operations/data/{presetId}/logs
GatewayAPI -> ConfigWatcher : Request to get logs
ConfigWatcher -> DeploymentAPI : Response 200 OK
DeploymentAPI --> ConfigWatcher : Response 200 OK
ConfigWatcher --> GatewayAPI : Response 200 OK
GatewayAPI --> User : Response 200 OK
' === Status Query ===
... Status queries can occur anytime ...
' === Status process ===
User -> GatewayAPI : Request to /aura-services/v2/operations/data/{presetId}/status to get status
GatewayAPI -> ConfigWatcher : Request to get status
ConfigWatcher -> DeploymentAPI : Response 200 OK
DeploymentAPI --> ConfigWatcher : Response 200 OK
ConfigWatcher --> GatewayAPI : Response 200 OK
GatewayAPI --> User : Response 200 OK
@enduml
7 - Reload config by Redis events
Reload config by Redis event in RAG and Model Gateway
Description of the process for updating and reloading ATRIA configuration by means of Redis events
Introduction
Once a preset or application configuration has been modified, a Redis event is automatically triggered to the PresetConfiguration and ApplicationConfiguration channels.
The components atria-model-gateway and atria-rag-server are subscribed to these channels and once an event arrives, they launch the configuration update process.
This process is transparent to the user.
8 - Feedback capability
Feedback capability operational workflow
ATRIA technical operational flow corresponding to the operation of the feedback capability that can be used for Generative AI and RAG capabilities
Flow diagram
@startuml
title Feedback API diagram
participant Application
participant Kernel #1add4d
participant AuraGatewayApi #76bbe7
Note right of Application: The application has made a previous request to `aiservices/generative/prompts` on which it will give feedback. Use the correlatorId sending in the request and the session_id received in the response. View Generative API diagram
Application -> Kernel: Request to aiservices/{session_id}/feedback with token and msg_corrId: correlatorId
Kernel -> AuraGatewayApi: Request to aiservices/{session_id}/feedback with token-info header and msg_corrId: correlatorId
AuraGatewayApi -> AuraGatewayApi: Validate request
AuraGatewayApi -> AuraGatewayApi: Covert message to format atria-model-gateway
AuraGatewayApi -> AtriaModelGateway: Send feedback to atria-model-gateway
AtriaModelGateway -> AuraGatewayApi: Response feedback
AuraGatewayApi -> AuraGatewayApi: process atria-model-gateway response
AuraGatewayApi -> AuraGatewayApi: generate response
AuraGatewayApi -> Kernel: response 204
Kernel -> Application: response 204
@enduml
Generative feedback sequence diagram
Request
curl --location 'https://api.environment.baikalplatform.com/aura-aiservices/v1/{session_id}/feedback' \
--header 'x-correlator: <uuid2>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"application": {
"name": "app-name",
},
"value": true,
"msg_corrId": "{previous-x-correlator}"
}'