azure-search-openai-demo  by Azure-Samples

RAG chat app with Azure OpenAI and Azure AI Search

created 2 years ago
7,181 stars

Top 7.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a sample application demonstrating the Retrieval-Augmented Generation (RAG) pattern for building ChatGPT-like experiences over private documents using Azure AI Search and Azure OpenAI. It's targeted at developers and researchers looking to leverage their data with large language models in a cloud-native environment, offering both Q&A and multi-turn chat interfaces with citations.

How It Works

The solution utilizes Azure OpenAI Service for accessing GPT models and Azure AI Search for indexing and retrieving relevant document chunks. This RAG approach enhances LLM responses by grounding them in specific data, improving accuracy and reducing hallucinations. The backend is Python, with samples also available in JavaScript, .NET, and Java.

Quick Start & Requirements

  • Install/Run: Use the Azure Developer CLI (azd).
    • azd init -t azure-search-openai-demo
    • azd auth login
    • azd env new
    • azd up
  • Prerequisites: Azure account with specific RBAC permissions, Python 3.9-3.11, Node.js 18+, Git, PowerShell 7+ (Windows).
  • Setup: GitHub Codespaces or local setup via VS Code Dev Containers is recommended. Deployment can take 5-10 minutes.
  • Links: Docs, Video Overview

Highlighted Details

  • Supports multi-turn chat and single-turn Q&A.
  • Renders citations and thought processes for answers.
  • UI settings allow tweaking behavior and prompts.
  • Integrates Azure AI Document Intelligence and Azure AI Vision (optional).
  • Includes sample data for Contoso Electronics.

Maintenance & Community

This is a Microsoft sample, supported via GitHub Issues. Community support is available via a Teams channel for Microsoft employees.

Licensing & Compatibility

The code is provided under a standard open-source license, but the README strongly advises against direct production use without additional security features, recommending a productionizing guide and Azure OpenAI Landing Zone reference architecture.

Limitations & Caveats

The sample is intended for demonstration and requires careful security hardening for production environments. Resource provisioning incurs costs, and users are advised to clean up resources (azd down) when finished to avoid ongoing charges.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
51
Issues (30d)
36
Star History
275 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.