Skip to Content
SDK ReferenceOutcomes Model
💡
Quick overview

SDK Outcomes API

Use the Outcomes API to attach a quality rating to a session before you close it. Ratings power outcome correlation charts in Analytics and surface ground-truth signals in the Decisions Explorer.

Recording a rating: Call set_outcome_rating() (Python), setOutcomeRating() (TypeScript), or activity.SetOutcomeRating() (.NET) within your session before calling complete().

Rating values:

  • EXEMPLAR — golden reference example, ideal for evaluation datasets
  • GOOD — clearly positive outcome
  • ACCEPTABLE — within normal tolerances
  • MARGINAL — borderline, worth a second look
  • BAD — clearly negative outcome
  • HARMFUL — caused or risked harm
  • UNKNOWN — not yet rated (default)

Access control: Developers instrument outcome ratings in code. Governance Engineers and Compliance Officers can override ratings through the portal.

Outcome Recording

Who can use this
Available to
DeveloperAdministrator
Not available to
Governance EngineerCompliance OfficerBusiness OwnerAuditor

Developers record outcome ratings in code using the SDK. Governance Engineers and Compliance Officers can override ratings and add notes through the portal.

Outcome ratings let you tell VeriProof whether a session went well. You attach a rating from inside the running session — before calling complete(). Ratings surface in:

  • The Decisions Explorer — outcome column and detail drawer
  • The Time Machine — Governance Context panel
  • Analytics → Trends — outcome correlation charts
  • Compliance Center — post-decision accuracy evidence for audit frameworks

Availability

RolePermission
AdministratorRead, write
DeveloperWrite
Platform EngineerRead, write
Compliance OfficerRead
Business OwnerRead
AuditorRead

Outcome Model

An outcome record is attached to a session and contains the following fields:

FieldTypeRequiredDescription
ratingOutcomeRatingQuality judgement for the session — see values below
notestringFree-text justification for the rating
ground_truth_labelskey-value mapNamed numeric scores (e.g. accuracy: 0.92)

Outcome Types

Use the OutcomeRating enum to classify the quality of a session:

Python valueTypeScript value.NET valueDescription
OutcomeRating.EXEMPLAROutcomeRating.ExemplarOutcomeRating.exemplarGolden reference — ideal session to learn from
OutcomeRating.GOODOutcomeRating.GoodOutcomeRating.goodClearly positive outcome
OutcomeRating.ACCEPTABLEOutcomeRating.AcceptableOutcomeRating.acceptableWithin normal tolerances
OutcomeRating.MARGINALOutcomeRating.MarginalOutcomeRating.marginalBorderline — acceptable but warrants review
OutcomeRating.BADOutcomeRating.BadOutcomeRating.badClearly negative outcome
OutcomeRating.HARMFULOutcomeRating.HarmfulOutcomeRating.harmfulCaused or risked harm
OutcomeRating.UNKNOWNOutcomeRating.UnknownOutcomeRating.unknownNot yet rated (default)

Recording Outcome Ratings via the SDK

Call set_outcome_rating() within your session before calling complete().

import os from veriproof_sdk import VeriproofClient, VeriproofClientOptions, VeriproofSession, StartSessionOptions from veriproof_sdk.enums import SessionOutcome, OutcomeRating client = VeriproofClient( VeriproofClientOptions(api_key=os.environ["VERIPROOF_API_KEY"]) ) async with VeriproofSession( client, "loan-assessment", StartSessionOptions(session_id="loan-app-98765"), ) as session: # ... AI reasoning steps ... session.set_outcome(SessionOutcome.SUCCESS) session.set_outcome_rating( OutcomeRating.GOOD, note="All eligibility criteria met. Decision matches policy.", )

You can also record a rating without an explicit outcome. If you only know the quality of the session, set the rating and omit set_outcome().


Viewing Outcomes in the Portal

Navigate to Decisions in the main navigation. The Outcome column shows the session outcome for each session, or if none has been recorded. Select any row to open the detail drawer, which includes:

  • The original decision and governance score
  • The outcome rating and any attached note
  • Links to the Time Machine trace

Last updated on