LA4KB V3 · guideguía
How an LLM or agent builds the inputCómo arma la entrada un LLM o agente
If an LLM misreads the contract, the load fails. These rules make it pass the first time.Si un LLM lee mal el contrato, la carga falla. Estas reglas hacen que pase a la primera.
- Typed values.
subjectand every scope value are objects with an explicittype:{"type":"label","value":"svc"}. Never bare strings.Valores tipados.subjecty cada valor de alcance son objetos contypeexplícito:{"type":"label","value":"svc"}. Nunca strings sueltos. - Numbers and units.
valueis a JSON number. The unit lives in the predicate name (latency_ms), identical in claim and evidence.Números y unidades.valuees un número JSON. La unidad va en el nombre del predicado (latency_ms), idéntico en afirmación y evidencia. - Citations: one rule. The schema requires
claim.source_idplusoperator_provenancewith the same operator and the samesource_id(ASCII, up to 128 characters); without them the API returns 422. Recommended for traceability: asource_idon every evidence item, pointing to the exact table, page or line.Citas: una sola regla. El esquema exigeclaim.source_idyoperator_provenancecon el mismo operador y el mismosource_id(ASCII, hasta 128 caracteres); sin ellos la API responde 422. Recomendado para trazabilidad: unsource_iden cada evidencia, que apunte a la tabla, página o línea exacta. - Honest authority. Use the cited source's tier (
PRIMARY_SOURCE…UNVERIFIED). Lower tiers alone returnINSUFFICIENT_EVIDENCE.Autoridad honesta. Usá el nivel de la fuente citada (PRIMARY_SOURCE…UNVERIFIED). Los niveles bajos solos danINSUFFICIENT_EVIDENCE. - Never invent; abstain instead. No value without a source. No evidence →
"evidence_items": []→INSUFFICIENT_EVIDENCE. A claim the contract cannot express → do not submit it.Nunca inventar; abstenerse. Ningún valor sin fuente. Sin evidencia →"evidence_items": []→INSUFFICIENT_EVIDENCE. Una afirmación que el contrato no puede expresar → no se envía. - Only known fields. Unknown fields reject 422. Scope keys come from
la4kb.generic.v1.Solo campos conocidos. Los campos desconocidos dan 422. Las claves de alcance salen dela4kb.generic.v1.
For reliable loadsPara cargas confiables
- The system supplies the vocabulary: subjects, predicate names (with the unit inside the name, e.g.
latency_ms) and scope keys come from your application, not from the LLM.El sistema aporta el vocabulario: sujetos, nombres de predicado (con la unidad dentro del nombre, ej.latency_ms) y claves de alcance los define tu aplicación, no el LLM. - The LLM only extracts, with citations: values and the
source_idof the exact passage.El LLM solo extrae, con citas: valores y elsource_iddel pasaje exacto. - When a mapping does not exist, abstain: send nothing, or send
"evidence_items": [].Si un mapeo no existe, abstenerse: no enviar nada, o enviar"evidence_items": []. - The kernel accepts any ASCII predicate name and compares names exactly. Scope dimensions accepted by
la4kb.generic.v1:cluster_size, deployment, enabled, hardware, network_topology, os, region, run, storage, storage_technology, threads, tier, zone.El kernel acepta cualquier nombre de predicado ASCII y compara nombres de forma exacta. Dimensiones de alcance que aceptala4kb.generic.v1:cluster_size, deployment, enabled, hardware, network_topology, os, region, run, storage, storage_technology, threads, tier, zone.
Minimal valid example → SUPPORTEDEjemplo mínimo válido → SUPPORTED
{
"contract_version": "la4kb-v3-typed-candidate-1",
"scope_schema_id": "la4kb.generic.v1",
"client_reference": "llm-guide-example",
"claim": {
"subject": {
"type": "label",
"value": "svc"
},
"predicate": "latency_ms",
"operator": "LE",
"value": 100,
"quantifier": "UNQUANTIFIED",
"source_id": "claim-operator-1",
"operator_provenance": {
"type": "operator_declared",
"operator": "LE",
"source_id": "claim-operator-1"
},
"scope": {
"dimensions": {
"region": {
"type": "label",
"value": "EU"
}
}
}
},
"evidence_items": [
{
"evidence_id": "measurement-1",
"subject": {
"type": "label",
"value": "svc"
},
"predicate": "latency_ms",
"operator": "EQ",
"value": 75,
"authority_tier": "PRIMARY_SOURCE",
"evidence_nature": "INSTANCE",
"source_id": "report-2026-q3-table-2",
"measurement_identity": {
"type": "measurement_id",
"value": "sensor-a"
},
"scope": {
"dimensions": {
"region": {
"type": "label",
"value": "EU"
}
}
}
}
]
}Abstention variant (no evidence) → INSUFFICIENT_EVIDENCE: llm-guide-abstain.json. Try both in the Lab.Variante de abstención (sin evidencia) → INSUFFICIENT_EVIDENCE: llm-guide-abstain.json. Probá ambos en el Lab.
Common mistakes and their 422Errores comunes y su 422
1. Bare string where a typed object is required.String suelto donde se exige un objeto tipado.
"subject": "svc"HTTP 422{"job_id": null, "status": "REJECTED", "engine_build": "v3t-1013d7ecf712",
"error_code": "INVALID_PAYLOAD",
"errors": [{"loc": [], "msg": "Value error, subject requires a declared type", "type": "value_error"}],
"error_count": 1, "hint": "…"}"subject": {"type": "label", "value": "svc"}2. Unit written inside the value.Unidad escrita dentro del valor.
"value": "100 ms"HTTP 422{"job_id": null, "status": "REJECTED", "engine_build": "v3t-1013d7ecf712",
"error_code": "INVALID_PAYLOAD",
"errors": [{"loc": ["claim", "value"], "msg": "Value error, value must be a JSON number, not a boolean or string", "type": "value_error"}],
"error_count": 1, "hint": "…"}"predicate": "latency_ms", "value": 1003. Invented field: there is no unit field.Campo inventado: no existe un campo de unidad.
"unit": "ms"HTTP 422{"job_id": null, "status": "REJECTED", "engine_build": "v3t-1013d7ecf712",
"error_code": "INVALID_PAYLOAD",
"errors": [{"loc": ["claim", "unit"], "msg": "Extra inputs are not permitted", "type": "extra_forbidden"}],
"error_count": 1, "hint": "…"}"predicate": "latency_ms"4. Claim without its citation.Afirmación sin su cita.
(no operator_provenance)HTTP 422{"job_id": null, "status": "REJECTED", "engine_build": "v3t-1013d7ecf712",
"error_code": "INVALID_PAYLOAD",
"errors": [{"loc": [], "msg": "Value error, claim provenance and source_id are required", "type": "value_error"}],
"error_count": 1, "hint": "…"}"source_id": "claim-operator-1",
"operator_provenance": {"type": "operator_declared", "operator": "LE", "source_id": "claim-operator-1"}Copy-paste system promptSystem prompt para copiar
You convert text into LA4KB V3 typed input. Output ONE JSON object and nothing else.
CONTRACT (anything not listed here is rejected with HTTP 422):
- Root keys only: contract_version = "la4kb-v3-typed-candidate-1",
scope_schema_id = "la4kb.generic.v1", claim, evidence_items (max 10),
optional client_reference, optional provenance.
- subject and every scope value are typed objects, never bare strings:
{"type":"label","value":"svc"}. Types: label, git_commit, semver,
integer, boolean, measurement_id, date, date_interval, compound.
label = ASCII [A-Za-z0-9][A-Za-z0-9._-]{0,127}.
- scope = {"dimensions": {...}} with registered keys only: cluster_size,
deployment, enabled, hardware, network_topology, os, region, run, storage,
storage_technology, threads, tier, zone. Optional typed metadata:
software_version, document_revision, measurement_window, commit,
build_number, release_label.
- Numbers: "value" is a JSON number. There is no unit field: put the unit
in the predicate name (e.g. "latency_ms") and use the SAME predicate in
the claim and in every evidence item.
- operator: EQ, NE, LT, LE, GT, GE or RANGE. RANGE uses
"range_bounds": [low, high, low_inclusive, high_inclusive] instead of
"value". INSTANCE and STATISTIC_AGGREGATE evidence use EQ or RANGE only.
- claim needs: subject, predicate, operator, value|range_bounds,
quantifier (UNIVERSAL, EXISTENTIAL, STATISTICAL, UNQUANTIFIED),
source_id, operator_provenance = {"type":"operator_declared",
"operator":<same operator>, "source_id":<same source_id>}, scope.
Optional: raw_text = the original sentence (claim only).
- each evidence item needs: evidence_id (unique), subject, predicate,
operator, value|range_bounds, authority_tier, evidence_nature
(INSTANCE, STATISTIC_AGGREGATE, THEORETICAL_BOUND, CONSTRAINT), scope,
and source_id = exact citation (document + table/page/line).
Optional: uncertainty (JSON number), measurement_identity
({"type":"measurement_id","value":"..."}).
- authority_tier, strongest first: PRIMARY_SOURCE, EXTERNAL_STANDARD,
OFFICIAL_VENDOR, INDEPENDENT_BENCHMARK, CANDIDATE_EXTRACTOR, UNVERIFIED.
Use the tier of the cited source; never upgrade it.
RULES:
1. Never invent a value, unit, subject, source or tier. Every number must
be copied from the cited source_id.
2. If a value is missing, leave that evidence item out. If no evidence
exists, send "evidence_items": [] (LA4KB returns INSUFFICIENT_EVIDENCE).
3. If the claim itself cannot be expressed in this contract (unknown
subject, no unit, a condition, a vague word), do not guess: output
{"abstain": true, "reason": "<which field and why>"} and do not submit it.
4. 422 means your input broke the contract: read "errors[].loc" and fix
that field. A 422 is never a verdict.Field referenceReferencia de campos
| root | contract_version, scope_schema_id, claim, evidence_items (≤10); optionalopcional client_reference, provenance |
|---|---|
| claim | subject, predicate, operator, value | range_bounds, quantifier, source_id, operator_provenance, scope; optionalopcional raw_text |
| evidence | evidence_id, subject, predicate, operator, value | range_bounds, authority_tier, evidence_nature, scope, source_id; optionalopcional uncertainty, measurement_identity |
| operator | EQ NE LT LE GT GE RANGE · RANGE: [low, high, low_incl, high_incl] · INSTANCE / STATISTIC_AGGREGATE: EQ | RANGE |
| types | label git_commit semver integer boolean measurement_id date date_interval compound |
| scope keys | cluster_size deployment enabled hardware network_topology os region run storage storage_technology threads tier zone + software_version document_revision measurement_window commit build_number release_label |
| authority | PRIMARY_SOURCE > EXTERNAL_STANDARD > OFFICIAL_VENDOR > INDEPENDENT_BENCHMARK > CANDIDATE_EXTRACTOR > UNVERIFIED |
Built from the V3 typed contract and the STRUC blind rounds: models abstained instead of inventing, and asked for units, citations and schema IDs to be explicit. This guide makes them explicit. Examples checked against engine build v3t-1013d7ecf712.Basada en el contrato tipado V3 y en las rondas ciegas STRUC: los modelos se abstuvieron en vez de inventar, y pidieron que unidades, citas e IDs de esquema fueran explícitos. Esta guía los hace explícitos. Ejemplos verificados contra el build v3t-1013d7ecf712.