Launch priceOne payment

Retrieval Inspector

The query, every retrieved chunk in rank order with its source, score and matched words, and a mark on the chunks that were sent to the model. Filter by source, sort by score when the scores are comparable, spot duplicates, open a chunk for its full text and metadata, and copy it.

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

A score is a similarity, not a probability

Scores are shown only when supplied, never as zero when missing, and sorting by score is offered only when every chunk has one. The tooltip says what the number is not.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Retrieval Inspector for this.
Install it: npx shadcn@latest add @layro/retrieval-inspector
Import it from @/components/ui/retrieval-inspector.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
resultRetrievalResultThe query and what came back. Leave it out while `loading`.
usedIdsstring[]Chunks that were sent to the model. Marked "In context".
loadingbooleanShows placeholder rows.
errorReact.ReactNodeRetrieval failed. Shown in place of the list, with `onRetry`.
onRetry() => void—
selectedIdstring | nullControlled open chunk.
defaultSelectedIdstring | null—
onChunkSelect(chunk: RetrievalChunk | null) => void—
onOpenSource(chunk: RetrievalChunk) => voidOpen the source yourself (a drawer, a route). Without it, `sourceUrl` opens in a new tab.
onCopyChunk(chunk: RetrievalChunk, what: "text" | "id") => voidTold after a copy, with what was copied.
sortRetrievalSort—
defaultSortRetrievalSort—
onSortChange(sort: RetrievalSort) => void—
emptyStateReact.ReactNodeReplaces the default "nothing matched" state.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebadgebuttonsegmented-controlstatetabstooltip

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in RAG & Evals

All RAG & Evals components