3. The App Architecture¶
The workshop teaches you to build, evaluate, and deploy a retail copilot code-first on Azure AI - using this application architecture for our Contoso Chat implementation.
Click on each tab to understand the archtiecture components and processing workflow.
The architecture has these core components:
- Azure AI Search → the information retrieval service (product index)
- Azure CosmosDB → the database (customer profile, order history)
- Azure OpenAI → the model deployments (embedding, chat, eval)
- Azure Container Apps → the app hosting service (API endpoint)
- Azure Managed Identity → for keyless authentication (trustworthy AI)
The Architecture "processes" incoming user requests received on the hosted API endpoint by taking the following steps:
- Extracts {question, customer id, chat history} parameters from request.
- The parsed parameters are used to trigger chat AI (get-request)
- The customer id is used to retrieve customer profile from Azure Cosmos DB
-
The customer ID is used to retrieve customer order history from Azure Cosmos DB
- The user question is converted from text to vector using an Azure OpenAI embedding model.
- The vectorized question is used to retrieve matching products from Azure AI Search
- The user question & retrieved documents are combined into an enhanced model prompt
- The prompt is used to generate the chat response using an Azure OpenAI chat model.
- The response is now returned to the frontend chat UI client, for display to the user.