22nd of 12 in RAG and search
rag-postgres-openai-python
RAG over Postgres table rows with hybrid search and SQL filters
- Stars
- 505
- License
- MIT
- Last commit
- Oct 2026
- Language
- Python
Overview
A FastAPI backend and React frontend that answer chat questions about rows in a PostgreSQL table. Retrieval is hybrid (pgvector similarity plus full-text search fused with RRF), an OpenAI function call turns phrases like cheaper than 30 dollars into WHERE clauses, and it runs against Azure OpenAI, OpenAI.com or Ollama; azd deploys it to Container Apps with managed identity. For teams whose knowledge is structured rows, not documents.
Who it is for: Teams whose knowledge base is structured Postgres rows
Strengths
- Hybrid vector plus full-text search with RRF is implemented in SQL, not a vendor service
- Provider switch by env var: Azure OpenAI, OpenAI.com or Ollama
- Evaluation, safety evaluation and load-testing docs included
- Tests included; dev container and Codespaces configs
Weaknesses
- Deploy path is Azure-only (azd, Container Apps, Flexible Server)
- Local run expects Postgres 14+ with pgvector installed yourself
- Sample schema is one products table; multi-table questions need new code
- No auth in the app itself
What it needs
- Python, azure-openai, openai, ollama
- Needs postgres-pgvector, azure-openai-or-openai-or-ollama, azd
- GitHub template
- env example file
Also in RAG and search
See all 12| Rank | Project | Score |
|---|---|---|
| 1 | azure-search-openai-demoAzure RAG chat reference on AI Search and Azure OpenAI | 56 out of 100 |
| 3 | llm-appPathway RAG pipeline templates that re-index live data sources | 48 out of 100 |
| #4 | chat-langchainLangChain docs assistant as a Managed Deep Agent with Next.js UI | 45 out of 100 |
| #5 | chat-with-your-data-solution-acceleratorAzure RAG chat app that answers from your documents with citations | 44 out of 100 |
| #6 | llm-answer-enginePerplexity-style Next.js answer engine over Brave search results | 41 out of 100 |