Compass Docs
WorkflowsComponents

Dataset

The Dataset component — search a dataset, or add and remove its documents, as a workflow step or an agent tool.

The Dataset component works with one of your project's datasets: search it, list what's in it, add or remove documents, or sync one of its sources. Use it as a step in a workflow, or attach it to an agent as a tool so the agent searches when it needs to.

Settings

  • Dataset — the dataset to work with, from the current project. Required.
  • Chunking — Chunk size, Overlap, and Split on headings, used when the index action adds a document.

Everything is embedded with the dataset's own model, so there's no model to pick.

Actions

Choose the node's Action:

ActionKindInputsOutput
searchReadquery — what to look for, in plain language; top_k — how many passages (1–50, default 5); filter — optional metadata to match exactlyhits — each with text, heading, document_id, document_name, source, score (higher is closer), and metadata
list_documentsRead—documents, newest first, each with its name, source, chunk count, and when it was indexed
indexWritetext — the document's text (Markdown headings guide chunking); document_id — letters, digits, . _ : -, up to 200 characters; optional document_name, source, and metadatathe document_id and how many chunks were stored
delete_documentWritedocument_idwhether the dataset held it
syncWritesource_idcounts of new, changed, unchanged, in-progress, missing, removed, and restored files, and the runs it started

index with a document_id the dataset already holds replaces that document's chunks, so re-indexing is safe. metadata is stored on every chunk and can be matched with search's filter — for example, index each document with its department and search only one department's.

As an agent tool

Attached to an agent's Tools handle, each enabled action becomes a tool the agent can call. search and list_documents are enabled when you attach it; the write actions stay off until you turn them on, and any of them can require approval.

Next

On this page