BACK
Local AI · RAG · Knowledge Graph

Local Knowledge Assistant

A local-first RAG system for long-term personal knowledge assets, combining Markdown, retrieval, answer generation, Notion synchronization, and knowledge graph governance in one maintainable workspace.

RoleIndependent Developer
StatusActive Development
StackPython / FastAPI / Vue 3
Local Knowledge Assistant question-answering and retrieval workspace

Turn a Personal Knowledge Base into a Governed System

The project uses local Markdown as its source of truth and builds a complete workflow for long-term personal knowledge assets. Content ingestion, metadata standardization, vector indexing, retrieval reranking, answer generation, relationship maintenance, and graph exploration all live in the same workspace.

Indexing and retrieval run locally by default. Answer generation can use DeepSeek with a local Ollama fallback when the API is unavailable. For sensitive questions, remote generation can be disabled to keep the entire flow on device.

Python
Streamlit
FastAPI
Vue 3
Element Plus
Sentence Transformers
Ollama

From Local Documents to Traceable Answers

The retrieval pipeline separates responsibilities to keep installation stable on Apple Silicon while preserving clear extension points for future index and model changes.

01 / INGEST
Content Splitting
Read Markdown and structured metadata, then create chunks with configurable windows.
02 / EMBED
Local Embeddings
Generate and reuse multilingual Sentence Transformer vectors on device.
03 / RERANK
Retrieve and Rerank
Use NumPy cosine retrieval followed by CrossEncoder reranking and source controls.
04 / ANSWER
Answer and Cite
Compose an answer from relevant chunks while retaining sources for verification.

Knowledge Governance Beyond Retrieval

Document type, status, scope, summary, tags, Wiki tags, and strong relationships are normalized into front matter. Content ingestion and relationship edits always produce a preview before writing, preventing automation from silently changing the source knowledge base.

Multiple Workspaces share the same capabilities while keeping data isolated. Incremental index rebuilds reuse vectors for unchanged chunks and only encode new or modified content.

Controlled Synchronization Between Local Files and Notion

The project supports Notion import and synchronization with live progress, retry logs, and explicit failure reasons. Checkpoints make interrupted jobs resumable, content hashes skip unchanged entries, and bidirectional project-to-problem relationships are synchronized as database properties.

Every write operation follows a preview, confirm, execute boundary. API credentials remain in local environment files and are never committed to the repository.

Explore Disconnected Documents as a Relationship Network

The graph distinguishes manually confirmed strong relationships, weak relationships derived from scope and Wiki tags, and candidate links awaiting review. Users can filter by document type, directory, scope, tag, or keyword and focus on the one-hop neighborhood of any node.

Local Knowledge Assistant knowledge graph explorer
Graph explorer: inspect document nodes, strong and weak relationships, filter statistics, and node details in one view.

An End-to-End Knowledge Asset Workflow

01
Question Answering
Control search areas, scope, result count, source limits, reranking, and optional answer generation.
02
Content and Indexing
Create normalized documents from pasted text or local files and rebuild indexes or graphs on demand.
03
Tags and Relations
Use assisted tag and relation analysis while preserving human approval for every write.
04
Notion Workflow
Import, synchronize in the background, retry failures, resume from checkpoints, or fall back to manual upload.
05
Multiple Workspaces
Switch between knowledge domains while keeping indexes, configuration, and runtime state isolated.
06
Local First
Keep retrieval and governance on device, make remote generation optional, and provide an Ollama fallback.