> ## Documentation Index
> Fetch the complete documentation index at: https://agent-observability-docs.splunk.com/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 Splunk Agent Observability.

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 Splunk Agent Observability" icon="cloud-arrow-down">
    Browse datasets in your connected Splunk Agent Observability workspace.
  </Card>
</CardGroup>

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

## Upload from local

<Frame caption="Upload from local selected — drag and drop a CSV or JSONL file">
  <img src="https://mintcdn.com/agent-observability-docs/gQpj8uYVjt4F9vOJ/images/luna-studio/datasets/add-dataset-uploaded.png?fit=max&auto=format&n=gQpj8uYVjt4F9vOJ&q=85&s=49af94f3338a8220fcb06987ac8ea315" alt="Upload from local source with an empty file drop zone" width="1947" height="1171" 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 evaluator 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 evaluator 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 evaluator 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 Splunk Agent Observability

<Frame caption="Import from Splunk Agent Observability — browse datasets in your connected Splunk Agent Observability workspace">
  <img src="https://mintcdn.com/agent-observability-docs/gQpj8uYVjt4F9vOJ/images/luna-studio/datasets/add-dataset-splunk-ao.png?fit=max&auto=format&n=gQpj8uYVjt4F9vOJ&q=85&s=adb5f611cd275ac07ba4b5a90b2b7d82" alt="Add dataset, Splunk Agent Observability import" width="1928" height="1177" data-path="images/luna-studio/datasets/add-dataset-splunk-ao.png" />
</Frame>

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

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

    If Luna Studio opens an integration prompt but the import still reports that Splunk Agent Observability is not configured, ask your deployment operator to configure the backend Splunk Agent Observability API URL and key. See [Splunk Agent Observability integration](/luna-studio/ui/integrations/splunk-ao).
  </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 Splunk Agent Observability).
  </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 evaluator. That flow cannot apply the evaluator-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 evaluator 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="Splunk Agent Observability integration" icon="link" href="/luna-studio/ui/integrations/splunk-ao">
    Deployment connection required for Import from Splunk Agent Observability.
  </Card>
</CardGroup>
