Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions src/langsmith/data-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Refer to [Manage bulk export destinations](/langsmith/data-export-destinations)

## 2. Create an export job

An export job targets a specific project and date range. You will need:
An export job targets a project (or all experiments in a workspace) and a date range. You will need:

- The destination `id` from the [previous step](#1-create-a-destination).
- The project ID (`session_id`)—copy this from the individual project view in the [**Tracing Projects** list](https://smith.langchain.com).
- Either a project ID (`session_id`) or `"all_experiments": true`—copy the project ID from the individual project view in the [**Tracing Projects** list](https://smith.langchain.com).
- A `start_time` and `end_time` in UTC ISO 8601 format.

```bash
Expand All @@ -86,6 +86,29 @@ Save the `id` from the response to monitor the export's progress.

You can optionally add a `filter` expression to narrow the set of runs exported. Refer to our [filter query language](/langsmith/trace-query-syntax#filter-query-language) and [examples](/langsmith/export-traces#use-filter-query-language) for syntax. Not setting the `filter` field will export all runs.

### Export all experiments
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. would note that you can do this for scheduled/recurring as well
  2. there is a limit: 250 max experiments. to export more, query the all_experiments bulk export to see which tracing projects (i.e. experiments) have been exported, then create standard bulk exports for the remaining. alternatively, request for this limit to be increased for your workspace by reaching out to support

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no limit for self-hosted though

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will also need a note on which self-hosted version it's available from (not available yet, likely later today)


To export every experiment in the workspace instead of targeting a single project with `session_id`, set `all_experiments: true`. LangSmith creates an experiment whenever you run an evaluation against a dataset, any tracing project with `reference_dataset_id` set qualifies.

`all_experiments` and `session_id` are mutually exclusive—set exactly one.

```bash
curl --request POST \
--url 'https://api.smith.langchain.com/api/v1/bulk-exports' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'X-Tenant-Id: YOUR_WORKSPACE_ID' \
--data '{
"bulk_export_destination_id": "your_destination_id",
"all_experiments": true,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-02-01T00:00:00Z",
"format_version": "v2_beta"
}'
```

LangSmith resolves the set of experiment sessions at run time, so the export picks up any experiments you create after submitting the job but before the orchestrator starts processing.

### Schedule recurring exports

<Note>
Expand Down
Loading