Docs
Sign in

Retrieval Playground

The Retrieval Playground lets you ask a question and see exactly which pieces of your knowledge bases come back, and how well each one matches, before an agent ever uses them. Use it to check that your knowledge is searchable and to tune how strict a search should be.

Screenshot to add: The Retrieval playground with the knowledge base picker, query box, Top K and Min score sliders, a Run query button, and result cards.

The subtitle reads "Test what a query retrieves before an agent uses it." The page has an input panel on the left, the results on the right, and a list of your runs under This session.

The Knowledge bases list shows every knowledge base you can see. Each row shows its name and "sources · chunks" counts. The heading shows how many there are, for example Knowledge bases (12).

  • Nothing is selected to start with. The hint reads "0 selected · nothing selected means nothing is searched". You choose each knowledge base on purpose.
  • With more than 8 knowledge bases, a Filter knowledge bases box appears.
  • You can pick one or several. Results always say which knowledge base each chunk came from.
You seeIt means
Loading knowledge bases...The list is loading
"Failed to load knowledge bases" with RetryThe list could not be loaded. Click Retry
"No knowledge bases yet. Create one on the Knowledge bases page."There is nothing to search. See Knowledge Bases
"No knowledge base matches" your filter textChange the filter
A warning "Showing the first N of M knowledge bases (page limit reached)."Very large accounts are capped at 5,000 knowledge bases. A toast also says Knowledge bases truncated

Write the query

FieldWhat it doesRange and default
QueryThe question or words to search for. The placeholder suggests "How do we handle PTO in Q1?"Free text
Top KThe most chunks to bring back1 to 50, default 5
Min scoreThe lowest match score allowed. Chunks scoring below it are dropped0 to 1 in steps of 0.05, default 0.30

Press Ctrl or Cmd with Enter in the query box to run, or click Run query. The button is off until you have typed a query and chosen at least one knowledge base.

Run a query

  1. Pick knowledge bases

    Tick one or more rows under Knowledge bases.

  2. Type your query

    Write it the way a person would ask it.

  3. Adjust the sliders

    Leave Top K and Min score at their defaults, or change them.

  4. Click Run query

    While it runs, the results area shows loading rows. Then the result cards appear.

Read the results

The results heading says how many came back, for example 5 results. Under it, a summary line gives the number of knowledge bases, the score range such as 0.82 to 0.41, and how long the search took in milliseconds. Results are sorted with the best score first.

Each result is a card.

PartWhat it shows
TitleThe source title, or "Untitled source"
Detail lineThe knowledge base, the chunk number and the source type
Score barThe match score to three decimals. Higher is a closer match
TextThe chunk text, shortened to three lines
Open sourceOpens the source in its knowledge base. Shown when the source is known
CopyCopies the full chunk text. A toast confirms it, or says it could not copy

Other states

You seeIt means
No query yet"Pick knowledge bases, enter a query and run it." Nothing has run
0 results, No chunks matched"Nothing scored above the minimum score. Lower it or rephrase the query."
Retrieval failedThe search broke. The reason is shown with a retry button, plus a toast

This session

Each run is added to the This session list under the Run button, with the query, a count and how long ago, or running or failed. Click one to reopen it. Its query, sliders and knowledge base choices come back, and its results show again.

Also inside a knowledge base

Each knowledge base has a Retrieval tab. It is the same playground, locked to that one knowledge base. There is no picker, and the empty state reads "Enter a query and run it against this knowledge base."