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

# Datasets

> Pass inline cases or a dashboard Table as the evaluate(...) dataset.

Case fields:

* `input` — required; passed to the `runner`
* `expected` — optional; expected **output** (Contains, Compare, and similar)
* `expected_trace` / `expectedTrace` — optional; only for [Trajectory](/sdks/evals/scorers/overview#trajectory) scorer. This is Trajectory config that describes the accepted tool scenarios.

## Inline cases

<CodeGroup>
  ```python Python theme={null}
  dataset = [
      {"input": "What is 2+2?", "expected": "4"},
      {
          "input": "What is the weather in Tokyo?",
          "expected": "72",
          "expected_trace": {
              "accepted_scenarios": [
                  {"required_tools": ["get_weather"]}
              ]
          },
      },
  ]
  ```

  ```javascript JavaScript theme={null}
  const dataset = [
    { input: "What is 2+2?", expected: "4" },
    {
      input: "What is the weather in Tokyo?",
      expected: "72",
      expectedTrace: {
        accepted_scenarios: [{ required_tools: ["get_weather"] }],
      },
    },
  ];
  ```
</CodeGroup>

| Field                              | Becomes          | Meaning                                                 |
| ---------------------------------- | ---------------- | ------------------------------------------------------- |
| `input`                            | `Input`          | Passed to the `runner`                                  |
| `expected`                         | `Expected`       | Optional expected output                                |
| `expected_trace` / `expectedTrace` | `Expected Trace` | Optional Trajectory config; only needed with Trajectory |

## Use a dashboard Table

Pass a Table id. The SDK reads `Input` / `Expected` / `Expected Trace` from that sheet and writes results to a **new** experiment sheet.

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI
  from promptlayer import evaluate, contains_scorer

  client = OpenAI()

  def run_llm(user_message: str) -> str:
      completion = client.chat.completions.create(
          model="gpt-5.6",
          messages=[
              {"role": "system", "content": "Answer in one short sentence."},
              {"role": "user", "content": str(user_message)},
          ],
      )
      return completion.choices[0].message.content or ""

  evaluate(
      "from-dashboard",
      dataset={"table_id": "00000000-0000-0000-0000-000000000000"},
      runner=run_llm,
      scorers=[contains_scorer(source="Output", value="reset")],
  )
  ```

  ```javascript JavaScript theme={null}
  import OpenAI from "openai";
  import { evaluate, containsScorer } from "promptlayer";

  const client = new OpenAI();

  async function runLlm(userMessage) {
    const completion = await client.chat.completions.create({
      model: "gpt-5.6",
      messages: [
        { role: "system", content: "Answer in one short sentence." },
        { role: "user", content: String(userMessage) },
      ],
    });
    return completion.choices[0].message.content ?? "";
  }

  await evaluate("from-dashboard", {
    dataset: { tableId: "00000000-0000-0000-0000-000000000000" },
    runner: runLlm,
    scorers: [containsScorer({ source: "Output", value: "reset" })],
  });
  ```
</CodeGroup>

Optional `sheet_id` / `sheetId` picks a non-default source sheet. Omit it to use the Table's default sheet.

## Common mistakes

* Empty dataset or a case without `input`
* Passing a Table title instead of `table_id` / `tableId`
* Setting top-level `sheet_id` on `evaluate(...)` — that targets the experiment sheet and is rejected
