Repository navigation
Add ares-physics-bounds: deterministic physics/bounds evaluator (community plugin draft) - #798
Conversation
nedshivina
left a comment
There was a problem hiding this comment.
Could you please add example YAML config to https://github.com/IBM/ares/tree/main/example_configs/experimental_plugins ?
|
Done — added The evaluator config is defined inline under Validation note: config parsing and schema checks only, no end-to-end model run — the YAML resolves through the standard config machinery on ares main (goal → strategy → evaluator extraction), and |
|
Good catch — thank you, and sorry for the inverted polarity. We checked We've flipped it in 9ec5102 (plus cd2c745 / d93ef13 / 6e84443 for tests, README and the example config), so it now matches what those sources do:
38 unit/adapter tests pass locally after the flip, including the updated polarity assertions (violation → 0.0, clean → 1.0); docstring, README and the example YAML comments updated accordingly. This is unit/adapter-level verification — no end-to-end model run. If you'd rather see a different treatment here (e.g. keeping the polarity with the divergence documented instead), happy to adjust. |
nedshivina
left a comment
There was a problem hiding this comment.
LGTM
Please, fix DCO
stefano81
left a comment
There was a problem hiding this comment.
LGTM, it's only missing DCO to be green
Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
…__init__.py Signed-off-by: PHM <[email protected]>
…physics.py Signed-off-by: PHM <[email protected]>
…physics_eval.py Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
…tight connectors, nan-only) Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
…gins Signed-off-by: PHM <[email protected]>
Signed-off-by: PHM <[email protected]>
…, README and example config Signed-off-by: PHM <[email protected]>
…, README and example config Signed-off-by: PHM <[email protected]>
…, README and example config Signed-off-by: PHM <[email protected]>
6e84443 to
60a6df3
Compare
|
Done - all 16 commits are now signed off (trailers only, no code changes), DCO is green. Thanks for the quick review! |
Title: Add ares-physics-bounds: deterministic physics/bounds evaluator (community plugin draft)
Summary
Draft for triage in
experimental-plugins/ares-physics-bounds/, following up on #794 (no acceptance implied — happy to rework scope as you see fit). A deterministic physics/bounds evaluator that flags a narrow class of bound violations in model responses — impossible velocities, probabilities outside [0, 1], negative absolute quantities, non-finite values leaking into claims — with no LLM calls at evaluation time (rules are deterministic; the test suite is reproducible). It is intended to complement the attack side: attack strategies probe the model; these rules are designed to flag outputs containing numeric claims that violate the encoded bounds.What is inside
src/ares_physics_bounds/physics.py— zero-dependency scoring core (pure standard library): percent-suffix-aware probability bounds, unit-normalised speed-of-light check (supported units: m/s, km/s, km/h, mph, cm/s; unknown formats and unparseable numbers pass silently by design), negative kelvin/ages, non-finite value leaks.src/ares_physics_bounds/physics_eval.py— ARES adapter mirroringares.evals.keyword_eval.KeywordEval(pydantic config with Literal type,config_model(),template(),evaluate()). Prediction semantics:1.0violation found /0.0consistent /-1.0connector error (same convention as KeywordEval; downstream aggregation is framework-side).tests/— 30 tests: 25 pure-core (positive/negative/boundary cases, including exactly-c passing, 95% passing, 120% failing; run with no dependencies) + 5 adapter tests against the ARES framework (config/template path, plain-string response, chat-completion dict response, error status, findings attachment).Lineage
An analogous detection approach was merged into microsoft/PyRIT main as
PhysicsConsistencyScorer(microsoft/PyRIT#3507); this plugin is an independent implementation for ARES, not shared code.Verification
pytest tests/→ 30 passed (core 25/25 without ares installed; adapter 5/5 with the framework installed).Out of scope for this draft
Command-substitution / obfuscation handling, agent tool-call routing, and multilingual claims.