examples: NIST AI RMF evaluator β deterministic core, LLM narrates π€π€π€ - #99
examples: NIST AI RMF evaluator β deterministic core, LLM narrates π€π€π€#99CSOAI-ORG wants to merge 1 commit into
Conversation
β¦) π€π€π€ Companion to the GSPC provision-anchored evaluator (NVIDIA-NeMo#75), applying the same deterministic-core / LLM-narrated split to a voluntary framework: a NistRmfEvaluator agent matches scenarios against 8 real NIST AI RMF 1.0 subcategories across GOVERN, MAP, MEASURE, and MANAGE, and emits HMAC-signed, tamper-evident verdict records. Anything unmatched is UNMEASURED; strict_narration=True refuses LLM narration in that case. Hermetic pytest suite (7 tests, FakeLLMClient, no network) covers anchored matching, the framework-declared MANAGE-1.3 -> MAP-5.1 attachment edge, full-function coverage, signature determinism, tamper detection, and strict-mode refusal. Contributed by CSOAI (csoai.org) for the Open Secure AI Alliance's evaluations-and-benchmarks lane. Signed-off-by: Nicholas Templeman <nicholas@csoai.org>
|
Update: CSOAI is now a Contributor Member of C2PA (Coalition for Content Provenance and Authenticity, Linux Foundation) as of 2026-08-06. This PR is relevant: the deterministic-core evaluator pattern with HMAC-signed verdicts aligns with C2PA's emerging provenance standards for AI-generated content. We're participating in the C2PA Technical Working Group and would welcome feedback on how this evaluator pattern could inform C2PA's assertion types for AI agent decisions. The signed manifest shape (deterministic verdict + HMAC + content binding) maps directly onto C2PA manifests (assertion + claim_generator + signature) and is a candidate reference implementation for the "AI decision provenance" assertion the Working Group is exploring. Verified: C2PA Docusign Envelope ID 7C9592DB-D7C7-8C0F-8012-AFC90FD84F1E, contributor member level, signed by Jim Zemlin (Linux Foundation Executive Director). |
What
Adds
examples/nist_rmf_eval/β aNistRmfEvaluatorNOOA agent that evaluates a natural-language AI deployment scenario against a built-in corpus of 8 real NIST AI RMF 1.0 subcategories spanning all four Core functions (GOVERN, MAP, MEASURE, MANAGE) and emits a signed, tamper-evident verdict record, entirely deterministically. An optionalexplain_verdictgeneration method lets an LLM narrate the verdict in plain English; the verdict itself never depends on a model.This follows the exact architecture established in #75 (
gspc_provision_eval/), which is the pattern precedent: same deterministic-core / LLM-narrated split, same HMAC-SHA256 signed verdict record, same UNMEASURED discipline, samestrict_narrationflag (included from the start here), same hermetic test structure. Where #75 anchored on statute (EU AI Act / GDPR), this anchors on the voluntary NIST AI RMF β the two are complementary demonstration surfaces of the same idea: Python decides, the LLM only narrates.Why
Audit-grade AI evaluation needs a deterministic, replayable evidence layer. The AI RMF is the most widely adopted voluntary AI risk framework, so it is the natural second anchor set after statute. The example shows the pattern generalises to any framework corpus without design changes.
Honest scope
FULL_FUNCTION_COVERAGEmeans the scenario mentions anchored practices in all four functions β evidence of mention, not evidence of adequacy.### Community examplessection toexamples/README.md. Whichever lands second will need a trivial rebase of that section; happy to do it.Tests
Hermetic β
FakeLLMClient, no network, no API key:Covers: GOVERN anchor matching, MEASURE/MANAGE matching with the MAP-5.1 attachment chain, full-function coverage verdict, UNMEASURED on unrelated input, signature determinism across agent instances, tamper detection (hash change + forged verdict rejected), and strict-mode refusal on UNMEASURED.
Also verified:
ruff check,ruff format --check, andscripts/check_license_headers.pyall clean; the demo script runs offline.Checklist
ruff check/ruff format --checkcleanscripts/check_license_headers.pypassesexamples/README.mdindex updated (Community examples section, as in examples: GSPC provision-anchored evaluator β deterministic core, LLM narrates π€π€π€ Β #75)