You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explore using sqlite-vec to enable RAG (Retrieval-Augmented Generation) for documentation Q&A. This builds on top of Issue #185 (SQLite Index) and the lessons from ADR-009 (abandoned iterative LLM ask approach).
Background
In #186 / ADR-009 we learned that iterating over all documentation files with an LLM is too slow for a built-in ask command. RAG offers a better approach: pre-compute vector embeddings for documentation sections, then retrieve only the most relevant chunks for a given question.
Concept
sqlite-vec (pip install sqlite-vec) is a lightweight SQLite extension for vector similarity search (~30MB memory, no external server)
Which embedding model? Options: Anthropic Embeddings API (hosted), local models like sentence-transformers (offline, ~100MB). Trade-off: cost vs. offline capability
Chunking strategy: Use existing sections as chunks, or split further? Sections vary widely in size
sqlite-vec maturity: Currently v0.1.6 (pre-1.0). Evaluate stability for production use
Embedding dimensions: What dimension works best for documentation search? (768, 1024, 1536?)
Incremental updates: How to efficiently re-embed only changed sections when docs are updated?
Should this be a separate dacli rag command, an MCP tool, or integrated into search?
Summary
Explore using sqlite-vec to enable RAG (Retrieval-Augmented Generation) for documentation Q&A. This builds on top of Issue #185 (SQLite Index) and the lessons from ADR-009 (abandoned iterative LLM ask approach).
Background
In #186 / ADR-009 we learned that iterating over all documentation files with an LLM is too slow for a built-in
askcommand. RAG offers a better approach: pre-compute vector embeddings for documentation sections, then retrieve only the most relevant chunks for a given question.Concept
pip install sqlite-vec) is a lightweight SQLite extension for vector similarity search (~30MB memory, no external server)Proposed architecture (rough sketch)
Open research questions
sentence-transformers(offline, ~100MB). Trade-off: cost vs. offline capabilitydacli ragcommand, an MCP tool, or integrated intosearch?References
Related issues