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

# Vocabulary

> The terms ladyGraph uses, defined once.

These definitions come from the project's `CONTEXT.md`. The code and the other pages use the terms in these senses. A term marked *Avoid* has a different meaning elsewhere, so use the listed word instead.

## Ingestion

> [accordion] Source
>
> A system ladyGraph reads from, such as a database table, a config store or a folder of files. Each source has exactly one [Shape](#shape). *Avoid:* connector, input.

> [accordion] Document
>
> The only form in which knowledge reaches the extractor: a whole, addressable unit of text plus its metadata. A database passage, a config section and a skill each arrive inside a Document. A row with no Document is not knowledge. *Avoid:* record, row, fragment.

> [accordion] Valid
>
> A Document that is in force: published, active, and within its validity period. Only Valid Documents are indexed, searched and referenced.
>
> A Document stops being Valid when it expires, is archived, withdrawn or deleted, or is fully replaced by another Valid Document. It then leaves the index, taking with it every concept it alone supported. A Document that is only amended stays Valid. Being Valid decides what exists in the index, not who may see it.

> [accordion] Validity period
>
> From a Document's effective date up to, but not including, the earlier of its expiry date and the effective date of a Document that replaces it, in the system time zone. Without an effective date it starts at publication. Without an end it lasts until replaced or archived.
>
> A Document waiting to take effect is not yet Valid and is not indexed. The end works as a timeout: once it passes, the Document stops counting at that instant, before any cleanup runs. *Avoid:* in use, live, current.

> [accordion] Access label
>
> Metadata on a Document saying who may read it, such as a confidentiality level. ladyGraph carries it on every Document and onto everything derived from it, but never enforces it. Every Document is indexed whatever its label. *Avoid:* permission, security level.

> [accordion] Reader
>
> The system that queries ladyGraph on behalf of an end user, and decides from access labels what that user may see. *Avoid:* consumer, client.

> [accordion] Resolver
>
> Looks up, at search time, what an address points to now, and confirms its evidence. It is separate from the source: a source feeds the index in batches, while a resolver serves search requests, many addresses at once. When it cannot answer in time, the hit is still returned, marked unconfirmed. It is never asked about a Document the reader has not cleared.

> [accordion] Fingerprint
>
> A hash standing in for a piece of source text. ladyGraph keeps fingerprints, addresses and concepts, never the source text itself.

> [accordion] Evidence
>
> What shows a concept is grounded: an address, plus where the supporting words sit in that passage (start and length) and their fingerprint.
>
> Positions and fingerprints are taken on the passage as written, normalized only faithfully: Unicode NFC, with runs of whitespace collapsed. Case, diacritics, punctuation, digits and symbols are kept, because "résumé" and "resume", "70%" and "70", and "≤" and "≥" are different rules. The lossy normalization used to match user words is never used for evidence.
>
> Evidence is confirmed by hashing at that position, or anywhere in the passage if the words moved. If the words are found nowhere, the evidence is stale. *Avoid:* quote, because a quote is source text, which ladyGraph never keeps.

> [accordion] Document version
>
> Made from three parts: the file version, the metadata version, and the passages version (built from each passage's fingerprint). Comparing the parts shows what changed, so only that is redone. New metadata re-opens context choices. Changed passages are re-extracted, while unchanged ones keep their pinned choices. A Document still being processed has no version yet and is skipped.

> [accordion] Change unit
>
> The part of a source that changes and is replaced as a whole: one document, one config section, one skill. *Avoid:* group, batch.

> [accordion] Shape
>
> How a source's items become Documents. There are three.
>
> * **Assemble:** many source items form one Document, such as a document's passages plus its metadata.
> * **Decompose:** one source item yields many Documents, such as a long knowledge file yielding one per section.
> * **Map:** a source item adds no content to mine. Its meaning is the existing concepts or tasks it is bound to. Human config and skills are mapped.

> [accordion] User word and document word
>
> A **user word** is a word or phrase an end user types that the Documents do not use, such as "laptop" or "car pool". A **document word** is the word the Documents actually use for the same thing, such as "notebok computer" (as OCR'd) or "carpool scheme". *Avoid:* alias for a user word, and term or canonical name for a document word.

> [accordion] Glossary entry
>
> A human-declared mapping from one or more user words to one document word, optionally with a note. It is mapped, one entry per change unit, and the mapping runs one way only, from user to document. It never creates a concept. It adds its user words to the concept that holds its document word.

> [accordion] Skill and serves
>
> A **skill** is a whole instruction that is useful only in a context: when answering about certain concepts, or when doing a task that needs certain domain knowledge. It is never decomposed. It arrives as one Document, and its "use when" text is the evidence for what it **serves**. *Serves* is the link from a skill to a concept or task it applies to, grounded in a quote from the skill's own "use when" text.

## Indexing

> [accordion] Concept
>
> One meaning of a word in a context, grounded in at least one Document. It holds every word for that meaning: the document words found in Documents and the user words added by glossary entries.
>
> The same word in two contexts is two concepts. "Apex" in a travel-expense policy is not "Apex" in a car-loan policy. *Avoid:* term, entity, node.

> [accordion] Concept id
>
> A concept's permanent identity, opaque and never reused. Everything inside ladyGraph refers to a concept by it. A concept also has a readable path, which changes when its context is renamed or split. *Avoid:* path, because the path is where it is now, not who it is.

> [accordion] Redirect
>
> What a concept or context leaves at its old path when it moves, pointing to the new path, so old links still lead somewhere.

> [accordion] Context
>
> The setting that gives a word its meaning. Two occurrences of a word belong to the same concept only if they share a context. The extractor decides each occurrence's context, guided by its Document's metadata (topics, document group, document type) and by the section the occurrence sits in.

> [accordion] Level
>
> A layer of the concept hierarchy, coarse at the top and finer below. The top is the scope (a domain), which is never crossed. Every candidate at a level shares a parent. A word is placed by settling its meaning one level at a time, choosing among siblings only, so ambiguity is always between siblings.
>
> Depth is open, as in an OKF bundle. A domain is the bundle root, a context is a directory that may hold child contexts, and a concept is a file in its context's directory.

> [accordion] Context registry
>
> The list of contexts known in a scope. Each context has a permanent opaque id, a label and a description that people may edit, and the metadata its occurrences came from.
>
> When the extractor places an occurrence, candidates are narrowed by metadata and ranked by meaning. The extractor reuses one if it fits, and creates a new draft context only if none does. The choice is pinned, so a rebuild repeats it. *Avoid:* topic list, taxonomy, which are human config that only guides it.

> [accordion] Group
>
> A cluster of similar concepts formed during indexing, such as credit-limit knowledge drawn from several skills and documents. It can span many documents and skills. Use it only for clustering, never for a change unit.

## Resolved ambiguities

* **Group versus change unit.** The unit of change is a change unit. Group means clustering only.
* **Where a context comes from.** The extractor decides, with metadata and section as guidance.
* **Drafts.** An access label says who may read true knowledge. A draft is not confirmed knowledge yet, so only Valid Documents are indexed.
* **Same word in different domains.** Domains are separate scopes, so they never compete. Ambiguity exists only between siblings at one level.


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