aicg: learning_gap — lessons#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f3fa44c5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ## Requirements | ||
|
|
||
| - Use **schema-constrained output** if your provider supports it (OpenAI Structured Outputs or Anthropic tool use). Fall back to JSON mode + validation only if it does not. | ||
| - Use a low `temperature` (0 to 0.2). This is a classification task with right answers. |
There was a problem hiding this comment.
Do not require temperature for Opus 4.7 users
This lab supports an Anthropic implementation, and the preceding lectures use claude-opus-4-7 as the Anthropic example model; Anthropic's Opus 4.7 migration docs state that non-default sampling parameters such as temperature are rejected with HTTP 400. A learner who follows the Anthropic path and sets temperature=0 or 0.2 to satisfy this requirement will fail before any classification runs, so this should be conditional on models that support temperature or replaced with guidance to omit it for Opus 4.7.
Useful? React with 👍 / 👎.
|
|
||
| for block in response.content: | ||
| if block.type == "tool_use": | ||
| payload = block.input # already a dict conforming to the schema |
There was a problem hiding this comment.
Enable strict Anthropic tools before claiming schema guarantees
This comment is not guaranteed by the example as written: Anthropic documents strict schema-conformant tool inputs as a strict-tools feature, but the tool definition above only supplies input_schema and never sets strict: true. In the Anthropic implementation path, students can therefore treat block.input as validated when it may still need schema validation, undermining the structured-output lesson.
Useful? React with 👍 / 👎.
AICG cross-repo audit work item
learning_gap/?learning-empty-module-container-lessonsllm-application-developer-learninglessonsWhy
lessons contains no mod-* directories.
Loop note
Generated by the autonomous runner. CI must pass.