Skip to content

feat: Add random, compare, and import CLI commands#7

Merged
scthornton merged 1 commit into
mainfrom
feature/cli-enhancements
Mar 30, 2026
Merged

feat: Add random, compare, and import CLI commands#7
scthornton merged 1 commit into
mainfrom
feature/cli-enhancements

Conversation

@scthornton

Copy link
Copy Markdown
Owner

Summary

  • prompt-db random — sample random prompts with technique/score filters
  • prompt-db compare --by model — leaderboard of attack success rates per model
  • prompt-db compare --by technique — which attack techniques work best
  • prompt-db import-prompts <file> — import JSONL or plain text, auto-dedup

New CLI commands

Command Description
prompt-db random -n 5 -t jailbreak 5 random jailbreak prompts
prompt-db compare --by model Model vulnerability leaderboard
prompt-db compare --by technique -m gpt-4 Technique effectiveness on gpt-4
prompt-db import-prompts new.jsonl -s my-source Import from JSONL

Test plan

  • 37/37 tests passing
  • Lint + format clean
  • Random sampling respects filters
  • Compare handles empty results gracefully
  • Import deduplicates against existing content

- `prompt-db random` — sample random prompts with filters
- `prompt-db compare` — compare attack success rates across models or techniques
- `prompt-db import-prompts` — import from JSONL or plain text files
- New DB methods: random_prompts, compare_models, compare_techniques
- 8 new tests (37 total passing)
@scthornton scthornton merged commit 4c1ef45 into main Mar 30, 2026
3 checks passed
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.

1 participant