TypeScript sample app for RAG pattern using Azure AI Search, OpenAI, and LangChain
Top 88.6% on sourcepulse
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
azd
).
azd auth login
azd init -t azure-search-openai-javascript
azd up
(This provisions resources and deploys the app; can take 15+ minutes)Highlighted Details
chat-read-retrieve-read.ts
, ask-retrieve-then-read.ts
).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.
4 days ago
Inactive