Azure-Samples/postgres-sa-byoac(opens in a new tab)
Language: Python
Build your own Advanced AI Copilot with Postgres
- stars
- 25
- watchers
- 11
- forks
- 44
- open issues
- 11
- Last updated
- 06/09/2026
Language: Python
Build your own Advanced AI Copilot with Postgres
This solution accelerator is designed as an end-to-end example of an AI-enabled application built on Azure Postgres. It demonstrates the implementation of generative AI capabilities to enhance an existing application with AI-driven data validation, vector search, DiskANN, semantic re-ranking, LangChain agent/tools framework, and GraphRAG on Azure Database for PostgreSQL, and illustrates how they can be combined to deliver high quality responses to financial questions via an intelligent copilot. The app uses a small sample dataset made up of statements of work (SOWs) and invoices.
The full documentation for deploying and completing the workshop can be found here: http://aka.ms/pg-byoac-docs/
pgvector extension for efficient vector search, making PostgreSQL a powerful foundation for intelligent applications that combine structured data with generative AI.cross-encoder/ms-marco-MiniLM-L-6-v2 (lightweight and fast)bge-reranker-v2-m3 (higher accuracy, heavier model)Apache AGE (A Graph Extension for PostgreSQL) to enrich retrieval and grounding via knowledge graphs—ideal for complex relationships and semantic context.DiskANN (Disk-Accelerated Approximate Nearest Neighbor), offering scalable and fast vector similarity search, optimized for large datasets and low-latency retrieval directly within PostgreSQL.