1 / 18
1
ComplianceGPT Lab · AI Innovation & Diffusion REU 2026

Project Navigator

You understand the theory (Contextual Integrity). Here's how to actually run your project against real code, on real infrastructure, this week.

2

Where This Picks Up

What you just learned

The CI 5-tuple, why it alone isn't enough (C1–C4), and how to reframe your own research question in that vocabulary.

What this deck adds

The operational path from "I have a research question" to "I have real numbers and a poster" — repo orientation, running things on the cluster, pulling results back, and a concrete checklist for this week.

3

The Whole Pipeline, One Diagram

Research
question
Dataset
(CSV)
SLURM
extraction (GPU)
Local
verification
Analysis
Write-up
+ poster

The two gold boxes are today's focus — everyone gets stuck there first, and getting comfortable with that loop early is what makes the rest of the week possible.

4
Part 1 — Orientation

Where Things Live

PathWhat it is
data/Your input CSVs — scenarios + ground truth go here
app/batch_runner.pyThe script that runs your data through the pipeline
connector/llm1_extractor.pyExtraction prompts (the AI/NLP layer you're studying)
connector/hipaa_engine.pyThe verifier interface — you call this, you don't need to read it
datalog_engine/*.dlThe formal rules — infrastructure, not your research surface
experiments/results/Where your output CSVs land
scripts/Reusable analysis scripts — check here before writing your own
5
Part 2 — The Two-Phase Pattern

Why Extraction and Verification Happen in Different Places

The SLURM cluster has GPUs (for the LLM) but no Souffle installed. Your laptop has Souffle but no GPU. So the pipeline splits cleanly across the trust boundary you already learned:

On SLURM

Run batch_runner.py. The LLM call happens here. The output CSV's verdict column will say ERROR — that's expected, not a bug. scenario_json is what you actually need, and it's fully populated. (souffle_facts is not populated on this path — it's only written once Souffle actually runs, so it stays blank here. Don't build anything that depends on it from a SLURM CSV.)

On your laptop

Pull the CSV back. Re-run verification locally using the already-extracted facts — no LLM call needed here at all, just Souffle. Seconds, not minutes.

6
Part 3 — Running Something

Step 1 — Connect & Submit

Haven't done the Extraction Warm-UpCompliance QA Playground yet? Do that first — 15 minutes, no cluster needed, and the script below stops being a black box once you have. Full connection walkthrough (SSH keys, host, first-time setup) is in Cluster Access and SLURM Quick Connect. The short version:

ssh yournetid@submit.ai.stonybrook.edu cd COMPLIANCEGPT sbatch your_job.sh squeue -u yournetid # check it's running
7
Part 3 — Running Something

Step 2 — batch_runner.py Cheat Sheet

python3 app/batch_runner.py \ --input data/your_scenarios.csv \ --question-col query \ --answer-col ground_truth \ --strategy formal \ --model ollama/llama3.2 \ --output experiments/results/your_run.csv \ --limit 10 \ --delay 1

Always test with --limit 10 first. A typo in a column name fails the same way whether you run it on 10 rows or 500 — find out on the 10-row version.

8
Part 3 — Running Something

Step 3 — Monitor & Pull Results Back

squeue -u yournetid # is it still running? tail -f logs/your_job_*_out.txt # watch it live # from your laptop, once it's done: scp yournetid@submit.ai.stonybrook.edu:\ ~/COMPLIANCEGPT/experiments/results/your_run.csv \ ./experiments/results/
9
Part 3 — Running Something

Step 4 — Verify Locally

Once the CSV is back on your laptop (with Souffle installed):

from connector.hipaa_engine import HIPAAEngine, DatalogScenario import json, pandas as pd engine = HIPAAEngine(souffle_project_dir="datalog_engine") df = pd.read_csv("experiments/results/your_run.csv") for _, row in df.iterrows(): scenario = DatalogScenario(**json.loads(row["scenario_json"])) result = engine.check(scenario) print(result.verdict, result.citations)

Notice: HIPAAEngine.check(), not a strategy class with an explainer attached — you don't need natural-language explanations for most analysis, and skipping that step means zero LLM calls, zero chance of hanging on a misconfigured model.

10
Part 4 — When Something Breaks

Common Pitfalls

SymptomLikely causeFix
Every row's verdict is ERRORRan on SLURM (no Souffle) and never re-verified locallyExpected on SLURM — run Step 4 locally
Job fails instantlyModel not pulled, or wrong --question-col nameTest on --limit 10 first, check column names match your CSV exactly
Script hangs for a long timeUsed a strategy class that calls an LLM explainer, and no model is configuredUse HIPAAEngine.check() directly for verdict-only analysis
Extra CSV columns disappearedbatch_runner.py only outputs its fixed schemaRe-merge your extra columns back in on row_id afterward
11
Part 5 — After Verification

Step 5 — Analysis

Once you have real verdicts, compute the metric your research question actually asks for — don't just report raw accuracy if your question is sharper than that.

12

This Week's Checklist

  1. Dataset finalized and saved in data/
  2. Test run on SLURM with --limit 10 — confirm no crashes
  3. Full run submitted
  4. Results pulled back, verified locally
  5. First real numbers computed — even rough ones
  6. One specific finding written down in a sentence
13

Naming Things So Future You Isn't Confused

Do

  • Name output CSVs with what changed: _baseline, _v2, _gemma
  • Keep raw SLURM output separate from locally-reverified output
  • Write one line in your notes when a run finishes: what changed, what you expect

Don't

  • Overwrite results.csv every run — you'll lose the ability to compare
  • Trust a SLURM run's verdict column without re-verifying locally
  • Wait until Friday to discover Monday's run had a typo
14

Where to Get Help

15

This Pattern Is Already Running for a Real Project

The red-teaming adversarial project uses exactly this two-phase flow: 56 real scenarios extracted on SLURM, re-verified locally with HIPAAEngine.check(), analyzed for attack success rate by category. If you want a concrete worked reference while building your own pipeline, ask to see it.

16

Recap

  1. Extraction happens on SLURM (GPU, no Souffle); verification happens locally (Souffle, no GPU needed)
  2. verdict=ERROR in a SLURM output CSV is expected, not broken
  3. Always test with --limit 10 before a full run
  4. Use HIPAAEngine.check() directly when you only need verdicts — faster, and can't hang on a misconfigured LLM
  5. Name your files so you can tell runs apart later
17

Today's Action Item

Before you leave: get one row of your own data through the full pipeline — SLURM extraction, pulled back, verified locally, one printed verdict. Not ten rows. Not the final analysis. One row, all the way through. Everything after that is repetition.

18

Now Go Run Something

You know the theory and you know the pipeline. The only thing left is doing it.