> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Datasets

> Organize documents, permissions, and processing with datasets.

## What is a dataset in Cognee?

A dataset is a named container that groups documents and their metadata. It is the main boundary for:

* Organizing content
* Running pipelines
* Applying permissions

Operations that write to a dataset — such as `remember`, `improve`, and `memify` — fall back to a dataset named `main_dataset` when you don't name one. Your first write creates it, so you can start without deciding on a dataset layout up front.

<Warning>
  **Dataset isolation** requires specific configuration. See [permissions system](../multi-user-mode/multi-user-mode-overview) for details on access control requirements and supported database setups.
</Warning>

* **[Remember](../main-operations/remember)**:
  * Direct new content into a specific dataset (by name or ID)
  * If it doesn’t exist, Cognee creates it and associates your permissions
  * Items ingested are linked to that dataset and deduplicated within it

* **[Improve](../main-operations/improve)**:
  * Runs enrichment against a chosen dataset
  * Loads the dataset’s existing graph, checks rights, and runs the improvement pipeline in dataset scope
  * Lets you deepen or bridge memory without re-ingesting the source data

* **[Recall](../main-operations/recall)**:
  * Queries can be scoped by dataset
  * Results and metrics remain separated by dataset

* **[Forget](../main-operations/forget)**:
  * Removes memory at item, dataset, or full-user scope
  * Uses dataset permissions to decide what the current user can remove

## Dataset name vs dataset id

Every dataset carries two identifiers, and they are not interchangeable:

* **`dataset_name`** — the human-readable string you choose (`"finance"`, `"main_dataset"`). Names cannot contain spaces or dots.
* **`dataset_id`** — the dataset's `UUID`, stored as its primary key.

The id is **derived from the name, not random**: it is a `uuid5` of the dataset name combined with the owner's user id and tenant id. So the same name, used by the same user, always resolves to the same dataset — but the same name used by a *different* user or tenant resolves to a *different* UUID. Datasets are shared across users by id only, never by name: to reach a dataset [shared with you](../multi-user-mode/permissions-system/datasets), pass its `dataset_id`, because passing the name would resolve to (or create) a separate dataset of your own.

On write paths, an unknown **name** creates a new dataset; an unknown **id** raises `DatasetNotFoundError`.

### Which identifier each operation accepts

| Operation                                                                                           | By name                                               | By id                                                                          |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------ |
| [`remember()`](../main-operations/remember) / [`add()`](../main-operations/legacy-operations/add)   | `dataset_name="finance"` (defaults to `main_dataset`) | `dataset_id=UUID(...)` — takes precedence over `dataset_name`                  |
| [`cognify()`](../main-operations/legacy-operations/cognify)                                         | `datasets="finance"` or `datasets=["finance"]`        | `datasets=[UUID(...)]` — same parameter, don't mix names and UUIDs in one list |
| [`recall()`](../main-operations/recall) / [`search()`](../main-operations/legacy-operations/search) | `datasets=["finance"]`                                | `dataset_ids=[UUID(...)]`                                                      |
| [`improve()`](../main-operations/improve)                                                           | `dataset="finance"`                                   | `dataset=UUID(...)` — same parameter                                           |
| [`forget()`](../main-operations/forget)                                                             | `dataset="finance"`                                   | `dataset_id=UUID(...)`                                                         |
| [`cognee.datasets.*`](/python-api/datasets)                                                         | —                                                     | `dataset_id` only; these helpers require UUIDs                                 |

To go from a name to an id, list your datasets:

```python theme={null}
datasets = await cognee.datasets.list_datasets()
dataset_id = next(ds.id for ds in datasets if ds.name == "finance")
```

## Access control

* Permissions (read, write, share, delete) are enforced at the dataset level
* Share one dataset with a team, keep another private
* Independently manage who can modify or distribute content

## Incremental processing

* Processing status is tracked per dataset
* After you remember more data, the underlying cognify step focuses on new or changed items
* Skips what’s already completed for that dataset

## Datasets vs NodeSets

**Datasets** scope storage, permissions, and pipeline execution; **[NodeSets](../further-concepts/node-sets)** are semantic tags within a dataset.

* During `remember()`, you can label items with one or more NodeSet names (e.g., "AI", "FinTech")
* The underlying graph-building step propagates those labels into the graph by creating `NodeSet` nodes and linking derived chunks and entities via `belongs_to_set` relationships
* This lets you slice a single dataset’s graph by topic or team without creating new datasets, while dataset-level permissions still control overall access

<Columns cols={2}>
  <Card title="Remember" icon="plus" href="/core-concepts/main-operations/remember">
    Direct content into a dataset
  </Card>

  <Card title="Improve" icon="brain-cog" href="/core-concepts/main-operations/improve">
    Enrich memory within a dataset
  </Card>

  <Card title="Recall" icon="search" href="/core-concepts/main-operations/recall">
    Scope queries by dataset
  </Card>

  <Card title="Forget" icon="trash" href="/core-concepts/main-operations/forget">
    Remove datasets and data
  </Card>
</Columns>
