Vault Coach

pending

by Wanjin5508

Local knowledge Q&A and interview practice from your vault using Ollama.

β˜… 6 starsUpdated 16d agoMITDiscovered via Obsidian Unofficial Plugins
View on GitHub

Vault Coach

🌐 Language: English | δΈ­ζ–‡

An Obsidian plugin for intelligent local knowledge base Q&A, powered by Advanced RAG (Retrieval-Augmented Generation) and a locally-running Ollama service. Your data never leaves your machine.

Obsidian Version Local RAG Ollama License


Table of Contents


Features

βœ… Phase 1 (Current β€” v0.0.2)

FeatureDescription
πŸ” Hybrid RetrievalTF-IDF keyword search + semantic vector search + RRF fusion
✏️ Query RewriteLocal LLM auto-rewrites queries to improve retrieval quality
πŸ“Š RerankOptional external rerank service, falls back to heuristic rerank
🧠 Long-term MemoryCross-session extraction and injection of user preferences
πŸ”„ Incremental Index SyncWatches vault file changes and updates the index automatically
🌊 Streaming OutputPseudo-streaming response rendering with low perceived latency
πŸ’Ύ Conversation PersistenceChat history saved locally and restored after restart
πŸ”’ 100% LocalPowered by Ollama REST API β€” no data leaves your device

Quick Start

Prerequisites

  • Obsidian v1.5.0+
  • Ollama running locally
  • At least one chat model (e.g. gemma3:4b) and one embedding model pulled

Installation (Development Build)

# 1. Clone into your vault's plugin directory
cd <your-vault>/.obsidian/plugins
git clone https://github.com/Wanjin5508/vault-coach vault-coach

# 2. Install dependencies and build
cd vault-coach
npm install
npm run build

# 3. Enable Vault Coach in Obsidian Settings > Community Plugins

Basic Setup

  1. Open Settings β†’ Vault Coach
  2. Set your Ollama base URL (default: http://127.0.0.1:11434)
  3. Enter your chat model name (e.g. gemma3:4b) and embedding model name
  4. Click Rebuild Index or wait for auto-sync to complete
  5. Click the πŸ’¬ ribbon icon to start chatting

Configuration

General

SettingDescription
Assistant NameName shown in the sidebar header
Default GreetingFirst message shown after conversation reset (Markdown supported)
Open on StartupAuto-open Vault Coach when Obsidian loads
Default Retrieval Modekeyword / vector / hybrid (hybrid recommended)
Collapse SourcesWhether to collapse the sources section by default

Knowledge Base

SettingDefaultDescription
ScopeWhole VaultOr limit to a specific folder
Chunk Size600 charsMaximum characters per chunk
Chunk Overlap120 charsOverlap between adjacent chunks
Auto Syncβœ…Watch file changes and update index automatically
Debounce Delay15,000 msWait time after last file change before syncing
Max Wait Time120,000 msForce sync after this duration regardless
File Threshold8 filesTrigger immediate sync when this many files change

Advanced RAG

SettingDefaultDescription
Query Rewriteβœ…LLM rewrites the query before retrieval
Vector Retrievalβœ…Generate embeddings during index build
Rerankβœ…Rerank retrieved candidates
Keyword top-k10Keyword retrieval candidate count
Vector top-k10Vector retrieval candidate count
Hybrid limit12Max candidates after fusion
Rerank top-k8Candidates entering rerank stage
Context chunks8Final chunks injected into the prompt
Source limit5Max sources shown per answer
Temperature0.2Generation temperature (keep low for RAG)

Local Model

SettingDescription
LLM Base URLOllama address, default http://127.0.0.1:11434
Chat ModelUsed for query rewrite and answer generation
Embedding ModelUsed for vector retrieval; rebuild index after changing
Rerank Service URLOptional; leave empty to use heuristic rerank
Rerank ModelUsed when a rerank service URL is configured

Long-term Memory

SettingDefaultDescription
Enable Memoryβœ…Extract and store useful facts after each turn
Memory Top-k4Max memories injected per answer
Max Memory Items150Oldest/least-accessed items are evicted when exceeded
Max Persisted Messages60Max conversation messages kept in local storage

Roadmap

See PROJECT_PLAN.md for the full three-phase development plan.

Phase Overview

PhaseNameStatusKey Goal
Phase 1Advanced RAG Q&Aβœ… CompleteHybrid retrieval + Rerank + Long-term memory + Incremental index
Phase 2Knowledge Graph EnhancementπŸ”œ PlannedEntity extraction + Graph construction + Smart query routing
Phase 3Agentic Interview AssistantπŸ”œ PlannedMulti-role agents + Interview simulation + Skill diagnosis
Phase 4Standalone ApplicationπŸ”œ VisionIndependent frontend/backend + Voice + Avatar

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   view.ts (UI)                    β”‚
β”‚         Obsidian ItemView Β· Right Sidebar         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   main.ts                         β”‚
β”‚   Plugin Entry Β· State Management Β· Vault Events  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚             β”‚              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  rag-engine β”‚ β”‚knowledge β”‚ β”‚ persistent-store   β”‚
β”‚  Advanced   β”‚ β”‚  -base   β”‚ β”‚ runtime-state.json β”‚
β”‚  RAG Flow   β”‚ β”‚Index/Ret.β”‚ β”‚ index-snapshot.jsonβ”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                model-client.ts                    β”‚
β”‚     Ollama REST API Β· /api/chat Β· /api/embed      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed technical documentation, see TECHNICAL_DOC.docx.


Known Issues

  • Non-true streaming: requestUrl returns the full response at once; true token-level streaming will require a fetch + ReadableStream migration
  • Memory search lacks semantic similarity: Currently uses keyword matching only; embedding-based memory search is planned for Phase 2
  • VIEW_TYPE typo: The constant value in constants.ts says value-coach-view instead of vault-coach-view (non-breaking, will be fixed in next release)

Contributing

Issues and PRs are welcome! Please check PROJECT_PLAN.md for the current development direction before opening a PR.


License

MIT License

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.