Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 2.91 KB

README.md

File metadata and controls

64 lines (45 loc) · 2.91 KB

AI on Azure PostgreSQL Flexible Server

This project demonstrates how to use AI-driven features on Azure PostgreSQL Flexible Server. It includes steps to set up the environment, populate the database with sample data, and use various AI-driven features to enhance your application.

Lab Content

  1. Part 0 - Log into Azure
  2. Part 1 - Getting started with AI on Azure PostgreSQL flexible server
    1. Clone TechConnect Lab repo
    2. Connect to your database using psql in the Azure Cloud Shell
    3. Populate the database with sample data
    4. Setting up pgAdmin
    5. Install and configure the azure_ai extension
  3. Part 2 - Using AI-driven features in Postgres
    1. Using Pattern matching for queries
    2. Using Semantic Search and DiskANN
  4. Part 3 - How RAG chatbot accuracy improves with different technique
    1. Exploring Cases RAG application
    2. Review Accuracy of vector search queries
  5. Part 4 - Improving RAG Accuracy with Advanced Techniques - Reranking and GraphRAG
    1. Reranker
    2. GraphRAG
    3. Compare Results of RAG responses using Vector search, Reranker or GraphRAG

Build GraphRAG Application on Azure

This will require and Azure subscription, follow our Graph RAG solution accelerator

Graph RAG App

Build Simple RAG Application Locally

Setting up the environment file

Since the local app uses OpenAI models, you should first deploy it for the optimal experience.

  1. Copy .env.sample into a .env file.
  2. To use Azure OpenAI, fill in the values of AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_API_KEY based on the deployed values.

Install dependencies

Install required Python packages and streamlit application:

python3 -m venv .ignite_lab
source .ignite_lab/bin/activate
pip install -r requirements.txt

Running the application

From root directory

cd App
streamlit run rag_chatbot_demo.py

When run locally run looking for website at http://localhost:8501/

Simple RAG App