https://github.com/lazauk/aoai-aisearch-sdkv1
Developing RAG (retrieval-augmented generation) solution with Azure OpenAI and Azure AI Search services.
https://github.com/lazauk/aoai-aisearch-sdkv1
ai azure openai rag retrieval-augmented-generation search
Last synced: 3 months ago
JSON representation
Developing RAG (retrieval-augmented generation) solution with Azure OpenAI and Azure AI Search services.
- Host: GitHub
- URL: https://github.com/lazauk/aoai-aisearch-sdkv1
- Owner: LazaUK
- License: mit
- Created: 2024-09-24T23:18:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T22:35:21.000Z (6 months ago)
- Last Synced: 2025-01-12T05:11:07.343Z (4 months ago)
- Topics: ai, azure, openai, rag, retrieval-augmented-generation, search
- Language: Jupyter Notebook
- Homepage:
- Size: 503 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Retrieval-Augmented Generation (RAG) with Azure OpenAI and Azure AI Search
This repo demonstrates how to setup RAG solution in Azure, using Azure OpenAI on "own data" in tandem with Azure AI Search.
> [!NOTE]
> Data file used in this repo was borrowed from the [Microsoft's Azure OpenAI + Azure AI Search open-source solution](https://github.com/Azure-Samples/azure-search-openai-demo)## Table of contents:
- [Pre-requisites](https://github.com/LazaUK/AOAI-AISearch-SDKv1#pre-requisites)
- [Scenario 1: Authenticating with API Key]()
- [Scenario 2: Authenticating with Entra ID]()## Pre-requisites
1. Upgrade openai Python package to its latest supported version:
``` PowerShell
pip install --upgrade openai
```
2. Set the following 7 environment variables before running the notebooks:| Environment Variable | Description |
| --- | --- |
| _AZURE_OPENAI_API_BASE_ | Base URL of the AOAI endpoint |
| _AZURE_OPENAI_API_VERSION_ | API version of the AOAI endpoint |
| _AZURE_OPENAI_API_KEY_ | API key of the AOAI endpoint (_required for Scenario 1 only_) |
| _AZURE_OPENAI_API_DEPLOY_ | Name of the AOAI deployment |
| _AZURE_SEARCH_API_BASE_ | Base URL of the AI Search endpoint |
| _AZURE_SEARCH_API_KEY_ | API key of the AI Search endpoint (_required for Scenario 1 only_) |
| _AZURE_SEARCH_API_INDEX_ | Name of the AI Search index |## Scenario 1: Authenticating with API Key
## Scenario 2: Authenticating with Entra ID