Iβve had this happen more times than Iβd like to admit.
I ask AI a technical question.
It gives me a beautifully written answer.
I think:
βWow. That makes sense.β
Then I check the documentation.
And suddenly:
βOh.β π
The answer wasn't completely useless.
It just didn't have enough context.
That little problem became the idea behind ContextGuide.
Instead of expecting an AI model to magically know everything, I wanted to give it something better:
a reliable place to look.
ContextGuide is an AI agent that queries a structured Knowledge Base through Sanity Context + MCP before generating an answer.
The idea is simple:
Don't just ask the AI what it knows. Give it somewhere useful to look.
π€ USER
β
β asks a question
β
βββββββββββββββββββ
β ContextGuide β
β β
β Understand the β
β question β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββ
β Sanity Context β
β β
β Find relevant β
β knowledge β
ββββββββββ¬βββββββββ
β
βββββββββββββββββββ
β KNOWLEDGE BASE β
β β
β Docs β’ Guides β
β References β
ββββββββββ¬βββββββββ
β
π Relevant Context
β
β
π€ Agent Reasoning
β
β
π¬ Answer + Sources
The important part is that the agent doesn't immediately jump from:
Question β Answer
There is a middle step:
Question β Context β Answer
And that middle step is the whole point.
Let's say I ask:
βWhich authentication method should I use here?β
A basic search might find ten pages containing the word authentication.
Great.
Except... which one actually answers my question? π
That's where structured content becomes useful.
With Sanity, information can be organized into meaningful content instead of being treated as one giant pile of text.
ContextGuide can then retrieve the relevant information through Sanity Context and access it through MCP.
So the agent isn't just matching words.
It's trying to find the right context for the question.
What happens when the knowledge base contains conflicting information?
Imagine:
π Guide A
"Use Method X."
+
π Guide B
"Method X is outdated."
β
Agent
"These sources disagree."
That's actually more interesting to me than an agent that confidently picks one answer.
Because sometimes the honest answer isn't:
βHere's the answer.β
Sometimes it's:
βHere's what the sources say and here's where they disagree.β
That is information I can actually work with.
Sanity
β
Organizes the knowledge
Sanity Context
β
Makes that knowledge queryable
MCP
β
Connects the agent to it
ContextGuide
β
Uses the retrieved context
User
β
Gets an answer backed by the relevant content
Each piece has a job.
Sanity isn't there just because the challenge says to use Sanity.
It's part of the reason the agent can work this way.
I wasn't trying to build an AI that knows everything.
Honestly, that sounds exhausting. π
I wanted to build an AI that knows when it should look something up.
Because maybe the future of useful AI isn't just:
βI know the answer.β
Maybe it's:
βLet me check the right information first.β
And that's the idea behind ContextGuide.