CoursesRetrieval methods for AI agents

Retrieval methods for AI agents

Bree Hall
Bree HallSenior Developer Content Lead
Last updated 20 days ago
7
Lessons

Stop your agent from improvising answers about your business. Compare the four retrieval strategies in Sanity Context, sort each question into a live query or a settled fact, and scope what the agent is allowed to reach. All before you write a line of agent code.

1. Where your agent gets its facts

1
Task

Find out where your agent gets its facts about your business, and which of Sanity Context's retrieval methods should answer each question your users ask.

2. What it costs to answer a question

1
Task

Follow two questions through your agent, one that resolves in three steps and one that doesn't, and find out what makes a question expensive to answer.

3. The four ways an agent finds something

Compare the four ways an agent can search your content with Sanity Context, and find out why keyword matching fails when a customer's words don't match yours.

4. Sorting questions by what they cost

Run three tests over a question your agent gets asked, and decide whether your content should answer it live or whether someone should settle the answer first.

5. Queries, knowledge bases, and what each one does best

1
Task

Find out which questions only a query can answer, which need a knowledge base, and which your agent should hand to another system entirely.

6. Who owns the answer

Scope what your agent can reach with Sanity Context, and recognize the answers that shouldn't come from your content at all.

7. Before you build the agent

1
Task

Plan where each of your agent's answers should come from before you build it, so the agent isn't choosing its own sources while a customer waits.