# Knowledge Base quality and retrieval tests

Test the exact candidate and understand the validation gates before publication.

## Where to find it

Choose **Knowledge Bases** in the main navigation, open the collection, and select **Quality**.

Address: `/knowledge-bases/:id`. Open the saved resource from the product rather than typing this address.

## Add a retrieval test

1. Open **Quality** on the knowledge base.
2. Enter a representative **Question** using 2,000 characters or fewer, then check at least one document title in the **Expected documents** picker. This is a checkbox selection, not a comma-separated list of identifiers.
3. Select **Block publishing when this test fails** when it must be a publishing requirement.
4. Choose **Add retrieval test**.
5. Validate a candidate in Overview, then choose **Run tests** in Quality.

## Read the results

Compare **Expected** and **Retrieved** document coverage for each question. The test measures document retrieval; it does not grade a generated answer's correctness. A required test must pass for the exact candidate being published. An earlier candidate's result does not certify changed content or policy.

If the wrong documents are retrieved, review their content, source state, and connection restrictions, correct the draft, validate a fresh candidate, and rerun tests. A provider error leaves the candidate unchanged; check provider readiness and run again.

## Manage test limits

The page allows up to **20 enabled** and **100 saved** tests. Use **Disable** before adding or enabling another at the enabled limit. A test must be disabled before **Delete** appears. At the saved limit, delete an old disabled test to add one; run history remains available.

## Related guides

- [Content and imports](/docs/knowledge-base-content)
- [Release review and publishing](/docs/knowledge-base-releases)
