Skip to content

Commit 8dbe579

Browse files
add tracing project custom rendering docs (#1763)
## Overview Added instructions for configuring custom output rendering at the tracing project level in `custom-output-rendering.mdx`. This update includes steps for enabling custom rendering within tracing project settings and updates the precedence rules to include tracing projects. ## Type of change **Type:** Update existing documentation ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) --> - GitHub issue: - Feature PR: langchain-ai/langchainplus#14495 ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [x] I have used **root relative** paths for internal links - [x] I have updated navigation in `src/docs.json` if needed ## Additional notes The precedence for custom rendering settings is now: annotation queue > dataset > tracing project. Co-authored-by: Mason Daugherty <mason@langchain.dev>
1 parent 27ccdb1 commit 8dbe579

File tree

2 files changed

+51
-44
lines changed

2 files changed

+51
-44
lines changed

src/langsmith/custom-output-rendering.mdx

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,34 @@ sidebarTitle: Custom output rendering
55

66
Custom output rendering allows you to visualize run outputs and dataset reference outputs using your own custom HTML pages. This is particularly useful for:
77

8-
- **Domain-specific formatting**: Display medical records, legal documents, or other specialized data types in their native format.
9-
- **Custom visualizations**: Create charts, graphs, or diagrams from numeric or structured output data.
8+
- **Domain-specific formatting**: Display medical records, legal documents, or other specialized data types in their native format.
9+
- **Custom visualizations**: Create charts, graphs, or diagrams from numeric or structured output data.
1010

1111
In this page you'll learn how to:
1212

13-
- **[Configure custom rendering](#configure-custom-output-rendering)** in the LangSmith UI.
14-
- **[Build a custom renderer](#build-a-custom-renderer)** to display output data.
15-
- **[Understand where custom rendering appears](#where-custom-rendering-appears)** in LangSmith.
13+
- **[Configure custom rendering](#configure-custom-output-rendering)** in the LangSmith UI.
14+
- **[Build a custom renderer](#build-a-custom-renderer)** to display output data.
15+
- **[Understand where custom rendering appears](#where-custom-rendering-appears)** in LangSmith.
1616

1717
## Configure custom output rendering
1818

1919
Configure custom rendering at two levels:
2020

21-
- **For datasets**: Apply custom rendering to all runs associated with that dataset, wherever they appear—in experiments, run detail panes, or annotation queues.
22-
- **For annotation queues**: Apply custom rendering to all runs within a specific annotation queue, regardless of which dataset they come from. This takes precedence over dataset-level configuration.
21+
- **For datasets**: Apply custom rendering to all runs associated with that dataset, wherever they appear—in experiments, run detail panes, or annotation queues.
22+
- **For annotation queues**: Apply custom rendering to all runs within a specific annotation queue, regardless of which dataset they come from. This takes precedence over dataset-level configuration.
23+
24+
### For tracing projects
25+
26+
To configure custom output rendering for a tracing project:
27+
28+
![Tracing project settings showing custom output rendering configuration](/langsmith/images/tracing-project-custom-output-rendering-settings.png)
29+
30+
1. Navigate to the **Tracing Projects** page.
31+
2. Click on an existing tracing project or create a new one.
32+
3. In the edit tracing project pane, scroll to the **Custom Output Rendering** section.
33+
4. Toggle **Enable custom output rendering**.
34+
5. Enter the webpage URL in the **URL** field.
35+
6. Click **Save**.
2336

2437
### For datasets
2538

@@ -49,9 +62,7 @@ To configure custom output rendering for an annotation queue:
4962
5. Enter the webpage URL in the **URL** field.
5063
6. Click **Save** or **Create**.
5164

52-
<Info>
53-
When custom rendering is configured at both levels, annotation queue configuration takes precedence over dataset configuration for runs viewed within that queue.
54-
</Info>
65+
<Info>When custom rendering settings are applied at multiple levels, the precedence is as follows: annotation queue > dataset > tracing project.</Info>
5566

5667
## Build a custom renderer
5768

@@ -75,13 +86,11 @@ Your HTML page will receive output data via the [postMessage API](https://develo
7586
}
7687
```
7788

78-
- `type`: Indicates whether this is an actual output (`"output"`) or a reference output (`"reference"`).
79-
- `data`: The output data itself.
80-
- `metadata.inputs`: The input data that generated this output, provided for context.
89+
- `type`: Indicates whether this is an actual output (`"output"`) or a reference output (`"reference"`).
90+
- `data`: The output data itself.
91+
- `metadata.inputs`: The input data that generated this output, provided for context.
8192

82-
<Note>
83-
**Message delivery timing**: LangSmith uses an exponential backoff retry mechanism to ensure your page receives the data even if it loads slowly. Messages are sent up to 6 times with increasing delays (100ms, 200ms, 400ms, 800ms, 1600ms, 3200ms).
84-
</Note>
93+
<Note>**Message delivery timing**: LangSmith uses an exponential backoff retry mechanism to ensure your page receives the data even if it loads slowly. Messages are sent up to 6 times with increasing delays (100ms, 200ms, 400ms, 800ms, 1600ms, 3200ms).</Note>
8594

8695
### Example implementation
8796

@@ -90,46 +99,44 @@ This example listens for incoming postMessage events and displays them on the pa
9099
```html
91100
<!DOCTYPE html>
92101
<html>
93-
<head>
94-
<meta charset="UTF-8" />
95-
<title>PostMessage Echo</title>
96-
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" />
97-
</head>
98-
<body>
99-
<h1>PostMessage Messages</h1>
100-
<div id="messages"></div>
101-
<script>
102-
let count = 0;
103-
window.addEventListener("message", (event) => {
104-
count++;
105-
const header = document.createElement("h3");
106-
header.appendChild(document.createTextNode(`Message ${count}`));
107-
const code = document.createElement("code");
108-
code.appendChild(
109-
document.createTextNode(JSON.stringify(event.data, null, 2))
110-
);
111-
const pre = document.createElement("pre");
112-
pre.appendChild(code);
113-
document.getElementById("messages").appendChild(header);
114-
document.getElementById("messages").appendChild(pre);
115-
});
116-
</script>
117-
</body>
102+
<head>
103+
<meta charset="UTF-8" />
104+
<title>PostMessage Echo</title>
105+
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" />
106+
</head>
107+
<body>
108+
<h1>PostMessage Messages</h1>
109+
<div id="messages"></div>
110+
<script>
111+
let count = 0;
112+
window.addEventListener("message", (event) => {
113+
count++;
114+
const header = document.createElement("h3");
115+
header.appendChild(document.createTextNode(`Message ${count}`));
116+
const code = document.createElement("code");
117+
code.appendChild(document.createTextNode(JSON.stringify(event.data, null, 2)));
118+
const pre = document.createElement("pre");
119+
pre.appendChild(code);
120+
document.getElementById("messages").appendChild(header);
121+
document.getElementById("messages").appendChild(pre);
122+
});
123+
</script>
124+
</body>
118125
</html>
119126
```
120127

121128
## Where custom rendering appears
122129

123130
When enabled, your custom rendering will replace the default output view in:
124131

125-
- **Experiment comparison view**: When comparing outputs across multiple experiments:
132+
- **Experiment comparison view**: When comparing outputs across multiple experiments:
126133

127134
![Experiment comparison view showing custom rendering](/langsmith/images/custom-output-rendering-experiment-comparison.png)
128135

129-
- **Run detail panes**: When viewing runs that are associated with a dataset:
136+
- **Run detail panes**: When viewing runs that are associated with a dataset:
130137

131138
![Run detail pane showing custom rendering](/langsmith/images/custom-output-rendering-run-details.png)
132139

133-
- **Annotation queues**: When reviewing runs in annotation queues:
140+
- **Annotation queues**: When reviewing runs in annotation queues:
134141

135142
![Annotation queue showing custom rendering](/langsmith/images/custom-output-rendering-annotation-queue.png)
109 KB
Loading

0 commit comments

Comments
 (0)