Configuration Reference
This document describes all configuration options for notebook-ta.
File Overview
notebook-ta uses two TOML configuration files:
File |
Purpose |
|---|---|
|
LLM provider settings, default prompts |
|
Exercise definitions and unit tests |
Both files can be loaded from a local path or an https:// URL.
global_config.toml
[llm] — LLM Provider Settings
Key |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
LLM backend: |
|
string |
— |
Model name, or |
|
string |
— |
API endpoint URL |
|
string |
|
API key (optional for local providers) |
|
integer |
|
Request timeout in seconds |
|
float |
|
Sampling temperature (0.0 = deterministic, higher = more creative) |
|
boolean |
|
Enable streaming responses |
When the provider is ollama and base_url points to localhost, notebook_ta.load() checks that
the Ollama server is running and starts it when necessary. It then checks the selected model and
downloads it when missing. Progress is shown directly in the notebook. Remote Ollama servers are
only checked and are never started or modified.
Hardware auto-detection, Ollama setup progress, and the final loaded summary are grouped in one rounded notebook-ta initialization panel with a subtle theme-friendly background.
[[llm.available_models]] — Auto-selection Candidates
Used only when model = "auto". The system selects the model with the highest min_ram_gb whose
requirements are met by the detected hardware.
Key |
Type |
Description |
|---|---|---|
|
string |
Model identifier (e.g. |
|
string |
Human-readable label shown during auto-selection |
|
float |
Minimum system RAM in GB |
|
float |
Minimum GPU VRAM in GB ( |
[prompts] — Default Prompt Templates
Key |
Type |
Default |
Description |
|---|---|---|---|
|
string |
— |
Prompt when all tests pass |
|
string |
— |
Prompt when tests fail, and for all subsequent hint requests |
|
string |
— |
Message shown when LLM is unreachable |
|
integer |
|
Max previous hint exchanges included in context |
Global Unit Test Settings
Key |
Type |
Default |
Description |
|---|---|---|---|
|
number |
|
Maximum wall-clock seconds allowed for each configured unit test. Timed-out tests are cancelled and reported as failures. |
Internationalization
Key |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Language code for notebook-facing messages and labels. Built-in languages are |
exercises.toml
Each exercise is declared under [exercises.<id>].
Exercise Fields
Key |
Type |
Required |
Description |
|---|---|---|---|
|
string |
❌ |
Exercise description passed to the LLM. May be omitted if the statement is embedded in the notebook (see Embedding statements in the notebook) |
|
string |
❌ |
Any other context for the LLM |
|
string |
❌ |
Overrides global |
|
number |
optional |
Overrides the global unit test timeout for this exercise |
|
string |
❌ |
Overrides global |
Note — either
statementin the TOML or a<div id="<id>">block in the notebook markdown must be provided for every exercise. If neither is present,notebook_ta.load()raises aConfigurationError.
[[exercises.<id>.tests]] — Unit Tests
Key |
Type |
Description |
|---|---|---|
|
string |
Human-readable test name |
|
string |
Inline Python function source |
|
string |
Dotted module path for external test |
|
string |
Function name within the external module |
|
list of strings |
Symbols placed in the |
|
boolean |
Export the full notebook namespace as |
Exactly one of code or (module + function) must be specified.
student_symbols and export_student_globals are mutually exclusive.
Example
unit_test_timeout = 5.0
language = "en"
[llm]
provider = "ollama"
model = "auto"
base_url = "http://localhost:11434"
[[llm.available_models]]
name = "llama3.2:3b"
description = "3B model — recommended"
min_ram_gb = 8.0
min_vram_gb = 0.0
[prompts]
on_success = "The student passed all tests. Analyse the solution..."
on_failure = "The student failed tests. Provide targeted hints..."
on_no_llm = "LLM unavailable. Check your Ollama installation."
hint_history_length = 3