aitour-rag-with-ai-search

MIT License

Stars
8
Committers
4

Production-ready RAG with Azure AI Search

If you will be delivering this session, consult the session-delivery-resources guide for slides, demo scripts, and other resources.

Session Desciption

Learn how to build a production-ready Retrieval Augmented Generation (RAG) application to chat over your domain's data with Azure AI Search. Discover the benefits of hybrid search with semantic ranker to find both vector and keyword-based results amongst billions of documents. Explore different approaches to data ingestion, to extract, split, vectorize, and store your data in Azure AI Search. Consider multiple ways to evaluate your RAG app answers, to ensure high-quality responses. Finally, see how you can productionize your RAG app with efficient vector storage, private network deployment, and user authentication.

Learning Outcomes

  • Basics of vector embeddings and vector search strategies
  • Azure AI Search option: full-text search, vector search, hybrid search, semantic ranker
  • Data ingestion process for Azure AI Search, manual and integrated vectorization feature
  • Evaluation strategies for RAG app answers: AI Studio, Promptflow-evals SDK
  • Efficient vector storage with quantization
  • Security best practices: private network deployment, user authentication, data access control

Technology Used

  • Azure OpenAI
  • Azure AI Search
  • Python

Additional Resources and Continued Learning

Products:

Link Description
Azure AI Search Landing page, links to pricing and docs.
Azure AI Studio Portal for building and deploying AI models, fine-tuning, evaluations, etc.

Documentation:

Link Description
Revolutionize your Enterprise Data with ChatGPT: Next-gen Apps w/ Azure OpenAI and AI Search Blog post about the RAG app solution for AI Search
Azure AI Search: Outperforming vector search with hybrid retrieval and ranking capabilities Blog post with research findings on optimal search mode, chunk size, etc.
Access Control in Generative AI applications with Azure Cognitive Search Blog post with details on how data access controls can be implemented in a RAG app with Azure AI Search and Microsoft Entra

Samples:

Link Description
RAG app with Azure AI Search Solution for building a full featured RAG app with AI Search and Python on App Service
AI RAG chat app evaluator Scripts and command-line tools for evaluating RAG chat app with promptflow-evals SDK
Vector search examples Jupyter notebooks used throughout the presentation

Responsible AI

Microsoft is committed to helping our customers use our AI products responsibly, sharing our learnings, and building trust-based partnerships through tools like Transparency Notes and Impact Assessments. Many of these resources can be found at https://aka.ms/RAI. Microsoft’s approach to responsible AI is grounded in our AI principles of fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.

Large-scale natural language, image, and speech models - like the ones used in this sample - can potentially behave in ways that are unfair, unreliable, or offensive, in turn causing harms. Please consult the Azure OpenAI service Transparency note to be informed about risks and limitations.

The recommended approach to mitigating these risks is to include a safety system in your architecture that can detect and prevent harmful behavior. Azure AI Content Safety provides an independent layer of protection, able to detect harmful user-generated and AI-generated content in applications and services. Azure AI Content Safety includes text and image APIs that allow you to detect material that is harmful. Within Azure AI Studio, the Content Safety service allows you to view, explore and try out sample code for detecting harmful content across different modalities. The following quickstart documentation guides you through making requests to the service.

Another aspect to take into account is the overall application performance. With multi-modal and multi-models applications, we consider performance to mean that the system performs as you and your users expect, including not generating harmful outputs. It's important to assess the performance of your overall application using Performance and Quality and Risk and Safety evaluators. You also have the ability to create and evaluate with custom evaluators.

You can evaluate your AI application in your development environment using the Azure AI Evaluation SDK. Given either a test dataset or a target, your generative AI application generations are quantitatively measured with built-in evaluators or custom evaluators of your choice. To get started with the azure ai evaluation sdk to evaluate your system, you can follow the quickstart guide. Once you execute an evaluation run, you can visualize the results in Azure AI Studio.

Content Owners