KLMKnowledge Layers Model
Reading an answer back to its origins.
KLM is an open-source reference model and validation toolchain that treats a language-model output together with its sources, claims, executed procedures and assessment records.
Why KLM?
A fluent answer does not reveal its sources or how it was formed. KLM separates knowledge units, claims, evidence, procedures and assessments, and records their relationships. The deliverable is the text together with a record of its formation.
- Not-known is not zero.
- An unavailable signal is recorded as null with a reason, never filled with zero.
- Claims and evidence are distinct objects.
- Explicit relationship edges state which source supports which claim.
- Record conformance is not answer correctness.
- Recording a process according to the contract does not by itself make the answer true.
How it works
Origin
Parametric
Injected
Function
Declarative
Procedural
Assessment
Metacognitive
Governance
These are not six sequential operations. They are three dimensions for reading a record; the same knowledge can be described along more than one axis.
- Source
- Evidence
- Claim
Conceptual illustration. Procedures and assessments also connect to the record. This is not an experimental result or a live measurement.
Conformance levels
Separate from the layers, these indicate which requirements of the record contract are met.
A level is neither a project completion percentage nor a model accuracy score.
Where is it useful?
- Tracing the source version behind a claim when a policy document changes.
- Detecting a claim marked as supported without an evidence edge.
- Preserving unavailable measurements as nulls with reasons and disclosing record views suited to different readers.
First validation
Install
python -m pip install klm-conformance==0.3.0Clone the repository for examples
git clone https://github.com/omasim/KLM.git
cd KLMValidate an example record
klm-validate schema/examples/attestation-worked-example.jsonExample using the 0.2 record contract
klm-validate schema/examples/attestation-worked-example-0.2.jsonRun these commands in your own Python environment. This page sends no data to a validation service. Test the invalid examples too. Conformance tests the record contract; it does not guarantee answer correctness.
QuickstartReading path
In learning order
KLM: why unknown is not zero
What changes when a missing measurement becomes zero? KLM’s honest-null principle and epistemic states.
A first KLM validation
Run the validator against valid and invalid records, and read the scope of a conformance result correctly.
How does a system know that knowledge has changed?
Source versions, validity, deletion scope, and the trail of outputs derived from old knowledge, through KLM and nage.
One claim, two source versions
A small comparison exercise on reading change through KLM and nage.
What is behind an answer?
On Nage AI OS and SEDIM: knowledge, evidence and the questions we can ask afterwards.
Documents and links
Purpose and model
Implementation
Evidence and change
Status and limits
The checked published package is 0.3.0, the technical specification is working draft v0.3, and the record contract is klm-attestation/0.2. These are separate versions. KLM has not been ratified as a standard.
The evidence pack’s 13 records come from the same team; they are not independent validation. A conformance verdict for a legacy 0.1 record does not establish that it meets the new 0.2 requirements. Record grading can be repeated; the full private implementation harness cannot be reproduced externally.
Conformance levels are not intelligence scores, guarantees of answer correctness or certificates of legal compliance.
The next important test is an independent implementation report using different mechanisms.
Existing project text and dated sources
The project record edited in the administration panel. Its date-pinned links identify the revision used for that text; the directory above uses current repository paths.
A language-model answer raises questions beyond its wording: Where did the knowledge enter? Which evidence supports each claim? Can the system show the procedures it executed and the assessments it made?
KLM — Knowledge Layers Model provides an open-source record contract and validation tools for those questions. It describes an output alongside its knowledge units, claims, evidence, procedures and assessment traces.
Three dimensions, six layers
The layers are not six sequential processing steps. One knowledge unit can occupy several dimensions at once.
- Origin — Where did knowledge enter? Parametric knowledge (L0) and injected knowledge (L1).
- Function — What did it do? Declarative knowledge (L2) and behavioural procedures (L3).
- Reflection — How was generation assessed? Metacognitive assessment (L4) and governance (L5).
A policy document, for example, can enter as injected knowledge. Its evidence can be connected to a particular output claim. Loading a review procedure, triggering it and actually executing it are separate recorded states.
More than a source list
A bibliography alone does not establish which source supports which claim. KLM gives knowledge, evidence, claims and procedures identifiable objects and typed relationships. Output spans can be connected to those objects.
Signals declare one of four epistemic statuses: measured, heuristic, synthesized or unavailable. A measurement, an approximation and a model's interpretation are not presented as equivalent evidence. An unavailable signal is represented by null with a reason.
Open-source tools
The repository contains record and epistemic-vector schemas, Python validators, signing tools, a hash-chained record log and disclosure views for different readers. The verification path is designed to use Python's standard library. Examples include both valid records and adversarial records that must be rejected.
The conformance ladder runs from KLM-0 to KLM-5: declaration, traceability, grounding, reflection, attribution and independent verifiability. These levels describe record structure and evidence infrastructure. They do not grade model intelligence or certify that an answer is true. A well-described record can contain a claim explicitly marked unsupported or contradicted.
The project is published under the Apache-2.0 license.
Status and limits
At the inspected revision, the specification is a v0.3 working draft and the attestation record schema is klm-attestation/0.2. Legacy 0.1 records retain their original rules. Specification, record-schema and toolchain versions are distinct.
KLM is a candidate reference standard, not a ratified standard. The project identifies independently built implementations using different mechanisms as an important next test. Cryptographic integrity, trust in a source and factual correctness also remain separate questions.
Read next
Sources and revision
This article is based on the public repository inspected on 9 October 2026. The links below are pinned to that revision; the project may subsequently change.
Atlas and nage
nage
Explore KLM’s reference implementation context and the related project.
The reference stack is developed by the same team and is not presented as evidence of independent implementation.