Github Com
Github Com
Azure-Samples /
azure-search-openai-demo Public
Files azure-
main
search-
openai-
demo
/
README.m
d
ChatGPT-like app
with your data
using Azure
OpenAI and Azure
AI Search
(Python)
This solution's backend is written in
Python. There are also JavaScript,
.NET, and Java samples based on this
one. Learn more about developing AI
apps using Azure AI Services.
Table of Contents
Features
Azure account requirements
Cost estimation
Getting Started
GitHub Codespaces
VS Code Dev Containers
Local environment
Deploying
Deploying again
Sharing environments
Running locally
Using the app
Clean up
Guidance
Customizing the UI and data
Monitoring with Application
Insights
Productionizing
Troubleshooting
Resources
Features
Chat (multi-turn) and Q&A (single
turn) interfaces
Renders citations and thought
process for each answer
Includes settings directly in the UI
to tweak the behavior and
experiment with options
Integrates Azure AI Search for
indexing and retrieval of
documents, with support for many
document formats as well as
integrated vectorization
Optional usage of GPT-4 with
vision to reason over image-heavy
documents
Optional addition of speech
input/output for accessibility
Optional automation of user login
and data access via Microsoft Entra
Performance tracing and
monitoring with Application Insights
Architecture Diagram
Azure account
requirements
IMPORTANT: In order to deploy and run
this example, you'll need:
Cost estimation
Pricing varies per region and usage, so
it isn't possible to predict exact costs for
your usage. However, you can try the
Azure pricing calculator for the
resources below.
Getting Started
You have a few options for setting up
this project. The easiest way to get
started is GitHub Codespaces, since it
will setup all the tools for you, but you
can also set it up locally if desired.
GitHub Codespaces
You can run this repo virtually by using
GitHub Codespaces, which will open a
web-based VS Code in your browser:
Local environment
1. Install the required tools:
Deploying
Deploying again
If you've only changed the
backend/frontend code in the app
folder, then you don't need to re-
provision the Azure resources. You can
just run:
azd deploy
azd up
Sharing environments
Running locally
Clean up
To clean up all the resources created by
this sample:
Guidance
azd monitor
Productionizing
This sample is designed to be a starting
point for your own production
application, but you should do a
thorough review of the security and
performance before deploying to
production. Read through our
productionizing guide for more details.
Troubleshooting
Here are the most common failure
scenarios and solutions:
1. The subscription
( AZURE_SUBSCRIPTION_ID ) doesn't
have access to the Azure OpenAI
service. Please ensure
AZURE_SUBSCRIPTION_ID matches
the ID specified in the OpenAI
access request process.
5. You see
CERTIFICATE_VERIFY_FAILED when
the prepdocs.py script runs.
That's typically due to incorrect
SSL certificates setup on your
machine. Try the suggestions in
this StackOverflow answer.
Resources
Additional documentation for this
app
📖 Revolutionize your Enterprise
Data with ChatGPT: Next-gen Apps
w/ Azure OpenAI and AI Search
📖 Azure AI Search
📖 Azure OpenAI Service
📖 Comparing Azure OpenAI and
OpenAI
📖 Access Control in Generative AI
applications with Azure Cognitive
Search
📺 Quickly build and deploy OpenAI
apps on Azure, infused with your
own data
📺 AI Chat App Hack series
Getting help
This is a sample built to demonstrate
the capabilities of modern Generative AI
apps and how they can be built in
Azure. For help with deploying this
sample, please post in GitHub Issues. If
you're a Microsoft employee, you can
also post in our Teams channel.
Note
Note: The PDF documents used in
this demo contain information
generated using a language model
(Azure OpenAI Service). The
information contained in these
documents is only for
demonstration purposes and does
not reflect the opinions or beliefs of
Microsoft. Microsoft makes no
representations or warranties of
any kind, express or implied, about
the completeness, accuracy,
reliability, suitability or availability
with respect to the information
contained in this document. All
rights reserved to Microsoft.