All notebooks¶
The notebooks in notebooks/ are marimo notebooks. Each one shows one feature working, step by
step. Each page below shows a notebook with the output of its cells, exported when the docs are built.
The steps that need no API key run first. Each step that sends a request to an LLM waits for a button press, so a
notebook never sends a request by accident. The default model needs OPENROUTER_API_KEY: see
Setup and Choosing the model.
| Notebook | What it shows |
|---|---|
| Titanic | An EBM of the Titanic data: the description of a graph and of the whole model, and the graph and text API (from_ebm, simplify, to_text, from_text). |
| Local explanations | One passenger at a time: the facts with no API key, the confidence slider, a check of the guarantees against random completions, and the text for each audience. |
| Custom audiences | Six audiences for the local explanations: subclasses of Layperson, and an Audience with its own rules. |
| Languages | The local explanations in several languages with language=. The facts do not depend on the language. |
| Model providers | The same request to OpenRouter, OpenAI, Anthropic, Ollama and a gateway with an OpenAI-compatible API, and the errors for an unknown provider and a missing key. |
| Multiclass | An EBM of the iris data with three classes: one series for each class, the centring that keeps the predictions, and the classes and normalization options. |
| Model kinds | A binary classifier, a multiclass classifier and a regressor side by side: the graph text and the fields of the local explanations. |
| Model editing | EditSession: smooth a jump, flatten a dip, make a range monotone and neutralize a category, with the report of each edit. |
| MCP server | The real ebaml-mcp server and a client: read a graph, explain a row, edit the model and save it after a confirmation. |
| BAML agent | The BAML agent of the baml command, which answers one question with the tools of the server. |
| Chat | A chat box in front of the ebaml-chat command. |
To open a notebook and run its cells, use marimo edit from a source checkout:
uv run marimo edit notebooks/local_explanations.py # interactive
uv run marimo run notebooks/titanic.py # as an app