{"repo":"Azure-Samples/rag-postgres-openai-python","free":true,"listed":false,"github":"https://github.com/Azure-Samples/rag-postgres-openai-python","clone":"git clone https://github.com/Azure-Samples/rag-postgres-openai-python.git","description":"A RAG app to ask questions about rows in a database table. Deployable on Azure Container Apps with PostgreSQL Flexible Server.","language":"Python","stars":500,"topics":["ai-azd-templates","azd-templates","azure-container-apps","azure-openai","containers","fastapi","openai","pgvector","postgres","postgresql"],"license":"MIT","category":"databases-storage","readme_excerpt":"RAG on PostgreSQL This project creates a web-based chat application with an API backend that can use OpenAI chat models to answer questions about the rows in a PostgreSQL database table. The frontend is built with React and FluentUI, while the backend is written with Python and FastAPI. This project is designed for deployment to Azure using the Azure Developer CLI, hosting the app on Azure Container Apps, the database in Azure PostgreSQL Flexible Server, and the models in Azure OpenAI. Features Getting started GitHub Codespaces VS Code Dev Containers Local environment Deployment Local development Costs Security guidelines Guidance Resources Features This project provides the following features: Hybrid search on the PostgreSQL database table, using the pgvector extension for the vector search plus full text search, combining the results using RRF (Reciprocal Rank Fusion). OpenAI function calling to optionally convert user queries into query filter conditions, such as turning \"Climbing gear cheaper than $30?\" into \"WHERE price < 30\". Conversion of user queries into vectors using the OpenAI embedding API. Architecture diagram The deployed app uses a user-assigned managed identity to authenticate to Azure services, and stores logs in Log Analytics. Getting started You have a few options for getting started with this template. The quickest way to get started is GitHub Codespaces, since it will setup all the tools for you, but you can also set it up locally. GitHub Codespaces You c","default_branch":null,"files":null,"tree":[],"storefront":"/r/Azure-Samples","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Azure-Samples/rag-postgres-openai-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}