#113 · Primary category: Knowledge Base & RAG
rag_api
ID-based RAG FastAPI: Integration with Langchain and PostgreSQL/pgvector
Project last updated:08/15/26
GitHub Stars
888
Forks
390
Contributors
36
License
MIT
Why we included this project
The pitch here is simple: if you already keep a PostgreSQL database around, this FastAPI service lets you point retrieval at it without standing up a separate vector store. It indexes documents into pgvector embeddings, with LangChain handling the vector-store plumbing, and exposes REST routes to add, fetch, and delete documents. The distinguishing choice is that embeddings are scoped by file rather than mixed into one big corpus, so a query can be aimed at a specific document, which is exactly the shape a chat client wants; that's why it sits behind LibreChat's file attachments. The API is small enough to bend to other ID-based uses. One thing to weigh before running it multi-user: recent work tightened retrieval scope so reads and deletes are limited to an owner set resolved from the authenticated token before ranking, meaning a caller can't reach or wipe chunks outside its scope just by naming a foreign file id. It does assume a working pgvector database and, in a multi-tenant setup, an upstream caller that issues tokens with the right owner claims.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
ragflow
RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
crawl4ai
🚀🤖 Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper. Don't be shy, join here: https://discord.gg/jP8KfhDhyN
docling
Get your documents ready for gen AI
anything-llm
Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience