> ## 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.

# Prompt and glossary

> Set the wording of the extraction prompt and the translator's term list.

What differs between deployments is wording and vocabulary, not logic, so it is config. Two things carry it, both in `ladygraph.yaml` or in files it names. The code stays the same.

## The extraction prompt: `prompt:`

The prompt is fixed, and a `prompt:` section fills in the domain wording. With no section, the default names no domain and no language ("You index documents."). `docs/prompt.example.yaml` in the repository is a finance deployment's version.

```yaml theme={null}
prompt:
  domain: Vietnamese bank policy text          # "You index <domain>."
  word_language: Vietnamese with diacritics
  skip: ['article numbers ("Điều 5")']
  example:                                     # optional few-shot; a type is an ontology type, or @first / @last
    passage: "Điều 9. Mức chi hội thảo tối đa 2 triệu đồng/người, do Phòng Hành chính duyệt."
    candidates:
      - {word: mức chi hội thảo, type: "@first", description: Maximum spend per person at a seminar., quote: Mức chi hội thảo tối đa 2 triệu đồng/người}
  pick: {domain: Vietnamese bank policies, label_language: Vietnamese, label_example: Chi phí tiếp khách}
```

| Key | What it sets | Default |
| - | - | - |
| `domain` | What the documents are. | `documents` |
| `concept_hint` | What counts as a concept. | Something a reader could search for, of one of the concept types. |
| `word_language` | How a concept's word is written. | The document's own language and spelling, keeping diacritics. |
| `description_language` | The language of descriptions. | Left to the model. |
| `skip` | One "Skip ..." line each. | Article or section numbers and headings, and anything only mentioned. |
| `extra` | Free text added after the rules. | None. |
| `example` | A few-shot example: `passage`, `candidates` (word, type, description, quote), and optional `relations`. | A short English example. |
| `pick` | The topic-placement prompt: `domain`, `label_language` and `label_example`. | Follows `domain`. |
| `contact_note` | The fixed note added to a concept whose evidence is a contact sentence. | The earlier English wording. |

* A typo in a key is an error, not a setting that is silently ignored.
* An example that names a type the ontology does not have is left out with a warning, so the model is never shown a type it may not use.
* The text is inserted into the prompt and never run through `str.format`, so braces in your wording are safe.
* Concepts are stamped `llm-okf/<model>/p2`, plus `-<8 hex digits>` when the config differs from the default, so a concept says which wording produced it.

In code, `load_prompt(path)` reads the section, and `LlmOkfExtractor(llm, prompt=...)` takes it. Without the argument, the default is used.

## The term list: `glossary.yaml`

The translator's glossary lists source-language terms and the English the model must use. The [term-list builder](https://ladygraph.io.vn/guides/term-list-builder.md) proposes entries, and a person approves them. The format is on [Configure a project](https://ladygraph.io.vn/guides/configure-a-project.md#glossary-yaml).

An entry carries optional metadata:

| Field | Meaning |
| - | - |
| `vi`, `en` | The term and its rendering. |
| `expect` | Lower-case stems that must appear in the English. Optional: it defaults to the `en` text. |
| `ok_if`, `contamination` | Stop a glossary word from being copied into an unrelated sentence. |
| `status` | `approved` (the default) or `proposed`. |
| `kind`, `confidence`, `source` | `public` or `internal`, then `high`, `medium` or `low`, then where the English came from. Informational. |

The gate enforces only `approved` entries. A `proposed` entry is shown to the model as a hint and never rejects a translation, so a term nobody has read yet cannot break good output. Files without `status` behave as before.


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