Docs eval
Write down what readers ask and what a correct answer says, let AI answer from the docs alone, and know before you publish whether it gets it right.
The more often docs change, the easier it is to lose a sentence that matters. Docs eval guards them like a test suite: questions are kept with the docs, AI answers them from the docs alone after every change, and each point is checked. For a wrong answer you see which point is missing and whether search found the page it should have.
Write questions
Create evals.yml next to docs.yml:
pass: 80
questions:
- id: refund-time
question: How long does a refund take?
expect:
- It arrives within three business days
- It goes back to the original payment method
avoid:
- It can be paid to another account
pages: [/guides/refund]
- question: How do I get an invoice?
expect:
- Request it under Billing in the dashboardRun it
Run biti login first (or set BITI_TOKEN): the questions are answered from the docs as the platform renders them for readers. Answering and grading use your own model key.
export DEEPSEEK_API_KEY=sk-…
biti evalQuestions are answered the way Ask AI answers readers: search the docs, then answer from what was found only, with ai.system-prompt applied. Each question takes 3 model calls: search terms, the answer, and grading. They are billed to your own key; the tokens used are shown at the end.
The exit code is 1 below the pass mark, or when a question couldn't be graded.
Models don't answer the same way every time, and grading is done by a model too. Don't set the pass mark to 100%, and write points that are specific and can be checked. Custom answers and content sources from the dashboard aren't used: this tests the docs themselves.
In CI
- run: biti check docs
env:
BITI_TOKEN: ${{ secrets.BITI_TOKEN }}
- run: biti eval docs --site acme-docs --report eval.md
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
BITI_TOKEN: ${{ secrets.BITI_TOKEN }}Questions from readers
biti eval --import --site acme-docs --days 30 --limit 20Adds what readers asked most to evals.yml as drafts, skipping questions that are already there. Write the points and remove draft to include them. In the dashboard you can also select Copy as an eval question next to a question under Ask AI → Conversations, and paste it under questions.
Readers wrote these questions, and they may contain personal data. Check them before you commit the file.
History
Results uploaded with --site are under Ask AI → Docs eval in the dashboard: the score over time, each question's result, missing points, the answer, and its sources. The last 100 runs of a site are kept; you can also read them through the API.