Exercise 04: Integrate AI functionality into PostgreSQL
Scenario
Following the City of Metropolis’s transition to Azure Database for PostgreSQL for improved administrative efficiency, the municipality is now exploring AI-driven features to further enhance data insights and streamline services. By integrating Azure AI functionality directly into PostgreSQL, Metropolis aims to enable advanced text processing, semantic search, and other intelligent features within its database environment—reducing manual overhead and allowing city employees to respond faster to citizen needs.
Objectives
After completing this lab, you’ll be able to:
- Set up and connect to an Azure Database for PostgreSQL Flexible Server.
- Install and configure the azure_ai extension to integrate AI services directly within your database.
- Leverage both basic pattern matching and advanced semantic search (including DiskANN) for more efficient data analysis.
- Implement RAG (Retrieval-Augmented Generation) techniques, including reranking and GraphRAG, for improved chatbot accuracy.
- Compare AI-driven search strategies to determine the optimal approach for real-world scenarios.
Duration
Estimated Time: 90 minutes