azure-search-openai-javascript  by Azure-Samples

TypeScript sample app for RAG pattern using Azure AI Search, OpenAI, and LangChain

created 1 year ago
306 stars

Top 88.6% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a TypeScript sample application demonstrating the Retrieval Augmented Generation (RAG) pattern for building ChatGPT-style experiences over private enterprise data. It targets developers and researchers looking to integrate Azure OpenAI and Azure AI Search for advanced Q&A and chat functionalities. The primary benefit is a ready-to-deploy solution that showcases effective data indexing, retrieval, and LLM orchestration.

How It Works

The application leverages Azure OpenAI for LLM capabilities (e.g., GPT-4o-mini) and Azure AI Search for efficient data indexing and retrieval. It implements RAG by retrieving relevant data chunks from Azure AI Search based on user queries and then feeding these chunks, along with the query, to the LLM to generate contextually aware responses. This approach enhances accuracy and reduces hallucinations by grounding the LLM's output in specific data.

Quick Start & Requirements

  • Install/Run: Use the Azure Developer CLI (azd).
    • azd auth login
    • azd init -t azure-search-openai-javascript
    • azd up (This provisions resources and deploys the app; can take 15+ minutes)
  • Prerequisites: Azure account with access to Azure OpenAI Service, Azure subscription with RBAC permissions (e.g., Owner, User Access Administrator), Node.js LTS, Docker Desktop, Git, PowerShell 7+ (Windows).
  • Resources: Azure Container Apps, Azure Static Web Apps, Azure OpenAI, Azure AI Search, Azure Blob Storage, Azure Monitor.
  • Links: Getting Started, Video Overview

Highlighted Details

  • Demonstrates multiple RAG approaches (e.g., chat-read-retrieve-read.ts, ask-retrieve-then-read.ts).
  • Supports citation and source tracking for response trustworthiness.
  • Offers in-app settings for tweaking prompts and behavior.
  • Includes optional performance tracing with Application Insights.
  • Can be configured to use existing Azure resources.

Maintenance & Community

This is an official Azure sample, indicating backing by Microsoft. Community interaction channels are not explicitly listed in the README.

Licensing & Compatibility

The repository is licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The sample is a starting point; production deployments require thorough security and performance reviews. Default configurations may need adjustments for OpenAI capacity, storage resiliency (Standard_ZRS recommended), AI Search query limits, and container app scaling. Authentication is optional and recommended for production.

Health Check
Last commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
16 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.