Skip to main content

Knowledge Domain Database - LLM Ops

How does the domain work before writing a line of code? Choose a document from the left tree: each page explains part of the model.

Business Rules - LLMOps

This document lists the fundamental business rules of the LLMOps domain (operating LLM-based applications), identified by a unique BR-NNN code. Each rule is technology-independent and describes an invariant constraint on the operational lifecycle.

---

BR-001 - Every production Prompt is versioned and immutable

Code: BR-001 Name: Immutable prompt versioning Description: Every Prompt released to production must have an immutable, identifiable PromptVersion. A change to the prompt text does not overwrite the existing version but creates a new one. Every InferenceRequest records the PromptVersion used. Rationale: Reproducibility, rollback capability and attribution of a regression to a specific prompt version. Priority: HIGH Actors: Prompt Engineer, Deployment Manager Violation: a deploy that mutates an existing prompt without a new version is rejected by the pipeline. Traceability: INV-01; prompt-release.md.

---

BR-002 - No promotion without a passing evaluation

Code: BR-002 Name: Mandatory quality gate before release Description: A PromptVersion or ModelDeployment cannot be promoted to production without passing an EvaluationRun on the evaluation Dataset with metrics above the defined thresholds (faithfulness, correctness, cost, latency). Rationale: Avoid undetected quality regressions; offline evaluations precede real traffic. Priority: CRITICAL Actors: Evaluator, Deployment Manager Violation: the release is blocked; EvaluationFailed is emitted. Traceability: evaluation-run.md; INV-02.

---

BR-003 - Full traceability of every inference

Code: BR-003 Name: Logging of input, output and metadata for every request Description: Every InferenceRequest must record: prompt version, model, sampling parameters, input/output tokens, latency, cost, and (where applicable) the retrieved context chunks. Sensitive data must be masked in the logs. Rationale: Observability, debugging, cost attribution and regression analysis. Priority: HIGH Actors: Observability, Application Service Traceability: INV-05; inference-serving.md.

---

BR-004 - Guardrails on input and output of every inference

Code: BR-004 Name: Security filtering on prompt and completion Description: Every untrusted input and every model output must pass through the Guardrails for detection of prompt injection, PII, harmful content and malformed output before delivery to the user or to downstream systems. Rationale: Defence against prompt injection, data leakage and inappropriate content. Priority: CRITICAL Actors: Guardrail, Application Service Traceability: OWASP LLM Top 10; INV-04.

---

BR-005 - Cost and latency budget for every request

Code: BR-005 Name: Operational cost and response-time limits Description: Every InferenceRequest must operate within a defined token budget and latency threshold. Requests exceeding the limits are truncated, routed to a smaller model or rejected, never left free to consume unlimited resources. Rationale: Cost control and latency SLA compliance. Priority: HIGH Actors: Application Service, Deployment Manager Traceability: INV-03; inference-serving.md.

---

BR-006 - The RAG corpus maintains freshness and provenance

Code: BR-006 Name: Re-indexing and source traceability Description: The knowledge Dataset (RAG corpus) must be re-indexed when sources change, and every chunk must keep the source reference and the indexing date. Grounded answers cite the source. Rationale: Avoid answers based on stale information (corpus drift) and ensure verifiable grounding. Priority: HIGH Actors: Data Engineer, Retriever Traceability: evaluation-run.md; INV-06.

---

BR-007 - Drift detection and alerting

Code: BR-007 Name: Continuous quality monitoring in production Description: The system must monitor quality metrics in production (hallucination rate, response distribution, user feedback, latency, cost) and raise a DriftAlert when they deviate beyond threshold from the baseline. Rationale: Detect quality degradation due to model, data or usage-pattern changes. Priority: HIGH Actors: Monitor, Observability Traceability: evaluation-run.md; INV-07.

---

BR-008 - Fast rollback to a known-good version

Code: BR-008 Name: Reversibility of every release Description: Every ModelDeployment or PromptVersion in production must be restorable to a previous known-good version without rebuilding, within SLA-compatible time. Previous versions remain available for rollback. Rationale: Limit the impact of a regression detected in production. Priority: HIGH Actors: Deployment Manager Traceability: BR-001; prompt-release.md; INV-01.