Skip to content

leon0204/fast-rag

Repository files navigation

Fast RAG

中文 | English

Local, privacy-first RAG using PostgreSQL + pgvector and Ollama. Streams responses via SSE. Simple, fast, hackable.

Python FastAPI PostgreSQL pgvector Docling FTS/pg_trgm Hybrid Retrieval Docker License

img_6.png

img.png img_2.png img3.png

Features

  • Process management 【LangGraph】
  • Documents transform core tools 【Docling】、supprt PDF、DOCX、PPTX、Image、HTML、AsciiDoc、Markdown
  • Semantic search with pgvector (768-dim nomic-embed-text)
  • REST + Streaming responses via SSE
  • Optional frontend: React + Vite + TypeScript
  • Local models via Ollama or openai api

Table of Contents


  • env configure

Local Setup

pip install -r requirements.txt
docling-tools models download 
cp env.example .env   # edit DB_* for your environment
#python scripts/init_db.py   # if not using docker init

Run

python main.py

App: http://localhost:8000


Frontend

React + Vite + TypeScript app lives in frontend-app/.

Dev

cd frontend-app
npm install          # or: pnpm i / yarn
npm run dev          # http://localhost:5173

License

MIT. See LICENSE.

About

LLM Rag Intelligent Q&A Robot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published