ChatGPT + Enterprise Data with Azure OpenAI and Azure AI Search
Introduction
This project harnesses the power of Azure OpenAI and Azure AI Search to create a ChatGPT-like application that can interact with enterprise-specific data. By employing a pattern known as Retrieval Augmented Generation, the project facilitates seamless information retrieval and natural language interaction. At its core, it uses Azure OpenAI Service to power the ChatGPT model and Azure AI Search for efficient data indexing and retrieval.
Overview
Developed with a fictional company, Contoso Real Estate, in mind, this application allows users to efficiently find and understand information about product usage through intuitive chat interfaces. The sample data includes documents like terms of service, privacy policies, and support guides, making it an excellent tool for customer interactions.
Key Components
The application is composed of the following components:
- Search Service: Acts as the backend service responsible for enabling search and retrieval functionalities.
- Indexer Service: Indexes all the available data, facilitating efficient search operations.
- Web App: Provides the user-friendly interface where users interact with the underlying services seamlessly.
Features
The application includes:
- Chat and Q&A interfaces that allow direct interaction with the data.
- Various tools to assess the credibility of responses, including citations and content source tracking.
- Options to customize data handling approaches, prompt setups, and the overall orchestration between ChatGPT and Azure AI Search.
- A user interface with adjustable settings to enable experimentation with different functionalities.
- Optional performance monitoring using Application Insights for enhanced app oversight.
Getting Started
Azure Account Prerequisites
To fully utilize this application, users need:
- An Azure account, with free credits available for new users.
- An Azure subscription with OpenAI service access.
- Proper Azure account permissions to manage resources and deployments.
Azure Deployment
Deploying the app involves several steps, whether you're starting fresh or using existing resources. Users can estimate costs using Azure's pricing calculator since prices may vary based on service use and location.
Cost Management
Users are advised to deallocate unused resources to avoid incurring unnecessary costs. Azure services such as Container Apps, Static Web Apps, and OpenAI have specific pricing models that users should review.
Project Setup
To set up the project, developers have several options. GitHub Codespaces offers a convenient setup environment; alternatively, local environments can be configured with tools such as Azure Developer CLI, Node.js, Docker, and Git.
Deploying the Application
Deployment can be tailored to suit various scenarios, whether launching for the first time or using existing Azure components. This includes provisioning new resources or deploying only the application code if infrastructure changes are not needed.
Maintenance and Clean Up
Managing and uninstalling your deployments is straightforward, and users can follow clear instructions for a full resource cleanup to avoid any residual charges.
Additional Features and Security
The app's capabilities can be extended with optional features, such as leveraging authentication for security enhancements. Users can also enforce authentication using Azure Entra ID for added control.
Running Locally
After deployment, local testing and development are supported, with instructions provided for setting up a local environment using Node.js and npm.
Using the Application
Users access the application via a web interface, enabling them to engage with data through chat or Q&A forms effectively. The frontend allows interaction with the backend services, exploring data through diverse inquiries and settings adjustments.
Guidance for Further Development
The project serves as a foundation for building scalable, secure applications with tailored setups for storage, search capabilities, and backend options. It also guides users on adding security layers, such as Azure container app authentication, and improving production readiness with strategic Azure resource configurations.
Conclusion
This project provides a comprehensive solution for creating sophisticated enterprise data interaction platforms using the robust capabilities of Azure OpenAI and Azure AI Search. It is a versatile foundation designed to maximize data accessibility and user engagement through advanced conversational interfaces.