Learning with agents

When does a gradient step go too far?

A gradient step moves the parameters against the gradient of the loss, by an amount set by the step size. Predict the effect of one step on L(x, y) = x² + 2y², then check the calculation. You can take the same example, with your prediction, to an AI assistant you already use, such as Codex or Claude.

Hints are prepared in advance; no AI model is connected.

Your notes and saved work ↓

01 / Try one step

The gradient gives a direction. The step size decides how far to go.

Imagine adjusting two model parameters, x and y, to reduce an error measured by the loss L(x, y) = x² + 2y². The gradient points in the direction in which the loss rises fastest near the current point. A gradient step moves the other way: it subtracts the gradient multiplied by a chosen step size η.

One step on two parameters, with no trained model. New to gradients? Open the full lesson.

Choose and predict a step

Start at (2, 1) with loss 6.

After one step, will the loss…
One step on a quadratic lossContours of L(x,y) = x squared plus 2 y squared. A starts at (2, 1) with loss 6. The endpoint will appear after you check the step.L=1L=2L=6L=12xy0-2-2-1-11122A (2, 1)
A is the starting point. B stays hidden until you check the step. Each ellipse joins points with equal loss; smaller contours have lower loss.

Your investigation

Your notes and saved work

Your work is saved in this browser only. A private window, clearing this site’s data or the browser freeing space can remove it, so export a copy to keep it or to move it to another device. An imported file can be edited, so it is not a record of what was actually done.

Reflection and next decision
Checked attempts (0)

Each attempt is kept as it was when you checked it: your prediction, the hints you had seen and the help you chose. Later edits do not change it.

Check a prediction above and the attempt will appear here.

    Saved work, import and recovery

    Choose a file above or paste its text below; it stays in your browser. Importing saves your current work first and never replaces it. The agent task file from the next section cannot be imported here.

    02 / Take the example to an assistant

    Give an assistant the calculation, not just the question.

    An assistant can help more when it knows which example you tried, what you predicted and what the calculation showed. This section writes that down as a task file you can give to Codex, Claude or another assistant.

    Check a prediction or show the worked example above to prepare the task.

    The task file uses the help you choose here. Your notes and every checked attempt are kept in this browser; export the investigation above to keep a copy. No account or API key is needed.

    03 / What comes next

    Help that starts from the same calculation

    The aim is an assistant on this page that can explain the step you chose, suggest a useful comparison and help you reproduce the calculation, while you decide what to ask and what to try next. It will be connected only after sign-in, usage and cost limits, and tests for wrong or answer-giving hints are in place.

    This page has had automated tests but no independent security audit, and its effect on learning has not been measured.

    Continue with the gradient descent lesson →