piFlow is a local RAG (retrieval-augmented generation) desktop application that allows users to build a knowledge base from local documents and ask questions in natural language. Every generated answer is traceable back to the source, ensuring privacy and control over your data without any reliance on cloud services.
piFlow – A Comprehensive Local RAG Desktop Application for Enhanced Retrieval
piFlow is an innovative desktop application designed for Retrieval-Augmented Generation (RAG). This application empowers users to construct a knowledge base by importing local documents, facilitating interactions through natural language queries. Every aspect of parsing, embedding, retrieval, and reasoning operates locally on your machine or a designated server, ensuring that both documents and conversations remain under your control. Each generated answer includes source citations, allowing for easy traceability back to specific documents and paragraphs.
piFlow utilizes a dual-process design leveraging Tauri 2 and a Node Sidecar. The Tauri layer acts as a lightweight UI shell, while all RAG inference and native modules execute within an independent Node process. Communication between the front-end and back-end is made via localhost HTTP/SSE:
┌────────────────────────────────────────────────────┐
│ Tauri WebView (React + TypeScript) │
│ Knowledge Base · piFlow (Main Interface)· Citation · Settings │
└──────────────────────┬─────────────────────────────┘
│ HTTP / SSE (localhost)
┌──────────────────────▼─────────────────────────────┐
│ Node Sidecar (apps/rag-server) │
│ │
│ RAG: Import → Parse → Chunk → BGE-M3 → Retrieve → Generate │
│ piFlow: Pi Agent + Skills (KB / Postgres / FS) │
│ │
│ SQLite · pg-actions · Model cache · Files │
└─────────────────────────────────────────────────────┘
The technical foundation of piFlow includes:
| Layer | Technology |
|---|---|
| Desktop Shell | Tauri 2 (Rust handles window & lifecycle) |
| Frontend | React 19 + TypeScript + Vite |
| RAG Backend | Node.js + Hono (HTTP/SSE) |
| Embedding | BGE-M3 (Xenova ONNX, @huggingface/transformers, Worker Threads) |
| Generation | Qwen2.5-3B-Instruct GGUF (node-llama-cpp), Ollama, DeepSeek, Pleias-RAG-1B |
| Storage | better-sqlite3 (metadata + vectors, cosine similarity retrieval) |
| Parsing | pdf-oxide · mupdf · PaddleOCR (for scanned documents) |
| Package Management | pnpm workspaces (monorepo) |
A detailed overview of the architecture and guidance can be found in the extensive documentation, covering:
No comments yet.
Sign in to be the first to comment.