Simulation
Self-critique
The agent proposes an action, then fairness, sensitive categories, frequency, and consent can veto it.
Understanding the labHow to use it and why you'd want to
Why you'd want to
Four checks run on a proposal, and it is allowed only when fairness, sensitive categories, frequency, and consent all pass. After Accept the page queues lab_interaction.
How to use it
- Read the four checks. All four have to pass.
- Income and a precise place are a veto.
- The consult nudge has a frequency cap.
- After Accept, lab_interaction is queued for the result.
Simulation. The agent proposes, then the guardrails vote. A single veto holds the action. No model call.
Review
Proposal and vetoes
- FairnessPass
- Sensitive categoriesPass
- Frequency capPass
- ConsentVeto
Held. A guardrail vetoed it.
Why am I seeing this? Fairness fails when the offer would change by inferred income. Sensitive categories include income and a precise place. The consult nudge is capped at two showings in this session. Consent off vetoes every proposal. Nothing is stored.
WalkthroughHow we built itShowHide
Example vendor setup is marked below. eVar and event numbers are examples. This lab does not call Adobe.
The self-critique lab runs four checks on a proposal and allows it only when fairness, sensitive categories, frequency, and consent all pass. After Accept it queues lab_interaction, and it does not call Adobe.
Score four checks
critique builds fairness, sensitive, frequency, and consent. allowed is true only when every check passes.
Veto income and a precise place
income-offer fails fairness and sensitive. precise-place fails sensitive. suggest-lab passes those two.
Cap the consult nudge
frequency fails only for repeat-consult, and only when consultShown is two or more. The showing count lives in component state and is not stored.
Queue lab_interaction
useLabView queues lab_interaction with action view and label page after Accept. Choosing a proposal calls trackLab with that proposal id as the label and action run_demo.
From the code
Four checks. One failure sets allowed to false.
export function critique(id: ProposalId, input: { consent: boolean; consultShown: number }): { checks: Check[]; allowed: boolean } {
const consent = input.consent
const frequency = id !== "repeat-consult" || input.consultShown < CAP
const sensitive = id !== "income-offer" && id !== "precise-place"
const fairness = id !== "income-offer"
const checks: Check[] = [
{ id: "fairness", pass: fairness },
{ id: "sensitive", pass: sensitive },
{ id: "frequency", pass: frequency },
{ id: "consent", pass: consent },
]
return { checks, allowed: checks.every((check) => check.pass) }
}The page passes consent and the showing count into critique, and records the view.
export function CritiqueLab() {
const locale = useLocale()
const { consent } = useConsent()
useLabView(LAB)
const [proposal, setProposal] = useState<ProposalId>("suggest-lab")
const [shown, setShown] = useState(0)
const review = critique(proposal, { consent: consent === "granted", consultShown: shown })Google and Adobe
Google queues lab_interaction after Accept. Adobe is an example of the same fields.
lab_interaction is queued only after Accept. Opening the lab sends action view and label page. Choosing a proposal sends action run_demo and a label such as suggest-lab, income-offer, precise-place, or repeat-consult. The pass and fail results are not parameters. Register lab_id, action, and label as event-scoped custom dimensions. This site does not call Adobe.
Simplified shape of the object queued after Accept. Register any new parameter as an event-scoped custom dimension. This site does not call gtag('set').
dataLayer.push({
event: "lab_interaction",
lab_id: "self-critique",
action: "view",
label: "page",
})Example implementation. This site does not call Adobe. eVar98, prop98, and event98 are example variable numbers. In Launch, a data element reads the value and a rule sends it when the value changes. In the report suite, enable eVar98 with Most Recent allocation and expire it on the hit. A processing rule is unnecessary if the data element maps straight to that eVar.
Example alloy payload. _example is a placeholder schema, not a real tenant.
alloy("sendEvent", {
xdm: {
eventType: "web.webinteraction.linkClicks",
_example: {
proposalId: "suggest-lab",
},
},
})Example hit. eVar98 is hit-scoped in this example. prop98 dies at the same hit.
s.eVar98 = "suggest-lab"
s.prop98 = "suggest-lab"
s.events = "event98"
s.linkTrackVars = "eVar98,prop98,events"
s.linkTrackEvents = "event98"
s.tl(true, "o", "lab_interaction")Translation
Each lab field, the GA4 name, and the example Adobe variable. Scope is the part that usually gets lost in the translation.
Lab id
GA4. Parameter lab_id on lab_interaction. The value is self-critique.
Adobe. Example eVar98, expire on the hit.
Scope. Event.
Action
GA4. Parameter action. view or run_demo.
Adobe. Example prop98, which dies at the hit.
Scope. Event.
Proposal label
GA4. Parameter label on run_demo. The view sends page.
Adobe. Example eVar98 if you stored the proposal instead of the lab id.
Scope. Event. The proposal is this click, not a user trait.
Allowed
GA4. Not sent. The four pass or fail marks stay on the page.
Adobe. Example prop98 if you tracked the veto. The page does not.
Scope. Hit, if you sent it. A user property would keep a veto after the next proposal.
Recommended next
Why these picksReading path transitions…