-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-action.yml
More file actions
42 lines (35 loc) · 1.22 KB
/
Copy pathgithub-action.yml
File metadata and controls
42 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Example GitHub Actions workflow that blocks the merge when your RAG's
# hallucination rate crosses a threshold. Copy this into
# .github/workflows/ragproof.yml in your own repo and adjust the dataset
# path, gate threshold, and secret name to match your setup.
#
# Requires .ragproofrc.json and a pipeline module (see
# examples/pipeline.example.mjs) already committed to the repo.
# WARNING: Do not expose real secrets when this workflow can run code from
# untrusted fork pull requests. Read "Security considerations" in the README
# before adding secrets to any pull-request-triggered workflow.
name: ragproof
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
eval:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
- name: Run ragproof eval
run: npx ragproof eval --gate "hallucination<=0.05"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
# GITHUB_STEP_SUMMARY is set automatically by GitHub Actions;
# ragproof appends its metrics table there without any extra flag.