Skip to content

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.

ACA Architecture

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:

  1. Extracts {question, customer id, chat history} parameters from request.
  2. The parsed parameters are used to trigger chat AI (get-request)
  3. The customer id is used to retrieve customer profile from Azure Cosmos DB
  4. The customer ID is used to retrieve customer order history from Azure Cosmos DB

  5. The user question is converted from text to vector using an Azure OpenAI embedding model.
  6. The vectorized question is used to retrieve matching products from Azure AI Search
  7. The user question & retrieved documents are combined into an enhanced model prompt
  8. The prompt is used to generate the chat response using an Azure OpenAI chat model.
  9. The response is now returned to the frontend chat UI client, for display to the user.