-
Notifications
You must be signed in to change notification settings - Fork 221
docs: add experiment CI/CD integration guide #2888
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
Merged
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
dff8d39
docs: add experiment CI/CD integration guide
wochinge a2ecfaa
docs: clarify experiment action SDK versions
wochinge e29c238
docs: address experiment CI review feedback
wochinge 9812eca
docs: handle missing CI run evaluator scores
wochinge 70ab372
docs: refine experiment CI guide wording
wochinge ee19772
docs: update experiment action contract details
wochinge f29c4f2
docs: improve experiment CI action examples
wochinge e6403f1
docs: add experiment CI changelog
wochinge e75c4dd
Merge remote-tracking branch 'origin/main' into tobias/lfe-9366-docum…
wochinge 47d9052
docs: refine experiment CI changelog
wochinge c659b7d
Merge branch 'main' into tobias/lfe-9366-documentation
wochinge 1dff964
docs: remove duplicate changelog author
wochinge f46f939
docs: move experiment ci guide
wochinge e7e03c7
docs: fix ci testing section title
wochinge 39ec823
docs: link experiment action in ci callout
wochinge cb5b231
Revert "docs: link experiment action in ci callout"
wochinge e0e6d3d
fix: hide experiments-ci-cd from guides sidebar
Lotte-Verheyden 2ed92d1
docs: clarify ci experiment definition
wochinge 3fda119
docs: reorder ci guide secrets section
wochinge dace913
Merge branch 'main' into tobias/lfe-9366-documentation
wochinge 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
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,55 @@ | ||
| --- | ||
| date: 2026-05-05 | ||
| title: "Experiments CI/CD integration" | ||
| description: Run langfuse experiments in GitHub Actions to catch quality regressions before releasing changes to production. | ||
| author: Tobias Wochinger | ||
| ogImage: /images/changelog/2026-05-05-experiment-ci-cd.png | ||
| canonical: /docs/evaluation/experiments/experiments-in-ci-cd | ||
| --- | ||
|
|
||
| import { ChangelogHeader } from "@/components/changelog/ChangelogHeader"; | ||
|
|
||
| <ChangelogHeader /> | ||
|
|
||
| You can now run langfuse experiments in GitHub Actions and catch quality regressions before they ship. The new [langfuse/experiment-action](https://github.com/langfuse/experiment-action) tests your application against a langfuse dataset, reports the result directly on the pull request, and tracks the experiment run in langfuse. | ||
|
Check warning on line 14 in content/changelog/2026-05-05-experiment-ci-cd-gates.mdx
|
||
|
|
||
| Use it to block a PR when an agent's accuracy drops below a threshold, run a release gate against a versioned dataset, or make experiment results part of your existing CI checks. | ||
|
|
||
| ## GitHub Actions [#github-actions] | ||
|
|
||
| Add the action to your workflow, point it at an experiment script, and choose the dataset that should be used for the gate. The pull request shows whether the experiment passed, regressed, or failed to run. | ||
|
|
||
| ```yaml | ||
| - uses: langfuse/experiment-action@v1.0.0 | ||
| with: | ||
| langfuse_public_key: ${{ secrets.LANGFUSE_PUBLIC_KEY }} | ||
| langfuse_secret_key: ${{ secrets.LANGFUSE_SECRET_KEY }} | ||
| langfuse_base_url: https://cloud.langfuse.com | ||
| experiment_path: experiments/support-agent-gate | ||
| dataset_name: support-agent-regression-set | ||
| dataset_version: "2026-04-27T00:00:00Z" | ||
| github_token: ${{ github.token }} | ||
| ``` | ||
|
|
||
| When an experiment score misses your threshold, the workflow fails so reviewers can see the regression before merging. | ||
|
|
||
| ## Get started [#get-started] | ||
|
|
||
| Follow the CI/CD integration guide to add the workflow, write your experiment script, and configure the thresholds to protect your production use case. | ||
|
|
||
| import { FileCode } from "lucide-react"; | ||
|
|
||
| <Cards num={2}> | ||
| <Card | ||
| title="CI/CD Integration" | ||
| href="/docs/evaluation/experiments/experiments-in-ci-cd" | ||
| icon={<FileCode />} | ||
| arrow | ||
| /> | ||
| <Card | ||
| title="langfuse/experiment-action" | ||
| href="https://github.com/langfuse/experiment-action" | ||
| icon={<FileCode />} | ||
| arrow | ||
| /> | ||
| </Cards> | ||
Oops, something went wrong.
Oops, something went wrong.
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.