> ## Documentation Index
> Fetch the complete documentation index at: https://ladygraph.io.vn/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutorials

> Thirteen lessons that teach ladyGraph one module at a time.

Each lesson is a folder under `ladygraph/tutorial/` with small, readable scripts and a `BRIEF.md` that says what the lesson teaches, what it needs, and what each file does. Read the brief first, then run the script.

> [card] [Get the tutorial code](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial)
>
> Browse every lesson folder, with its scripts and `BRIEF.md`, on GitHub.

## Run a lesson

From the `ladyGraph/` folder, with the environment from the [Quickstart](https://ladygraph.io.vn/quickstart.md):

```bash theme={null}
PYTHONPATH=. python ladygraph/tutorial/01_core/hello_core.py
```

Scripts that call a service read its address from an environment variable. See [Environment variables](https://ladygraph.io.vn/reference/environment-variables.md). None of them write a key into code.

## The lessons

| # | Lesson | What it teaches | Runs with nothing but Python? |
| - | - | - | - |
| 1 | [`01_core`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/01_core) | The vocabulary: addresses, normalization, fingerprints, concept and evidence | Yes |
| 2 | [`02_embedding`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/02_embedding) | Turning text into vectors and ranking passages | Needs the embedding file |
| 3 | [`03_llm`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/03_llm) | One interface for any model: Gemini, a gateway, a local file | Yes (a scripted stand-in) |
| 4 | [`04_sources`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/04_sources) | Reading a database, config or markdown into Documents | `hello_flat_sources.py`: yes |
| 5 | [`05_chunking`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/05_chunking) | Cutting long, messy text into passages with a heading path | Yes |
| 6 | [`06_ner`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/06_ner) | Finding labelled terms in milliseconds with a tagger (GLiNER) | Yes (a stand-in tagger) |
| 7 | [`07_translation`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/07_translation) | Translating with positions, escalating to a stronger model, checking, and a local-model versus Claude experiment | Yes (stand-ins) |
| 8 | [`08_extractors`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/08_extractors) | Calling a model, then turning a Document into concepts with evidence | Needs a model endpoint and a database |
| 9 | [`09_extractor_modes`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/09_extractor_modes) | The three ways to extract concepts, side by side, and how to compare them | Yes |
| 10 | [`10_stores`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/10_stores) | Writing the index to a Flight server safely | Needs the server binary |
| 11 | [`11_decision`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/11_decision) | Choosing between options with a decider | `hello_decisionLite.py`: needs the embedding file |
| 12 | [`12_retrieval`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/12_retrieval) | The whole system: build an index, search it, time it | Needs a database, a model and the embedding file |
| 13 | [`13_authoring`](https://github.com/DTJ-Tran/ladyGraph/tree/initial-import/ladygraph/tutorial/13_authoring) | The [term-list builder](https://ladygraph.io.vn/guides/term-list-builder.md) | Yes (a scripted agent) |

## A suggested path

Read lessons 1, 3, 4 and 5 first. Then read 6 and 7, then 9, which puts lessons 3 to 7 together. Read 8, 10, 11 and 12 when you have the services they need.

Lesson 13 is a side tool. Read it after lesson 7, since the term lists it builds are what the translator uses.

## Lesson length

A lesson script aims to stay under about 100 lines, so a beginner can take it in at once. Lessons 3, 5, 6, 7, 9 and 13 meet that, and a test checks it. The older files were moved into the tutorial as they were, and some are longer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.