#2121st of 34 in RAG and searchFor data and documents, data analysis
rag-postgres-openai-python
RAG over Postgres table rows with hybrid search and SQL filters
- Stars
- 512
- License
- MIT
- Last commit
- Oct 2026
- Language
- Python
476 on 28 Mar 2026512 on 21 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
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 34| Rank | Project | Score |
|---|---|---|
| #19 | SupabaseAuthWithSSRClaude chat on Next.js 16 with Supabase auth, pgvector RAG, cost dashboards | 45 out of 100 |
| #20 | llm-apps-java-spring-aiSpring AI sample projects for chat, RAG, tool calling and observability in Java | 43 out of 100 |
| #22 | generativeaiexamplesNVIDIA notebooks and sample apps for RAG, agents and NeMo microservices | 42 out of 100 |
| #23 | serverless-chat-langchainjsRAG chatbot sample on Azure Functions, Cosmos DB and LangChain.js | 42 out of 100 |
| #24 | ai-starter-kitSambaNova Python kits for document RAG, search assistant, function calling | 40 out of 100 |