-
Notifications
You must be signed in to change notification settings - Fork 2
docs(evaluation): Test an eval #753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
khushalsonawat
merged 3 commits into
docs/evaluation-revamp
from
docs/eval-explore-playground-test
Jul 16, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+464 KB
public/images/docs/evaluation/explore-playground/test-an-eval/custom-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+578 KB
public/images/docs/evaluation/explore-playground/test-an-eval/tracing-result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
src/pages/docs/evaluation/guides/explore-playground/test-an-eval.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| title: "Test an eval" | ||
| description: "Try an eval on sample or real data and read its verdict" | ||
| --- | ||
|
|
||
| Every eval has a **Test Evaluation** panel on its page, so you can run it on a bit of data and read the result and the reason before you attach it to anything. Open an eval from the playground, and the panel sits on the right of its **Eval Details** tab. | ||
|
|
||
| ## Four ways to feed it data | ||
|
|
||
| The panel gives the eval its inputs one of four ways, each its own tab: | ||
|
|
||
| - **[Dataset](/docs/dataset):** pull a row from one of your datasets | ||
| - **[Tracing](/docs/observe):** pull a span or trace from a project's traces, so you test on real production data | ||
| - **[Simulation](/docs/simulation):** pull a call from a simulation | ||
| - **Custom:** paste your own test data as JSON, one value per variable the eval needs | ||
|
|
||
| <img src="/images/docs/evaluation/explore-playground/test-an-eval/custom-test.png" alt="The eval's Test Evaluation panel in Custom mode, with a JSON test-data editor and the input, output, and context field mapping" style={{ borderRadius: '5px' }} /> | ||
| *The Test Evaluation panel in Custom mode* | ||
|
|
||
| ## Map the eval's inputs | ||
|
|
||
| An eval declares the variables it needs, and this hallucination eval needs `input`, `output`, and `context`. In **Custom** those variables are the JSON keys, so they are already mapped and you fill in the values directly. For a real data source like a **trace**, you map each variable to a field in your data, so `context` might map to a span attribute like `input.value`, because the attribute names depend on how your app is instrumented. | ||
|
|
||
| ## Read the result | ||
|
|
||
| Click **Test Evaluation** and the panel returns the eval's **Result**, a pass or fail here, and an **Explanation** of why. That is your check that the eval behaves the way you meant before you wire it in anywhere. | ||
|
|
||
| <img src="/images/docs/evaluation/explore-playground/test-an-eval/tracing-result.png" alt="Testing the eval on a trace, showing the mapped span attributes, a Pass result, and the explanation of the verdict" style={{ borderRadius: '5px' }} /> | ||
|
YashMohan23 marked this conversation as resolved.
|
||
| *Testing on a trace: the eval returns a pass or fail and explains its reasoning* | ||
|
|
||
| ## Dive deeper | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Running evaluations" icon="play" href="/docs/evaluation/guides/running-evaluations"> | ||
| Attach an eval to your data and run it for real | ||
| </Card> | ||
| <Card title="Create a custom eval" icon="wand-magic-sparkles" href="/docs/evaluation/guides/custom-evals"> | ||
| Write your own eval to test and use | ||
| </Card> | ||
| </CardGroup> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.