> ## Documentation Index
> Fetch the complete documentation index at: https://learn.mintlify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test whether agents can use your content

> Create a small set of questions you can rerun to catch answers that are wrong, incomplete, or unsupported before your users do.

export const Quiz = ({question, answers, correctFeedback, incorrectFeedback}) => {
  const [selected, setSelected] = React.useState(null);
  const [checked, setChecked] = React.useState(false);
  const quizId = React.useId();
  const isCorrect = checked && answers[selected]?.correct;
  const reset = () => {
    setSelected(null);
    setChecked(false);
  };
  return <div className={"quiz-container" + (checked ? " quiz-checked" : "")}>
      <Badge color="green">Quiz</Badge>
      <p className="quiz-question" id={quizId + "-question"}>{question}</p>
      <div className="quiz-options" role="radiogroup" aria-labelledby={quizId + "-question"} aria-disabled={checked}>
        {answers.map((answer, i) => <label key={i} className={["quiz-option", !checked && selected === i ? "quiz-option-selected" : "", checked && answer.correct ? "quiz-option-correct" : "", checked && selected === i && !answer.correct ? "quiz-option-incorrect" : ""].filter(Boolean).join(" ")}>
            <input type="radio" name={"quiz-" + quizId} checked={selected === i} onChange={() => !checked && setSelected(i)} disabled={checked} />
            <span className="quiz-radio" />
            <span className="quiz-option-label">{answer.text}</span>
          </label>)}
      </div>
      {checked && <div className={"quiz-feedback " + (isCorrect ? "quiz-feedback-correct" : "quiz-feedback-incorrect")} role="status" aria-live="polite" aria-atomic="true">
          <span className="quiz-feedback-icon">{isCorrect ? "✓" : "✗"}</span>
          {isCorrect ? correctFeedback : incorrectFeedback}
        </div>}
      <div className="quiz-actions">
        {!checked ? <button className="quiz-btn quiz-btn-check" type="button" onClick={() => selected !== null && setChecked(true)} disabled={selected === null}>
            Check answer
          </button> : <button className="quiz-btn quiz-btn-reset" type="button" onClick={reset}>
            Try again
          </button>}
      </div>
    </div>;
};

You should routinely test how well agents can answer questions about your product. Asking a few questions is a useful spot check to see if your content is working as expected.

Save a small set of questions and ask them when you make significant changes to your content.

## Start with real user questions

Pull questions from support tickets, search queries, assistant conversations, onboarding calls, and common product tasks. Keep the original wording when you can. Users rarely describe a problem with the exact terms you use to describe your product, so it's helpful to test their phrasing.

Include several kinds of questions. Some types of questions and examples include:

* **Direct lookup**: “What is the maximum request size?”
* **Task-based**: “How do I rotate an API key without downtime?”
* **Troubleshooting**: “Why does my webhook return 401?”
* **Cross-page**: “Which authentication method should I use for a browser app?”
* **Unsupported**: “Can I deploy this product on a game console?”
* **Ambiguous**: “How do I change the limit?”

It might seem unintuitive to test questions that aren't answered in your documentation. But you want to know whether an agent asks for context or states that your documentation doesn't have an answer. A confident guess is a bad answer.

## Define what a good answer contains

For each question, write down:

* The facts the answer must include
* The page or pages that support those facts
* Any important warning or prerequisite
* What the answer must not claim
* Whether the agent should answer, ask a follow-up question, or say the docs don't cover it

Don't require the agent to answer the question exactly. You aren't writing a script for it to recite. Focus on the substance of the answer. Would it help your users succeed with the task they're trying to accomplish?

```yaml Example evaluation case theme={null}
question: How do I rotate an API key without downtime?
expected:
  - Create a second key before revoking the first
  - Update the application to use the second key
  - Verify requests succeed before revoking the old key
sources:
  - /security/rotate-api-keys
must_not:
  - Tell the user to revoke the active key first
```

## Look beyond correct or incorrect

An answer can get the main fact right and still leave someone stuck. Check for:

* **Correctness**: Are the claims accurate?
* **Completeness**: Does it include the steps, prerequisites, and risks needed to act?
* **Grounding**: Do the cited pages support the claims?
* **Restraint**: Does the agent avoid inventing an answer when the content is missing?
* **Usefulness**: Can the reader take the next step without guessing?

Phrasing isn't part of this test unless the prose makes the answer hard to understand.

## Run the same questions before and after changes

Before a major content or configuration change, save the current answers as a baseline. Run the same questions afterward and compare them.

If an answer gets worse, trace the problem back to its source:

1. Did the agent find the right page?
2. Did the page contain the answer in a focused section?
3. Did titles, descriptions, or terminology make the page hard to match?
4. Did outdated or duplicate content compete with the canonical source?

Fix the content or configuration that caused the failure. Don't contort one sentence to make a single test pass. Your pages still need to work for questions you haven't anticipated.

## Keep the question set manageable

Start with 5-10 questions that cover the tasks your users care about most. Add questions if a you discover a new gap in your content and want to test for it. Remove questions that no longer reflect your product.

Run the set after major releases, navigation or terminology changes, and updates to `llms.txt` or agent instructions. Keep reviewing a sample of live questions too. A fixed set helps you catch regressions, but it won't tell you about every new need.

<Quiz
  question="An agent answers all but one question correctly. It invents an answer to one question that your documentation doesn't cover. How should you treat that result?"
  answers={[
{ text: "Pass. The overall accuracy is high.", correct: false },
{ text: "Fail that case because the agent should acknowledge it can't answer the question.", correct: true },
{ text: "Remove the unsupported question from the set.", correct: false },
{ text: "Add the invented claim to the docs so the answer becomes correct.", correct: false },
]}
  correctFeedback="Right. A reliable agent needs to recognize when the available content doesn't support an answer. A majority of good answers doesn't make up for the invented answer."
  incorrectFeedback="Keep unsupported questions in the set. They show whether the agent can recognize the limits of your content instead of filling a gap with a confident guess."
/>

Next up: [Protect private and sensitive information](/courses/agent-friendly-content/security-and-access) — Make sure agents only access the content they should.
