get_dataset_item
Retrieve a specific dataset item by ID to access input, expected output, metadata, and linked trace data for LLM application analysis and debugging.
Instructions
Get a specific dataset item by ID.
Retrieves the full dataset item including input, expected output, metadata, and linked traces.
Args:
ctx: Context object containing lifespan context with Langfuse client
item_id: The ID of the dataset item to fetch
output_mode: How to format the response data
Returns:
A dictionary containing the dataset item details:
- id: Unique item identifier
- datasetId: Parent dataset ID
- input: Input data for the item
- expectedOutput: Expected output data
- metadata: Custom metadata
- sourceTraceId: Linked trace ID (if any)
- sourceObservationId: Linked observation ID (if any)
- status: Item status (ACTIVE or ARCHIVED)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | The ID of the dataset item to fetch | |
| output_mode | No | Output format: 'compact' truncates, 'full_json_string' returns full data, 'full_json_file' writes to file | compact |