Ask My Docs
Query your local Markdown files in natural language.
Overview
You collect articles, notes, and documentation but still need to searching. It means you need to remember exact keywords, and they never quite talk to each other. Ask My Docs reads a folder of plain Markdown or text files and lets you ask questions in natural language.
It runs entirely on your machine with a bring-your-own-key setup: plug in your own Google AI key, and only the text you actually query is ever sent to the model. It’s designed to pair with Articon — save articles from the web as Markdown, then point this CLI at them.
Features
-
Reads your folder: Drop in any .md or .txt files. No import step, no database to set up.
-
Four chunking modes: From naive word splits to a paragraph-aware “smart” mode that snaps chunks to clean boundaries.
-
Semantic search: Embeddings + cosine similarity surface the right passages, not just keyword matches.
-
Two-step retrieval: The model first distills your question into a search query, then answers from what it finds.
-
Bring your own key: Uses your Google AI key via env var. Your documents, your account, your control.
-
Tunable: Chunk size, overlap, mode, and model are all flags — tune retrieval to your corpus.
Under the Hood
Built in Go with a clean, layered architecture — client → repository → usecase — so the retrieval logic stays independent of the AI provider and storage. Embeddings live in an in-memory store for fast, dependency-free querying.
-
Load every text document from the target folder.
-
Chunk each document using the selected chunking strategy.
-
Embed each chunk into a vector via the embedding model.
-
Step A: distill the user’s question into a focused search query.
-
Step B: embed the query and rank chunks by cosine similarity.
-
Step C: answer the question using the top-ranked chunks as context.
Tech: Go, Google AI (Gemini), Embeddings, Cosine similarity, Clean architecture, In-memory store, Logrus
Resources
-
Source: GitHub Repository
-
See Articon: Articon Project