You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,46 @@ It currently relies on [jupyter-ai-jupyternaut](https://github.com/jupyter-ai-co
11
11
12
12
Once Jupyterlab started, the model must be configured via the menu `Settings>Jupyternaut settings` (model and API key).
13
13
14
-
See Jupyternaut [documentation](https://jupyter-ai.readthedocs.io/en/v3/users/jupyternaut/index.html#model-selection) to set it up.
14
+
See Jupyternaut [documentation](https://jupyter-ai.readthedocs.io/en/v3/users/jupyternaut/index.html#model-selection) for details about setting up the agent.
15
+
16
+
## How it works
17
+
18
+
Each code cell in a notebook gets an **Explain Code** button in its toolbar \
19
+
Clicking it opens a chat panel on the right side and sends the following context to the AI:
20
+
21
+
- The **cell source code** and its **kernel language**
22
+
- Any **error output** produced by the cell (traceback included)
23
+
-**Preceding code cells and markdown cell** (up to the previous markdown cell), used as the exercise description
24
+
- An optional **reference solution** and **evaluation criteria** stored in the cell metadata (the solution is ROT13-encoded to keep it hidden from students)
25
+
26
+
The AI replies using a configurable **system prompt** (`TUTOR.md`) that shapes its pedagogical behavior. By default the extension looks for a `TUTOR.md` file walking up from the notebook's directory to the server root, so different courses or folders can each have their own tutor persona.
27
+
28
+
## Configuration
29
+
30
+
### TUTOR
31
+
32
+
The extension can be configured via `jupyter_server_config.py` (or any traitlets CLI config):
|`discover_tutor_md`| bool |`True`| When enabled, the extension searches for a `TUTOR.md` file starting from the active notebook's directory and walking up to the server root. The first file found takes precedence over the configured system prompt. |
43
+
|`tutor_md`| str |`""`| Path to a Markdown file used as the system prompt. When empty, falls back to the built-in `TUTOR.md` shipped with the extension. |
44
+
|`debug`| bool |`False`| When enabled, prompts and model replies are logged to `jupyter-ai-tutor` temp directory for debugging purposes. |
45
+
46
+
### Jupyternaut
47
+
48
+
The default model and API key used with Jupyternaut agent can be setup via `jupyter_server_config.py` (or any traitlets CLI config):
0 commit comments