How we built “Ask Learn”, the RAG-based knowledge service

Learn how Microsoft Learn’s RAG-based generative AI chat system was engineered and their takeaways to help you design a RAG-based chat for your org.

Overview

The article discusses the development of 'Ask Learn', a Retrieval-Augmented Generation (RAG) based knowledge service that enhances Microsoft Q&A and powers the Microsoft Copilot for Azure. It highlights the collaboration across Microsoft teams, the challenges faced, and the lessons learned in building a generative AI system at scale.

What You'll Learn

1

How to implement a Retrieval-Augmented Generation (RAG) system for knowledge services

2

Why a 'golden dataset' is essential for evaluating AI model performance

3

How to address non-determinism in generative AI systems

4

When to apply pre- and post-processing steps in AI inference pipelines

Prerequisites & Requirements

  • Understanding of generative AI and RAG concepts
  • Familiarity with Azure OpenAI APIs(optional)

Key Questions Answered

What is the purpose of the 'Ask Learn' service?
'Ask Learn' serves as a knowledge service that provides grounding data for Microsoft Copilot and helps users find information without needing to search through documentation. It enhances the user experience by allowing for direct interaction within the Azure portal.
How does Microsoft ensure the accuracy of responses in the Copilot for Azure?
Microsoft ensures accuracy by utilizing a vector database that stores embeddings of documentation chunks, which are then used to retrieve relevant information for user queries. This process involves multiple pre- and post-processing steps to enhance the quality of responses.
What challenges did the team face while developing the Q&A Assist?
The team faced challenges such as non-determinism in AI outputs and the need for continuous updates to the vector database as documentation changed. They also had to navigate organizational hurdles as they were pioneering new technologies.
What role does the 'golden dataset' play in the development of AI models?
The 'golden dataset' is a curated benchmark that helps evaluate AI model performance by providing a set of question-and-answer pairs and source references. It is crucial for testing changes and ensuring the reliability of the AI outputs.

Technologies & Tools

Backend
Azure Openai
Used for embedding and completion APIs to support the generative AI capabilities of the system.
Database
Vector Database
Stores embeddings and chunks of documentation to facilitate accurate retrieval of information.

Key Actionable Insights

1
Invest in building a 'golden dataset' to benchmark AI model performance.
A 'golden dataset' allows teams to evaluate the effectiveness of changes made to the AI system and ensures that the responses generated are accurate and relevant.
2
Implement pre- and post-processing steps in your AI inference pipeline to improve response quality.
These steps can help refine the input and output of the AI system, leading to more accurate and reliable results for users.
3
Foster collaboration among cross-functional teams during the development of AI systems.
Collaboration can help address challenges more effectively and leverage diverse expertise, which is essential for pioneering new technologies.

Common Pitfalls

1
Underestimating the complexity of building a RAG-based system can lead to poor performance and unreliable outputs.
Many teams may not realize the extensive logic and processing required to ensure that AI responses are accurate and relevant, which can result in user dissatisfaction.
2
Neglecting to continuously update the knowledge base can result in outdated or incorrect information being provided to users.
As documentation changes, it is crucial to maintain the vector database to ensure that the AI system has access to the most current and accurate data.

Related Concepts

Retrieval-augmented Generation (rag)
Generative AI
Knowledge Management Systems
AI Model Evaluation