Connecting MCP to Verified Knowledge Bases (Sanity Context vs. Naive RAG)
Why Naive Vector Chunking Breaks Technical Documentation
Splitting a tutorial into arbitrary 500-token chunks separates TypeScript interfaces from the prose explaining them. Structured Content Lake queries preserve relationships.
export const AGENT_COURSE_QUERY = `*[_type == "course" && coalesce(archived, false) != true]{
title,
"slug": slug.current,
excerpt,
"lessons": sections[].lesson[]->{ title, "slug": slug.current, excerpt }
}`;Production Architecture Takeaway
Query structured documents by schema and reference graph first, then use embeddings strictly for semantic ranking.
how this course connects together.
Follow AJ from first principles to production-ready architecture.
