> ## Documentation Index
> Fetch the complete documentation index at: https://v2galileo-feat-update-docs-main-30571363885.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a dataset

> Reference for the three dataset sources: Upload, Fetch from URL, and Import from Galileo.

The **Add dataset** modal is reused everywhere you can pick a dataset source — the Datasets page, [Step 2 of the run creation flow](/luna-studio/ui/runs/new-run/step-2-test-set), and [Step 3](/luna-studio/ui/runs/new-run/step-3-training-set). The title and copy adapt to whether you're adding a test set or a training set, but the three sources are the same.

## The three sources

Pick one card. Only one source can be active at a time.

<CardGroup cols={3}>
  <Card title="Upload from local" icon="upload">
    Drag-and-drop a `.csv` or `.jsonl` file from your machine. Use CSV for datasets you plan to use in a run.
  </Card>

  <Card title="Fetch from URL" icon="link">
    Paste a publicly reachable or pre-signed `http://` or `https://` URL.
  </Card>

  <Card title="Import from Galileo" icon="cloud-arrow-down">
    Browse datasets in your connected Galileo workspace.
  </Card>
</CardGroup>

A hint at the bottom of the modal may list expected columns. The authoritative column contract comes from the metric used when Luna Studio validates the dataset for a run.

## Upload from local

<Frame caption="Upload from local — file dropped in, ready to validate and import">
  <img src="https://mintcdn.com/v2galileo-feat-update-docs-main-30571363885/KGGsajv3MTz59ci5/images/luna-studio/datasets/add-dataset-uploaded.png?fit=max&auto=format&n=KGGsajv3MTz59ci5&q=85&s=e2de7031e70cf7e0750e8c35d9d9e1b9" alt="Add dataset, uploaded" width="1024" height="659" data-path="images/luna-studio/datasets/add-dataset-uploaded.png" />
</Frame>

<Steps>
  <Step title="Pick the Upload from local card">
    A drop zone replaces the source picker.
  </Step>

  <Step title="Drag the file in or click the drop zone">Accepted file types: `.csv` and `.jsonl`. Other types are rejected.</Step>

  <Step title="Click Add">
    Luna uploads the file and creates the dataset. From the global Datasets page, the modal then closes. In the run wizard, Luna also validates the dataset against the selected metric before attaching it to the run.
  </Step>
</Steps>

### Format reference

Use CSV for a dataset that will be selected for a run. Although the source picker accepts `.jsonl` during ingestion, the current run-validation and data-generation paths read the stored file as CSV. JSONL is therefore not supported end to end yet.

For CSV, the first row is treated as headers. The required feature columns depend on the metric shape; labelled datasets also need a `label` column. See [Prerequisites](/luna-studio/ui/prerequisites#required-dataset-format) for the shape-specific contracts.

For example, a Boolean, single-input dataset uses integer `0` and `1` labels:

```csv theme={null}
input,label
"What's the warranty on this?",0
"You're an idiot.",1
"How do I reset my password?",0
```

## Fetch from URL

<Steps>
  <Step title="Pick the Fetch from URL card">
    A URL input replaces the source picker.
  </Step>

  <Step title="Paste a URL">Only `http://` and `https://` URLs are accepted. The URL must resolve to a public host and return the dataset file directly. Use a CSV source for datasets intended for a run.</Step>

  <Step title="Click Add">
    Luna fetches the file and creates the dataset. Redirects are checked before Luna follows them, and private or internal network targets are blocked. From the global Datasets page, the modal then closes. In the run wizard, Luna also validates the fetched dataset against the selected metric before attaching it to the run.
  </Step>
</Steps>

### Authentication for cloud URLs

Raw object-store URIs such as `s3://` and `gs://` are not supported by URL import. For a private S3 or GCS object, create a time-limited pre-signed HTTPS URL and paste that URL instead. Luna Studio does not attach provider credentials or custom request headers to a URL fetch.

If Luna cannot fetch or safely resolve the URL, the import returns an error. Check that the link is still valid, returns HTTP 200, and is reachable from the Luna Studio service.

## Import from Galileo

<Frame caption="Import from Galileo — browse datasets in your connected Galileo workspace">
  <img src="https://mintcdn.com/v2galileo-feat-update-docs-main-30571363885/KGGsajv3MTz59ci5/images/luna-studio/datasets/add-dataset-galileo.png?fit=max&auto=format&n=KGGsajv3MTz59ci5&q=85&s=9d8afbca5c7f51d421006f0253b80b20" alt="Add dataset, Galileo import" width="1024" height="659" data-path="images/luna-studio/datasets/add-dataset-galileo.png" />
</Frame>

<Note>
  **Galileo connection required.** In the current release, importing from Galileo reads the Galileo API URL and key from the Luna Studio deployment. Personal and workspace Galileo integrations saved in the app do not override those runtime settings. See [Galileo
  integration](/luna-studio/ui/integrations/galileo) for setup details.
</Note>

<Steps>
  <Step title="Pick the Import from Galileo card">
    The Galileo import panel replaces the source picker.

    If Luna Studio opens an integration prompt but the import still reports that Galileo is not configured, ask your deployment operator to configure the backend Galileo API URL and key. See [Galileo integration](/luna-studio/ui/integrations/galileo).
  </Step>

  <Step title="Search for the dataset">Type into the search input. Each row in the list shows the dataset name plus a row count.</Step>

  <Step title="Click Import on a row">
    Each row has its own **Import** action — clicking it imports that dataset into Luna Studio. The modal closes immediately after import (no separate **Add** button is shown for Galileo).
  </Step>
</Steps>

### What if the integration is removed mid-flow?

If you cancel the integration modal that pops up before the import panel, the source selection is cleared and you can pick a different source.

## Validation

Adding a dataset from the global Datasets page ingests and stores it without a selected metric. That flow cannot apply the metric-specific column, label-type, and row-threshold contract.

When you add or choose a dataset in Step 2 or Step 3 of the run wizard, Luna Studio has the metric context and runs the applicable test-set, training-set, or label-only checks. A dataset that uploads successfully can still fail this run-specific validation. If that happens, the dataset remains available on the Datasets page, but Luna Studio does not attach it to the current run.

For the full validation rules, see [Validation](/luna-studio/ui/datasets/validation).

## Where to go next

<CardGroup cols={2}>
  <Card title="Test sets" icon="database" href="/luna-studio/ui/datasets/test-sets">
    Schema rules and best practices for evaluation data.
  </Card>

  <Card title="Training sets" icon="dumbbell" href="/luna-studio/ui/datasets/training-sets">
    Schema rules and best practices for fine-tuning data.
  </Card>

  <Card title="Validation" icon="circle-check" href="/luna-studio/ui/datasets/validation">
    What Luna checks and what to do when validation fails.
  </Card>

  <Card title="Galileo integration" icon="link" href="/luna-studio/ui/integrations/galileo">
    Deployment connection required for Import from Galileo.
  </Card>
</CardGroup>
