← Lab

Paper 001 · LLM Pipelines · Tooling

Show the Rubric Before You Ask for the Work

Quality Contracts as a Prevention Layer in LLM Generation Pipelines

Por Ramón Labbé · publicado abril de 2026

Abstract

Multi-stage pipelines for large language model (LLM) generation of structured artefacts — code, documents, specifications — commonly layer a terminal validation step on top of a linear chain of generation prompts. In practice, the generating model encounters the evaluation rubric only at that terminal step, after the artefact is already written. We propose a quality_contract block emitted at the top of every generation stage, carrying the same self-challenge criteria, expected structure, and validation checks the terminal step will use. Measured over the ten built-in archetypes shipped with AgentGuard, the contract adds an average of 1,498 bytes (approximately 374 tokens) per stage response. We argue the token overhead is favourable compared to a single correction cycle on a long artefact, and that the principle — show the rubric at generation time, not only at grading time — generalises to other LLM pipelines with declared evaluation criteria.

Tags

aillmpipelinesquality-assuranceagentguard

Citar

@misc{ramónlabbé2026qualitycontracts,
  title  = {Show the Rubric Before You Ask for the Work: Quality Contracts as a Prevention Layer in LLM Generation Pipelines},
  author = {Ramón Labbé},
  year   = {2026},
  url    = {https://papers.rlabs.cl/001-quality-contracts.pdf},
  note   = {RLabs Lab — 001-quality-contracts}
}
Escríbenos por WhatsApp