GitHub Actions
Integrate benchmarks directly into your GitHub workflows. Automatic checks on pull requests.
- Pull request validation
- Matrix builds for multiple document sets
- Reusable workflows
Prevent regressions, validate prompt changes, and monitor model performance directly from GitHub Actions and GitLab CI/CD.
Add benchmarks in minutes with a single API call
Block PRs that cause accuracy degradation
Use cheaper models for PR checks, premium for releases
All benchmark runs are visible in the dashboard
PR checks, scheduled runs, manual dispatch, or release tags
Choose your CI/CD platform for seamless integration
Integrate benchmarks directly into your GitHub workflows. Automatic checks on pull requests.
Native integration with GitLab pipelines. Scheduled benchmarks and parallel job execution.
Copy these examples directly to your repository
name: LLM Benchmark
on:
pull_request:
paths:
- "prompts/**"
- "extraction-schema.json"
workflow_dispatch:
env:
API_BASE_URL: https://api.llmcompare.com
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read prompts
id: prompts
run: |
SYSTEM_PROMPT=$(cat prompts/system.txt | jq -Rs .)
USER_PROMPT=$(cat prompts/user.txt | jq -Rs .)
echo "system=$SYSTEM_PROMPT" >> $GITHUB_OUTPUT
echo "user=$USER_PROMPT" >> $GITHUB_OUTPUT
- name: Start Benchmark
id: start
run: |
RESPONSE=$(curl -s -X POST "${{ env.API_BASE_URL }}/api/v1/benchmark" \
-H "Authorization: Bearer ${{ secrets.LLMCOMPARE_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"project": {
"name": "CI-${{ github.repository }}",
"extractionSchema": $(cat extraction-schema.json)
},
"benchmark": {
"models": ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"]
},
"idempotencyKey": "${{ github.run_id }}-${{ github.run_attempt }}"
}')
JOB_ID=$(echo $RESPONSE | jq -r '.jobId')
echo "job_id=$JOB_ID" >> $GITHUB_OUTPUTAdd benchmarks to your CI/CD pipeline in a few steps
Go to dashboard → Settings → API Keys → Create New Key. Copy the API key (llmc_...).
GitHub: Settings → Secrets → Actions → New repository secret
GitLab: Settings → CI/CD → Variables → Add variable
Copy the example above to your repository. Adjust the document URLs and schema to match your use case.
Push a PR with prompt changes. The benchmark runs automatically! Check the workflow run for results.
Add LLM benchmarks to your CI/CD pipeline and prevent regressions before they reach production.