Automated red teaming#5
Draft
hjrnunes wants to merge 268 commits into
Draft
Conversation
…bstitution properly
Addresses NVIDIA#1433 Provide a new service `garak.intentservice` for looking up intents `intentservice` resolves intent specifiers, which are intent codes (i.e. "A999aaaaa") or prefixes thereof, and provides tooling for resolving them into intent stubs - snippets to be used in prompt construction Three routes are provided for specifying intent stubs: * Descriptions/names in the intent typology, a mandatory default place where we can get a string * Text files in a way that allows supplementation/overriding using XDG spec * Classes which implement a method that allows programmatic generation of intent texts A test intent is provided, as in some other plugin types, as well as testing.
…ocs with intro paragraph
…tion Introduces a new MulticlassJudge detector that extends ModelAsJudge with JSON-aware response parsing and user-defined classification categories (e.g. complied/rejected/alternative/other). Supports configurable system and user prompts, custom score keys/fields, confidence thresholds, and optional JSON schema injection for structured output APIs.
Implement RHEL AI midstream versioning pattern (X.Y.Z+rhaiv.N) using flit-scm to enable automatic version management from git tags while preserving flit as the build backend. Changes: - Migrate build backend from flit_core to flit_scm:buildapi - Enable dynamic versioning via setuptools_scm (used by flit-scm) - Add version fallback mechanism in __init__.py (0.0.0+dev) - Exclude auto-generated _version.py from version control - Add CHANGELOG.md with versioning documentation - Add RHEL-AI-VERSIONING-GUIDE.md as implementation reference - Document versioning pattern in README.md Technical Details: - flit-scm bridges flit (build) and setuptools_scm (versioning) - Version constraint: flit-scm>=1.7.0,<2 (transitively requires flit-core~=3.5) - All flit configuration preserved ([tool.flit.*] sections maintained) - Version file: garak/_version.py (auto-generated during build) Version Pattern: - Base: Semantic version (e.g., 0.14.1) - Midstream marker: +rhaiv (Red Hat AI Version) - Build number: .N (increments for fixes, resets on version bump) - Example: 0.14.1+rhaiv.1, 0.14.1+rhaiv.2, 0.15.0+rhaiv.1 Backward Compatibility: - No breaking changes to package functionality - pip install garak continues to work as before - Build system change is internal to packaging Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
Signed-off-by: Sudip Sinha <sudsinha@redhat.com>
…angservice - Add prompt_intents tracking to IntentProbe.build_prompts() so each prompt maps back to its source intent (fixes test_cas_intentprobe) - Fix test_spo_augmentation fixtures to load intent service before constructing SPO probes, use TextStub objects instead of raw strings, and align assertions with actual implementation (augment_system/ augment_user flags instead of nonexistent augmentation_func attribute). Add _mint_attempt tests that exercise the base Probe method with augmentation metadata verification. - Load intent service in langservice probe_pre_req fixture and skip TAPIntent/PAIR in translation test only when OPENAI_API_KEY is missing - Sync requirements.txt datasets version (3.x -> 4.x) with pyproject.toml
…reak wrapper or TAP variants
When TAP's pruning algorithm removes all candidates (or TAP fails to generate any), `adv_prompt_list` is empty. This causes `TAPIntent` to not log any `Attempt` for an input stub which results in missing stubs from the output report. see: RHOAIENG-54412
Signed-off-by: blastStu <stuart.battersby@gmail.com>
Signed-off-by: blastStu <stuart.battersby@gmail.com>
…prompts fixes - RHOAIENG-54421
…y and removed `max_tokens`
- Fixed: AttributeError in garak/resources/api/huggingface.py (compatibility with updated transformers). - Fixed: Missing documentation for spo, multilingual, _augmentation probes and earlystop harness. - Cleaned up: Misplaced documentation files in docs/source/
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
e77682c to
866d1e7
Compare
…onses generators CI was during testing hanging because of this. Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
…generator Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
Signed-off-by: ABeltramo <beltramo.ale@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft temporary PR to keep track of changes.