Lab 2026
RAG support agent
A docs support agent that checks every reply before sending it.
Built on TalkJS's public SDK docs: it searches, reads whole pages, cites them, and has every draft checked for unsupported claims, unread links and promises it can't keep before sending. Anything it can't answer goes to a human with a written handoff note.
What's hard about it
- Ingestion crawls the docs sitemap, prefers each page's Markdown version, splits on headings into ~700-token chunks and prefixes each with a one-line page summary; ETags and content hashes skip unchanged pages.
- Hybrid retrieval: SQLite FTS5 BM25 and sqlite-vec vectors fused with reciprocal rank fusion and grouped by page, then the agent reads the whole page or one section.
- Before anything is sent, code checks every link was read in this run and a fast model checks each sentence against those pages; failures come back as rewrite instructions, and three failed rewrites escalate to a human.
- Multiple chats with search and live SSE streaming that survives a closed tab; cited pages show as source chips, and every reply has an activity trail and a step-by-step trace inspector.
- A golden-set harness grades behaviour (answer, clarify, escalate, refuse), links and facts; a background classifier spots docs gaps and drafts answers for a human to approve.