Azure-Samples/azure-search-openai-javascript

A TypeScript sample app for the Retrieval Augmented Generation pattern running on Azure, using Azure AI Search for retrieval and Azure OpenAI and LangChain large language models (LLMs) to power ChatGPT-style and Q&A experiences.

What it solves

This project provides a reference implementation for building a ChatGPT-like experience that can answer questions based on a company's own private enterprise data, preventing the model from relying solely on general knowledge and reducing hallucinations.

How it works

It implements the Retrieval Augmented Generation (RAG) pattern using a combination of Azure services. The system consists of three main components:

  • Search Service: Uses Azure AI Search to index and retrieve relevant documents from a data source.
  • Indexer Service: Handles the processing and indexing of data into the search index.
  • Web App: A frontend interface that orchestrates the interaction between the user, the Azure AI Search retriever, and the Azure OpenAI Service (specifically the gpt-4o-mini model) to generate grounded responses.

Who it’s for

Developers and architects looking to deploy a production-ready RAG application using JavaScript/Node.js and the Azure ecosystem.

Highlights

  • Trustworthiness Tools: Includes features for citations and source content tracking to help users verify AI responses.
  • Experimentation UX: Provides built-in settings in the user interface to tweak prompts and model behavior.
  • SaaS-ready Deployment: Integrated with the Azure Developer CLI (azd) for streamlined provisioning of container apps, static web apps, and AI services.
  • Interoperable Backend: Implements a standardized HTTP protocol for AI chat apps, allowing the backend to be swapped with other compatible implementations.

Related

  • Project
  • Project
  • Project
  • Project