đ§ Mnemos â Personal Thinking Environment
Structure thoughts, not just words. Mnemos treats knowledge as atomic, typed, connected, and versioned units.
Core Principles
- Atomic thinking - Each note captures exactly one concept
- Typed structure - Every thought has a category: fact, question, todo, pitch, related
- Connected knowledge - Ideas gain meaning through wiki-links
- Concise expression - Bullet points over paragraphs
Note Types
- fact: Objective, verifiable information
- question: Open inquiries requiring exploration
- todo: Actionable tasks with clear outcomes
- pitch: Ideas or proposals to develop
- related: Connections between existing notes
Note Format
---
type: fact
tags: [golang, concurrency]
links: [go-channels, goroutines]
created: 2024-01-15
---
- Go channels are typed conduits for communication
- Send/receive operations block by default
- Closed channels can't be reopened
Commands
mnemos new TYPE "content"- Create atomic notemnemos find --type question --tag golang- Search notesmnemos graph --from channels.md --depth 2- Visualize connectionsmnemos fmt- Update notes with git datesmnemos sync- Git push/pull
Workflow Integration
- Obsidian compatibility - Uses wiki-links and YAML frontmatter
- Git-native - Version your mindâs evolution
- Terminal-first - No friction between thought and capture
- Makefile automation -
make allruns pull â fmt â push
Obsidian Integration
Knowledge base software that works with local markdown files, perfect frontend for mnemos:
- Uses wiki-links for connections:
<a href="/wiki/note-name" class="wiki-link">note-name</a> - YAML frontmatter for metadata
- Graph view for visualizing connections
- Local files = full control and git compatibility
- Extensible with community plugins
- Works seamlessly with mnemos vault structure
Wiki Links
Internal linking format using double brackets: <a href="/wiki/note-name" class="wiki-link">note-name</a>:
- Used by Obsidian and other knowledge management tools
- Creates automatic backlinks between notes
- No need for .md extension or paths
- Enables graph visualization of connections
- Core to mnemos philosophy of connected knowledge
- Format:
<a href="/wiki/exact-note-name" class="wiki-link">exact-note-name</a>or<a href="/wiki/note|display-text" class="wiki-link">note|display text</a>
Behavioral Rules
- Never merge distinct concepts into one note
- Prefer creating links over duplicating information
- Challenge vague statements - ask for specifics
- Maintain consistent file naming:
concept-name.md - Place notes in type-specific folders
Integration with Mimir
p/moul/mimir|Mimir feeds data â Mnemos structures knowledge:
- Mimir events can trigger note creation
- Mnemos questions can drive Mimir data collection
- Together they form a complete knowledge pipeline
Meta-Knowledge: Mnemos Self-Reference
- Mnemos contains its own concept-spec within itself
- This creates a meta-knowledge loop: the tool documenting itself
- The spec demonstrates Mnemos principles: atomic notes, typed structure, connections
- Shows how concept specs evolve into implemented projects
- Exemplifies âeating your own dogfoodâ in knowledge management
- The spec itself follows the format it prescribes
Future Vision
- Interactive capture - Guided prompts for better note creation
- Smart search - Semantic understanding beyond grep
- Q&A mode - Synthesize answers from knowledge base
- Telegram bot - On-the-go capture and retrieval
AI Integration Specification
Phase 1: RAG System (Immediate)
mnemos index --embeddings # Generate vector embeddings
mnemos ask "question" --context=semantic # Use RAG for answers
- Use OpenAI embeddings API or local model (sentence-transformers)
- Store in SQLite with vector extension or dedicated vector DB
- Retrieve top-k relevant notes for context
Phase 2: Export for Fine-tuning
mnemos export --format=jsonl --for=openai # Export for OpenAI fine-tuning
mnemos export --format=parquet --for=huggingface # Export for open models
Export formats:
- JSONL with prompt/completion pairs
- Conversation format from note relationships
- Include metadata as system messages
Phase 3: Local Assistant
mnemos assistant --model=local # Run fine-tuned model locally
mnemos assistant --model=api --endpoint=... # Use remote model
Implementation Strategy
-
Data Preparation Pipeline
- Convert notes to training pairs
- Extract Q&A from facts/questions
- Generate summaries from related notes
- Create instruction-following examples
-
Training Data Format
{ "messages": [ {"role": "system", "content": "You are Mnemos, trained on [user]'s knowledge base..."}, {"role": "user", "content": "What are the design principles of Mnemos?"}, {"role": "assistant", "content": "Based on the notes:\n- Atomic thinking...\n- Typed structure..."} ] } -
Continuous Learning
- Incremental updates as new notes added
- Feedback loop from user interactions
- Version control for model iterations
Questions
AI Training Considerations
Privacy & Security
- How to ensure private notes donât leak in trained models?
- Should certain note types be excluded from training?
- How to handle sensitive information in concept specs?
- Can we train locally-only models for complete privacy?
Quality & Performance
- Whatâs the minimum number of notes for effective fine-tuning?
- How to measure if the AI truly âlearnedâ vs memorized?
- Should we use synthetic data generation to augment training?
- How often should models be retrained?
Cost & Resources
- Whatâs the cost/benefit of fine-tuning vs RAG only?
- Should we pool resources for shared community models?
- Can we use quantization for efficient local models?
- How to handle incremental learning without full retraining?
Integration Design
- Should AI responses create new notes automatically?
- How to maintain attribution (human vs AI-generated)?
- Can we version control AI model outputs?
- Should there be a âconfidenceâ score for AI suggestions?
TODOs
Implement AI Training Export
Quick Win: Claude Projects
- [ ] Create script to export all notes as single markdown
- [ ] Upload to Claude Projects for persistent knowledge
- [ ] Generate custom instructions from CLAUDE.md
RAG Implementation
- [ ] Add vector embedding generation to
mnemos index - [ ] Integrate ChromaDB or SQLite-VSS for vector storage
- [ ] Implement semantic search with
mnemos ask --semantic - [ ] Add context injection for relevant notes
Fine-tuning Export
- [ ] Create
mnemos exportcommand with format options - [ ] Generate JSONL from note relationships
- [ ] Create training pairs from facts->questions
- [ ] Export conversation format from handwriting->processed notes
- [ ] Add validation for training data quality
API Integration
- [ ] Add OpenAI fine-tuning job management
- [ ] Support Anthropic Claude fine-tuning (when available)
- [ ] Create cost estimation before training
- [ ] Add model versioning and rollback
Local Model Support
- [ ] Research Ollama integration for local models
- [ ] Support LoRA fine-tuning for Llama/Mistral
- [ ] Create model serving endpoint
- [ ] Add model performance benchmarks
AI Knowledge Base Training Approaches
1. RAG (Retrieval-Augmented Generation)
- Best for: Dynamic knowledge that updates frequently
- Index all notes into vector database (Pinecone, Weaviate, ChromaDB)
- At query time, retrieve relevant notes and inject into prompt
- No actual model training required
- Tools: LangChain, LlamaIndex, Anthropicâs contextual-embeddings
2. Fine-tuning (Full Model)
- Best for: Mimicking writing style and thought patterns
- Requires significant compute (GPUs)
- Options: OpenAI fine-tuning API, Anthropic Claude fine-tuning (limited access)
- Format data as conversation pairs from your notes
- Cost: $0.008-0.016 per 1K tokens for OpenAI
3. LoRA/QLoRA (Efficient Fine-tuning)
- Best for: Local models with limited resources
- Works with open models (Llama 2, Mistral, Falcon)
- Tools: Hugging Face PEFT, Axolotl, Ludwig
- Can run on consumer GPUs (8-24GB VRAM)
4. Knowledge Distillation
- Best for: Creating specialized small models
- Train smaller model to mimic larger modelâs outputs on your data
- Results in fast, domain-specific assistant
- Tools: DistilBERT approach, teacher-student training
5. Prompt Engineering + Context Injection
- Best for: Immediate results without training
- Create system prompts with your knowledge principles
- Inject relevant notes as context
- Use Claudeâs 200K context window effectively
RAG Implementation
Mnemos includes a built-in RAG (Retrieval-Augmented Generation) system:
- Uses OpenAIâs text-embedding-ada-002 model for generating embeddings
- Stores embeddings in .rag-embeddings.json for fast loading
- Implements cosine similarity for finding relevant documents
- Commands:
mnemos rag buildto generate embeddings,mnemos rag queryto search - Supports integration with Claude API for answer generation
AI Enhancement Roadmap
Current Implementation (RAG)
- Transform knowledge base into personalized AI assistant
- 79 files, ~37K words - good for RAG, needs growth for fine-tuning
- Focus on preserving thinking patterns, project knowledge, and personal context
Future Approaches
- Fine-tuning: GPT-3.5/4 with JSONL training data or Llama2/Mistral with LoRA
- Local models: Ollama integration for privacy and offline access
- Custom models: Train specialized 1-7B parameter model for thinking style
Local LLM Setup
- Ollama integration for completely private, local LLM
- No API costs, full data privacy, works offline
- Recommended models: Mistral-7B, Llama2-7B, or specialized Code Llama
- Hardware requirements: 8GB RAM minimum, 16GB recommended
Next Steps
- [ ] Test RAG system with OpenAI embeddings (
mnemos rag build) - [ ] Install Ollama and test local model (
ollama pull mistral) - [ ] Fine-tune GPT-3.5 with prepared data (costs ~$8)
- [ ] Integrate RAG into Telegram bot for enhanced responses
- [ ] Create embedding update workflow for new notes
Integration Features
- [ ] Notion integration - Bi-directional sync with Notion databases for broader knowledge capture
Telegram Bot
- Bot requires two environment variables:
MNEMOS_TG_TOKENandANTHROPIC_API_KEY - User ID defaults to 173713687 (moul42) when
MNEMOS_TG_USER_IDnot set - Bot runs with:
mnemos tg-bot - Auto-syncs with git every 30 minutes
- Daily summary sent at 21:00 local time
- All messages from unauthorized users are ignored for security