惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
G
GRAHAM CLULEY
AWS News Blog
AWS News Blog
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
Cyberwarzone
Cyberwarzone
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tor Project blog
月光博客
月光博客
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
E
Exploit-DB.com RSS Feed
V
V2EX
量子位
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
C
Cisco Blogs
G
Google Developers Blog
GbyAI
GbyAI
C
Check Point Blog
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Jina AI
Jina AI
P
Palo Alto Networks Blog
Cloudbric
Cloudbric
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cybersecurity and Infrastructure Security Agency CISA
S
Secure Thoughts
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
有赞技术团队
有赞技术团队
I
Intezer
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Schneier on Security
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
Help Net Security
Help Net Security
S
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How I set up RAG evals in CI/CD so they actually catch regressions
Kartik N V J K · 2026-06-16 · via DEV Community

I have hit this a few times.A PR lands late in the day, the RAG eval runs in under a minute, green check, merge.Twelve hours later support tickets start coming in.

The trace shows the retriever switched its top-1 chunk on a class of queries the 30-example dataset never covered. Suite Groundedness stayed at 0.91. Production Groundedness on the affected traffic was 0.62.

The gate passed because it was not checking the right thing.Most CI eval gates I have seen for RAG are smoke tests. Small dataset, mean compared against a fixed floor, pass unless something is badly broken.

The dataset is not representative, the floor is not tied to baseline variance, and the threshold does not separate a real regression from judge noise.So a green check does not tell you much.

The way I think about it now: a gate wants three things at once -cheap, fast, and statistically significant and you usually get two.
A 30-example dataset at 12 cents per PR fails on significance.A 2,000-example sweep at 9 dollars per PR fails on cost and speed.
The work is holding all three.

I split the gate into three tiers

Running the full LLM-judge sweep on every push was my first mistake.That belongs on nightly main, not an in-progress branch.

Every push:

  • Cheap classifier rubrics (NLI faithfulness, claim_support) plus deterministic floors (citation validity, schema, latency).
  • Under three minutes against 100 to 200 examples.
  • Blocks the merge.

Nightly main:

  • The full LLM-judge stack against the versioned dataset.
  • 15 to 30 minutes.
  • Blocks the next promotion to canary.

Canary:

  • The same rubrics scoring 5 to 10 percent of live traffic.
  • Alarms on rolling-mean drift.

The dataset is the gate's worldview

  • A 2,000-example set built from my own head loses to a 200-example set sampled from production.If it misses the failure modes that show up at 2 am, so does the gate.
  • Below 100 examples per route the variance drowns the signal.
  • Above 500 the per-PR judge bill grows faster than detection improves.My PR range is 100 to 200 per route, covering happy paths, edge cases, refusals, and the hardest 10 percent of past incidents.
  • The field most people skip is expected_chunks, the ground-truth doc IDs.
  • Without it you can score generation but not retrieval, and the bisect takes a day instead of an hour.

Five rubrics cover most regressions

The five rubrics that gate most RAG regressions in CI:

  • Groundedness
  • Context Relevance
  • Answer Relevance
  • Citation Validity
  • Retrieval Recall

I split them by layer so the bisect is easy:

  • ContextRelevance drops while Groundedness holds → retriever regressed.
  • Groundedness drops while ContextRelevance holds → generator regressed.

Citation validity is just a string match, so I run it on 100 percent of responses and keep the judge bill on the rubrics that need semantic scoring.

Gating on the delta, not the mean

This is the part most setups skip and the one that matters.

A green check should mean the PR did not introduce a statistically significant regression, not that the mean sat above some floor.

I use two thresholds.

An absolute floor per rubric catches the obvious break:

  • Groundedness ≥ 0.85
  • ContextRelevance ≥ 0.80
  • Citation validity ≥ 0.99

A delta gate against the trailing 7-day rolling baseline catches the slow drift, using Welch's t-test on per-example scores.

import statistics
from scipy import stats

def regression_gate(current, baseline, alpha=0.05, min_effect=0.03):
    """Fail only if the mean dropped, the change is significant, and the effect is big enough."""
    delta = statistics.mean(current) - statistics.mean(baseline)

    if delta >= 0:
        return True, f"no regression (delta=+{delta:.3f})"

    _, p = stats.ttest_ind(current, baseline, equal_var=False)

    if p >= alpha:
        return True, f"delta={delta:.3f}, p={p:.3f} (not significant)"

    if abs(delta) < min_effect:
        return True, f"delta={delta:.3f} below effect floor {min_effect}"

    return False, f"regression: delta={delta:.3f}, p={p:.3f}"

A 30-example dataset gives a confidence interval of about ±0.07 on a 1–5 mean, so a 2-point drop sits inside the noise.

Gate on that and you are wrong half the time, and after two false alarms people stop trusting the gate.

For long-tail failures that hide in averages, gate on percentiles instead.

The one rule that keeps this honest:

The baseline is a rolling production window, not a frozen number.

The GitHub Actions wiring

The workflow itself is path-scoped triggers, a cache, parallel pytest, and the cheap-rubric assertions.

This is roughly what I run on PRs.

name: RAG Evals

on:
  pull_request:
    paths:
      - "rag/**"
      - "evals/**"
      - "fi-evaluation.yaml"

concurrency:
  group: rag-evals-${{ github.head_ref }}
  cancel-in-progress: true

jobs:
  pr-gate:
    runs-on: ubuntu-latest
    timeout-minutes: 8

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 2

      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
          cache: pip

      - uses: actions/cache@v4
        with:
          path: .eval_cache
          key: evals-${{ hashFiles('evals/rubrics/**', 'evals/datasets/**') }}

      - run: pip install -r requirements.txt

      - id: routes
        run: echo "routes=$(python evals/affected_routes.py)" >> "$GITHUB_OUTPUT"

      - name: Cheap-rubric gate
        if: steps.routes.outputs.routes != '[]'
        env:
          FI_API_KEY: ${{ secrets.FI_API_KEY }}
          FI_SECRET_KEY: ${{ secrets.FI_SECRET_KEY }}
        run: fi run --check --strict --parallel 16 -c evals/fi-evaluation.yaml

      - name: Statistical delta gate
        if: steps.routes.outputs.routes != '[]'
        env:
          FI_API_KEY: ${{ secrets.FI_API_KEY }}
          FI_SECRET_KEY: ${{ secrets.FI_SECRET_KEY }}
          BASELINE_WINDOW_DAYS: "7"
        run: pytest evals/test_rag.py -n auto --routes='${{ steps.routes.outputs.routes }}'

      - if: always()
        uses: actions/upload-artifact@v4
        with:
          name: eval-report-${{ github.sha }}
          path: eval-report.json

A separate nightly cron workflow runs the full sweep across all routes and posts the daily baseline back to the observer.

The same shape works on GitLab CI, Buildkite, Jenkins, or CircleCI, since it is just pytest, a CLI, and a cache action.

Three things paid back in the first week:

  • Path-scoped triggers
  • Concurrency cancel-in-progress
  • Eval report artifacts with failing examples

Those turned borderline regressions into short conversations instead of arguments.

Running the same rubric in production

Offline CI catches the regressions I can think of.Production catches the rest.So I run the same rubric definition in both places.The CI version lives in code.

The production version runs against live OTel spans as a score attached to the trace.

from fi_instrumentation import register
from fi_instrumentation.fi_types import (
    EvalTag,
    EvalTagType,
    EvalSpanKind,
    EvalName,
    ProjectType,
)

eval_tags = [
    EvalTag(
        eval_name=EvalName.GROUNDEDNESS,
        type=EvalTagType.OBSERVATION_SPAN,
        value=EvalSpanKind.LLM,
        config={},
        mapping={
            "context": "retrieval.documents",
            "output": "output.value",
        },
    ),
    EvalTag(
        eval_name=EvalName.CONTEXT_RELEVANCE,
        type=EvalTagType.OBSERVATION_SPAN,
        value=EvalSpanKind.RETRIEVER,
        config={},
        mapping={
            "input": "input.value",
            "context": "retrieval.documents",
        },
    ),
]

register(
    project_type=ProjectType.OBSERVE,
    project_name="legal-rag",
    eval_tags=eval_tags,
)

The score lands as a span attribute, so a failing trace shows up with its rubric score next to latency and chunk IDs.

I sample 5 to 10 percent of production traffic for the LLM-judge rubrics and run the cheap ones on 100 percent.

Then I alarm on a sustained 2 to 5 point drop in a rubric's rolling mean over a 15 to 60 minute window.

The gap between the CI baseline and the production rolling mean is its own signal.

When it widens, the dataset has stopped being representative.

Closing the loop so the dataset keeps up

  • A dataset stops being a regression suite the moment production drifts past it.
  • The loop is what keeps the gate honest.
  • Failing production traces get clustered into named issues.
  • An analysis pass writes up the root cause and a fix for each one.
  • The worst representative traces get promoted into the eval set with rubric labels.
  • The next PR touching that path either clears the new entries or fails on them.
  • Over a few weeks the gate gets stronger instead of decaying because it learns the failures that actually happened rather than the ones I guessed at during setup.

Pitfalls I watch for

Scoring only Groundedness

  • Catches hallucinations.
  • Misses retrieval regressions.
  • Run all five core rubrics.

No expected_chunks in the dataset

  • You cannot score retrieval recall without ground truth.
  • The labeling pays back the first time retrieval breaks.

A floating judge model

  • Scores drift across runs of the same eval.
  • Pin and version the judge alongside the rubric.

Floors with no delta gate

  • Slow regressions stay under the floor for months.
  • The delta gate is what catches them.

    A 30-example dataset with a mean gate

  • Variance wider than the regressions you are chasing.

  • Grow the set or gate on percentiles.

The full LLM-judge sweep on every PR

  • Too slow and too expensive.
  • Cheap rubrics on PRs.
  • Heavy sweeps nightly.

A dataset frozen at launch

A 2024 set scoring a 2026 product is a benchmark, not a regression suite.

No cache

  • Cost climbs and flaky network calls block PRs.
  • Cache verdicts.
  • Invalidate on rubric or judge version change.

A production observer using a different rubric than CI

  • Then people argue about which number is real instead of fixing the bug.
  • One definition.
  • Run it in both places.

Tradeoffs I made on purpose

Statistical gating slows the first week

  • Building the baseline window takes a few nightly runs before the delta gate means anything.
  • The payoff is that a red PR starts meaning a real regression, which is the only reason people leave the gate on.

Sharded, path-scoped runs cost orchestration

  • Route-aware test selection and a distributed runner are extra wiring.
  • The return is the difference between a four-minute and a thirty-second PR gate.

The classifier cascade needs rubric discipline

  • Cascades work where the classifier has a clean target.
  • They fall apart on subjective axes.

- Deciding which rubrics cascade is a one-time design call you have to actually make.

If you have built a gate like this, I am curious which of the three corners gave you the most trouble.

For me it was significance, every time.