Subjects › AGI Agents (6-week course)

W5 · Constitutional AI

Written principles, critique → revise loops, and turning revisions into preference data.

The idea

Constitutional AI replaces many human labels with a short written constitution: the model critiques its draft against each principle and revises only when the critic says REVISE. When at least one revision happened, `preference_pair` exports one free training pair per prompt — the final revision as 'chosen', the original draft as 'rejected' (RLAIF). Sampling a subset of principles each pass (`sample_k`) trades quality for cost; if a pass revises nothing the loop stops, so a missed principle gets no second draw. Amend the constitution only with evidence — a failing test or a trace — and log it in the amendment table. In your repo: Week05_Alignment_Safety/constitution.md, constitutional_agent.py; Experiment B.

Lesson

No lesson built yet. The worked solutions below are the material it would be assembled from.

Questions (5)

Question Type Difficulty Drift Accuracy
ConstitutionalAgent critiques a draft, revises it once, and exports `preference_pair`. Which way round is the … mcq Easy -1.30 — — (0)
You want to add one principle to constitution.md. Which candidate is best written for this repo's critique → r… mcq Easy -0.60 — — (0)
A trace from your eval run shows the agent's final answer giving a figure that no tool returned, and the P1 (H… short Moderate 0.20 — — (0)
ConstitutionalAgent has all 8 principles and max_passes=2. It is given an existing draft via `respond(prompt, … numeric Hard 0.80 — — (0)
ConstitutionalAgent(sample_k=2, seed=s) has 8 principles and max_passes=2, and every run is given a fresh, ran… numeric Very hard 1.50 — — (0)