AI prompts in JupyterLab notebooks
Manual · Previous: Write and run AI questions · Next: Edit, rerun, and run notebooks
gpt-6-sol for OpenAI and claude-sonnet-5 for Anthropic. A model default you set in JupyterLab’s nbinlineai settings takes precedence.
Here the cell keeps Notebook default (OpenAI) for its connection while choosing its own model, style, and effort. If the notebook’s connection changes, this cell follows it; review any saved model choice for the new connection.

Use the notebook’s AI defaults row to choose how the model should answer, or use Override for an individual prompt:
| Style | What to expect |
|---|---|
| Compact | Very succinct answers with minimal explanation. Code is allowed when helpful, in fenced Markdown blocks. This is the default. |
| Full | Detailed explanations, reasoning, examples, and code when helpful. Code is placed in fenced Markdown blocks. |
| Learning | A Socratic tutor that asks focused questions, responds to your attempts, and helps you work out the solution. It is instructed not to provide complete solutions or substantial code; code hints are limited to 3 lines in total per response. It may suggest documentation. |
The notebook’s style choice is saved in its .ipynb metadata. A cell uses this choice unless it has an explicit override. Reruns use the current effective choices; changing defaults does not rewrite saved answers or alter a response already in progress. JupyterLab user preferences provide initial defaults for notebooks without saved choices.
Open Configure AI and expand the style-instruction editors. Compact, Full, and Learning start with our bundled instructions. Edit a style’s text and click Save to use your own wording. Reset removes that override and restores the current bundled instructions. Empty instructions are rejected; use Reset instead. Each custom instruction can contain at most 8,000 characters.
Custom instruction text is stored in JupyterLab user settings, outside the notebook. Sharing an .ipynb shares its style choice, but not your personal rewritten instructions. A recipient uses their own instructions for that style. Notebook context and tool-handling instructions remain managed by the extension.

If a save cannot be confirmed, nbinlineai keeps using the last confirmed instructions and offers a settings Retry to check what was saved.
Choose effort beside the model in the notebook defaults. Model default omits the override and lets the provider choose. Other available levels depend on the model; the picker only offers known supported choices. Individual cells can override effort when needed.
| Model | Supported effort choices | Provider default |
|---|---|---|
| GPT-6 Sol / Luna | None, Low, Medium, High, Extra high, Max | Medium |
| GPT-6 Astra | Low, Medium, High, Extra high, Max | Provider-selected |
| Claude Sonnet 5 / Fable 5.1 | Low, Medium, High, Extra high, Max | High |
| Claude Opus 5.5 | Low, Medium, High, Extra high, Max | Medium |
| Claude Haiku 4.5 / unknown custom model IDs | Model default only in this version | Provider-selected |
Effort controls how much work the model puts into the answer. Higher settings can use more tokens and take longer. Style controls how the answer is presented: you can use Compact with high effort, or Learning with low effort. nbinlineai displays the answer rather than internal thinking content.
The mappings use OpenAI’s reasoning.effort and Anthropic’s output_config.effort with adaptive thinking where supported. Claude Haiku’s older manual thinking budget is a different control and is not exposed here. See OpenAI reasoning and Claude effort.
These are instructions to the language model, not output filters. Learning mode guides tutoring behavior; it is not a technical guarantee that the model can never reveal a solution.
Help me understand this loop. Ask me questions so I can figure it out.For example:
You: Help me understand why this loop skips an item.
Tutor: What happens to the remaining indices when an item is removed?
You: I think the next item moves into the current index.
Tutor: What index does the loop visit next, and which item might that miss?
Each “You” line is a new AI Prompt cell, and each tutor reply is its paired answer. Turn off Keep answer, edit, and rerun an old prompt when you want to replace that exchange; create a new prompt when you want to continue the conversation.

Manual · Previous: Write and run AI questions · Next: Edit, rerun, and run notebooks