Skip to content

feat: research-grade prompt-injection detection benchmark with baselines + ablation#39

Merged
quantifylabs merged 2 commits into
mainfrom
feat/injection-benchmark
May 31, 2026
Merged

feat: research-grade prompt-injection detection benchmark with baselines + ablation#39
quantifylabs merged 2 commits into
mainfrom
feat/injection-benchmark

Conversation

@quantifylabs
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7cfaafe09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread benchmarks/injection/datasets.py Outdated
from datasets import load_dataset

resolved = _resolve_hf_revision(DEEPSET_REPO, DEEPSET_REVISION)
ds = load_dataset(DEEPSET_REPO, revision=DEEPSET_REVISION)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin Hugging Face loads to the resolved revision

This resolves main to a commit SHA and records that SHA, but the actual download still uses DEEPSET_REVISION (main). If the upstream dataset advances between resolution and download, or on later reruns, the benchmark consumes moving data while presenting the run as pinned; the same pattern appears in the Dolly loader. Use the resolved SHA for load_dataset(..., revision=resolved) so the recorded revision actually matches the rows scored.

Useful? React with 👍 / 👎.

Comment thread benchmarks/injection/datasets.py Outdated
resolved = _github_file_sha(INJECAGENT_REPO, INJECAGENT_FILES[0], INJECAGENT_REF)
cases: list[str] = []
for path in INJECAGENT_FILES:
raw_url = f"https://raw.githubusercontent.com/{INJECAGENT_REPO}/{INJECAGENT_REF}/{path}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin InjecAgent raw fetches to immutable commits

The metadata records only the latest commit for the first InjecAgent file, but both JSON files are fetched from the moving main ref. If main advances or data/test_cases_ds_base.json changes independently, the benchmark can sample rows that are not represented by the recorded revision, breaking reproducibility of the published results. Resolve an immutable repository commit (or record/fetch each file SHA) and use that ref in the raw URL.

Useful? React with 👍 / 👎.

@quantifylabs quantifylabs merged commit ca426bb into main May 31, 2026
4 checks passed
@quantifylabs quantifylabs deleted the feat/injection-benchmark branch May 31, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants