Skip to main content

Testing a Knowledge Collection

Validate that your knowledge collection retrieves the right information before attaching it to an AI agent.

After adding knowledge sources such as articles, files, or websites, use the Test Collection feature to simulate how an AI agent will search and retrieve content. This helps you find gaps, tune retrieval parameters, and confirm the collection is ready for use.

Accessing Test Collection

Open a knowledge collection and click Test Collection in the header. The test panel appears on the right.

Test Parameters

Configure the following before running a test:

ParameterWhat It ControlsDefaultRange
Query InputThe test question, written as a user would ask it
Top K ValuesMaximum number of content chunks retrieved50–100
Scope ThresholdMinimum similarity score a chunk must meet to be returned. Higher = stricter relevance0–1

Action buttons:

  • Retrieve: Runs the query and displays matching chunks with their similarity scores.
  • Reset: Clears the query and returns parameters to defaults.

Choosing the Right Threshold

The Scope Threshold is the most impactful parameter to tune:

Threshold RangeEffectBest For
0.30.5Returns more results, lower precisionBroad exploratory queries
0.50.7Balanced relevanceGeneral-purpose agents
0.71.0High precision, fewer resultsSpecific factual queries
tip

Start with a threshold of 0.5 and adjust based on what the results show. If you're getting irrelevant chunks, increase the threshold. If you're getting no results, lower it.

Test Examples

Example 1: Article Source

Scenario: A "Holiday Calendar" article (KB-5) has been added to the collection.

  • Query: Provide the list of holidays in the month of april
  • Top K Values: 5
  • Scope Threshold: 0.4

Click Retrieve. The system returns relevant chunks from KB-5 with similarity scores.


Example 2: File Source

Scenario: A file named Patch Management for Air Gap Networks v1.1.pdf has been uploaded.

  • Query: how to setup airgapped network for patch management?
  • Top K Values: 5
  • Scope Threshold: 0.8

Click Retrieve. The system returns matching chunks from the PDF.

A higher threshold is used here because the query is specific — only highly relevant chunks should be returned.


Example 3: Website Source

Scenario: The website docs.motadata.com/serviceops-docs/ has been crawled and added.

  • Query: How to configure an asset?
  • Top K Values: 5
  • Scope Threshold: 0.6

Click Retrieve. The system returns matching chunks from the crawled website pages.


What to Do After Testing

ResultAction
Relevant chunks returned with good scoresCollection is ready, attach it to an AI agent via AI Studio.
No results returnedLower the Scope Threshold, or verify the source was indexed correctly.
Irrelevant chunks returnedIncrease the Scope Threshold, or review chunk size settings on the source.
Partial resultsAdd more sources or review content gaps in existing articles or files.