Architecture, Model Specs, Sizing & MCP Reference
Reference documentation for TopicDraw's System-1/System-2 pipeline, self-hosted hardware sizing, BYOK configuration, embedding dimensions, and benchmark methodology.
1. System-1 & System-2 Pipeline Architecture
TopicDraw separates high-volume reflexive classification from deep cross-source synthesis:
- System-1 (Fast Triage): Evaluates discussion replies in 10-comment JSON batches (`useful`, `contradictive`, `not_useful`, `spam`) and assigns smart content-type tags without blocking interactive queries.
- System-2 (Deep Synthesis & GraphRAG): Extracts structured TL;DRs, pros/cons/risks/unknowns, canonical entities, living Encyclopedia pages, cited Q&A, and Socratic Study Coach guidance.
- Embedding Coherence: Instance embeddings use a fixed vector width (
EMBEDDING_DIMENSIONS: `768` for `nomic-embed-text`, `1024` for `mxbai-embed-large`, or `1536` for `text-embedding-3-small`) so BYOK chat model changes never invalidate stored `pgvector` indexes.
2. Recommended Models & Specifications
| Pipeline Role | Minimum Spec | Local (Ollama) | Cloud BYOK |
|---|---|---|---|
| System-2 · Synthesis & GraphRAGOPENAI_CHAT_MODEL / Settings BYOK | 7B+ instruct · >= 8k ctx · JSON object mode | qwen2.5:7b-instruct (~4.7 GB Q4_K_M) or llama3.1:8b | gpt-4o-mini, claude-3.5-sonnet, gemini-2.5-flash |
| System-1 · Fast Thread TriageOPENAI_FAST_MODEL & OPENAI_COMMENT_MODEL | 1B–3B instruct · >= 4k ctx · low-latency JSON | llama3.2:1b (1.3 GB) + qwen2.5:3b-instruct (1.9 GB) | gpt-4o-mini, gemini-2.0-flash-lite, llama-3.1-8b-instant |
| Screenshots · Hybrid OCR + Visiontesseract-ocr 5 + OPENAI_VISION_MODEL | Native Tesseract 5 LSTM + OpenAI image_url VLM | tesseract-ocr + qwen2.5vl:3b / minicpm-v | gpt-4o-mini / gpt-4o, claude-3.5-sonnet, gemini-2.5-flash |
| Embeddings · Semantic GraphRAGOPENAI_EMBEDDING_MODEL + EMBEDDING_DIMENSIONS | Dense vector matching EMBEDDING_DIMENSIONS (768 / 1024 / 1536) | nomic-embed-text (768-dim, 274 MB) or mxbai-embed-large (1024-dim) | text-embedding-3-small (1536-dim) |
| Audio · Multilingual ASRAUDIO_TRANSCRIBE_URL / OPENAI_AUDIO_MODEL | Whisper small+ or OpenAI /v1/audio/transcriptions | faster-whisper (small, ~500 MB, 99-language auto-detect) | whisper-1 or whisper-large-v3-turbo |
3. Self-Hosted Hardware Sizing Profiles
Cloud BYOK Profile
2 vCPU · 4 GB RAM · 20 GB SSD
Runs Next.js, PostgreSQL + pgvector, and Tesseract 5 OCR locally while routing LLM calls to external BYOK APIs.
Local CPU Stack
8 vCPU (AVX2) · 16–24 GB RAM · 40 GB SSD
Keeps Q4_K_M `qwen2.5:7b`, `qwen2.5:3b`, `llama3.2:1b`, and `nomic-embed-text` resident in Ollama alongside Faster-Whisper (~6–15 tok/s).
Local GPU / Apple Silicon
8–16 GB+ VRAM or 16–32 GB Unified
Enables `qwen2.5:14b` and `qwen2.5vl:7b` at ~40–90+ tok/s with sub-second prompt prefill.
4. Reference Latency Benchmarks & Test Methodology
Methodology & Disclaimer: Figures below are indicative engineering ranges — not guaranteed SLAs. Measured under single-user concurrency (`8,192` context window) across: (1) Cloud BYOK: `gpt-4o-mini` / `gemini-2.5-flash` over HTTPS; (2) Local GPU: single 16 GB VRAM consumer GPU running Q4_K_M Ollama models; (3) Local CPU: 8-vCPU x86_64 AVX2 VM with 24 GB RAM. Actual throughput varies with upstream webpage latency, OCR image density, queue depth, and provider rate limits.
| Workload & Test Input | Cloud BYOK | Local GPU (16 GB) | Local CPU (8 vCPU) |
|---|---|---|---|
| Web Article / Note Ingestion (~2,500 words, 1 credit) | 2 – 5 s | 4 – 9 s | 20 – 45 s |
| PDF / DOCX Upload (20 pages text PDF, 1 credit) | 3 – 7 s | 5 – 12 s | 25 – 55 s |
| Screenshot Upload (1080p PNG, Tesseract OCR + VLM, 2 credits) | 4 – 8 s | 5 – 12 s | 25 – 60 s |
| Comment Thread Triage (100 → 1,000 replies in 10-reply batches, 2 credits) | 4 s → 25 s | 8 s → 65 s | 1.8 m → 15 m |
| Insights Cited Q&A (8-chunk + 4-node context, 8k window, 1 credit) | 1.5 – 4 s | 2 – 6 s | 10 – 25 s |
| Obsidian .zip / JSON Export (200 items, zero LLM calls) | < 200 ms | < 200 ms | < 200 ms |
5. MCP Server Protocol Reference (/api/mcp)
TopicDraw implements JSON-RPC 2.0 Streamable HTTP at POST /api/mcp authenticated via Authorization: Bearer tdk_…. Supported methods: initialize, notifications/initialized, ping, tools/list, and tools/call (60 req/min burst limit + monthly plan allowance). See TopicDraw for AI Developers for client setup.