Choose what the AI reads

Run setup, select the AI question, and inspect Context for AI question in its header. Preview reads your idle kernel without contacting a model. Connect ChatGPT or an API provider before running the question.

Choose what the AI reads

Run setup, select the AI question, and inspect Context for AI question in its header. Preview reads your idle kernel without contacting a model. Connect ChatGPT or an API provider before running the question.

  1. Try Default: fitted earlier source and completed earlier AI pairs are candidates.
  2. Try Full notebook: the later comparison note also becomes a candidate. The current question and its answer stay excluded.
  3. Uncheck the earlier text declaration to make a Custom text selection. The function average_score remains offered through its separate Tools choice.
  4. Uncheck that cell’s Tools checkbox to withdraw average_score; enable it again before asking the model to call the function.
  5. Try Current question only. Optional notebook text is excluded, while the selected tool stays available.
  6. Return to Default and then Custom to recover your saved text choices. Save and reopen to retain them.

A checkmark indicates selection; partial or omitted by budget shows what fits. The displayed budget is a character estimate, not a token count.

scores = [6, 8, 10]
def average_score() -> float:
    """Return the mean of the current practice scores."""
    return sum(scores) / len(scores)
print(f"Mean: {average_score()}")
Mean: 8.0

Available tool

  • &average_score: retrieve the current mean.

Unchecking Context on this note does not remove the tool. Uncheck its separate Tools checkbox to withdraw this declaration. Another enabled declaration of the same function would still offer it. Only declarations above or in the current question register tools; wider modes never register new declarations below.

Earlier observations

The three practice scores are each out of ten. Compare each score with the mean. They describe one short practice session, not the student’s overall ability.

Call &average_score once for the current practice scores and explain the returned mean. Identify any later comparison note included in your Context preview, and distinguish that source text from the live Python value.

The live average_score() call returned 8.0: for this practice session, 6 is below the mean, 8 equals it, and 10 is above it. No later comparison note appears in the supplied context, so I can’t identify its text; notebook source is separate from the live Python result.

Observed live tool calls for the answer above (actual subscription events; private fields shortened).

Tool Result state Submitted arguments Observed result
average_score completed {} 8.0

Later comparison note

A different practice session had scores 7, 9, and 8. This text is below the question. Default and All above exclude it. Full notebook, 10 above + below, or a Custom choice can include it as below-question source. No code is executed by selecting this note.

More experiments

  • After the first answer completes, add another AI question below it. Select both earlier AI cells to provide a complete history pair. In Custom, select only the completed answer to provide labeled AI source instead.
  • Move the first answer above its own question. It still cannot enter that question’s rerun. Keep answer must be off to request a fresh response.
  • Try 10 above and 10 above + below. Each counts physical positions, including raw/empty/ineligible cells, after removing the current question and its linked answers.
  • In Custom, insert a new Markdown note. New eligible cells default to included. Existing empty cells keep their saved choice after you fill them.
  • Edit a note after preview. Wait for a fresh estimate or use Refresh preview; execution always snapshots afresh when its turn starts.

Context selects text; Tools controls declarations from each eligible cell. Tool choices save across modes and default to enabled for new cells. Neither control resets Python state. Offered read tools can independently retrieve other text.

Selected code cells can include bounded displayed text outputs, which may be stale after source edits. Image pixels require an explicit attachment to the question. Keep answer and Run All retain their usual behavior.

← Examples guide · Download this notebook