WhoBuilt

Build, Evaluate and Deploy a RAG-Based Retail Copilot with Azure AI

Feb 6, 2025· 1 h 58 min· 605 views·Watch on YouTube

Speakers

David Smith, Principal AI Advocate at Microsoft, leads an AI Engineer workshop with Principal AI Advocate Cedric Vidal and Technical Specialist Miguel Martinez on building, evaluating, and deploying a retail RAG copilot with Azure AI.

Build a retail copilot with customer context

Cedric demonstrates a retailer chatbot that answers product questions and uses a signed-in customer’s order history for personalized replies. The workshop combines product information with customer records so the model can respond with relevant context.

Connect search, customer data, and a prompt flow

David describes a backend using Azure AI Studio, Azure OpenAI, Azure AI Search, and Cosmos DB. The flow retrieves relevant product documents through vector search, looks up customer and purchase information, then combines that context with the question to generate an answer. The demo indexes product Markdown files without chunking them, for simplicity.

Choose tools and understand the flow’s limits

David and Cedric distinguish Prompt Flow, which can orchestrate an endpoint and connect Azure resources, from Semantic Kernel and AutoGen, which serve different orchestration and development needs. They explain that Prompt Flow uses a directed acyclic graph: code inside a node can contain loops or conditions, but the graph does not conditionally skip nodes. The workshop flow can be tested locally before deployment as a hosted endpoint.

Evaluate answers and improve the system

Cedric recommends evaluating relevance, groundedness, coherence, and fluency before production, using a stronger LLM such as GPT-4 to score responses from the GPT-3.5-based chatbot. A toothbrush question exposes a failure: the bot invents a product the store does not sell and receives low relevance and groundedness scores. David describes iterating on prompts and retrieval, testing with users or a red team, then monitoring deployed answers.

Extend retrieval to files and multimodal inputs

Cedric says Azure AI Search can index PDFs and retrieve relevant content for a prompt. For a temporary PDF use case, developers can chunk and embed the document in memory, search those chunks, and discard the data afterward. He also notes that image and audio inputs depend on multimodal model capabilities; image-to-text processing is one option.

Takeaways

  • Give a RAG model both relevant source documents and the customer context needed to answer the question.
  • Treat a demo’s unchunked document indexing as a simplification, then evaluate retrieval choices for the real data.
  • Test unsupported requests as well as normal questions to catch fabricated answers before deployment.
  • Use evaluation scores to guide prompt and retrieval changes, then retest with users and monitor production answers.
  • For temporary document queries, in-memory chunking and search can avoid long-term indexing.

Mentioned in this talk

Search inside this talk

What was claimed 12

Show all 12 facts

Related talks