liveBook · Manning

Degradation

As explained in Building Reliable AI Systems

A decline in the quality of a system's outputs compared with an earlier or expected level.

LLM response quality can decline gradually after model updates, prompt changes, or shifts in user behavior. Because responses may still sound reasonable, manual checks can miss systematic problems until they affect user satisfaction or trust. section 10.5.3 section 10.5

Monitor for quality changes with complementary checks:

  • Run a curated set of known-good questions regularly, checking for required information and response constraints. section 10.5.3
  • Score response characteristics automatically and alert when quality patterns change. section 10.5.3
  • Compare candidate models or prompts with production responses through asynchronous shadow tests before deployment. section 10.5.3

Support responses

A password-reset check can flag answers that omit the email link or exceed a length limit. A model update that causes these failures to appear more often signals a quality change worth investigating. section 10.5.3

GOLDEN_TESTS = [                                         #1
    {
        "question": "How do I reset my password?",
        "expected_elements": ["email link", "account settings", "24 hours"],
        "quality_criteria": {
            "max_length": 200,
            "must_include": ["reset", "password"],
            "tone": "helpful"
        }
    },
    {
        "question": "What's your refund policy?",
        "expected_elements": ["30 days", "original payment method"],
        "quality_criteria": {
            "max_length": 150,
            "must_include": ["refund", "policy"],
            "tone": "professional"
        }
    }
]

def run_quality_check(llm):                         #2
    results = []
    for test in GOLDEN_TESTS:
        response = llm.generate(test["question"])
        score = evaluate_response(response, test["quality_criteria"])
        results.append({"test": test["question"], "score": score})    
    return results

Example golden tests specify expected answer elements and criteria such as maximum length, required terms, and tone. section 10.5.3

How Building Reliable AI Systems covers it

How deep it goes
Details golden-dataset checks, automated scoring, and asynchronous shadow testing without specifying a complete evaluation system.
Examples
Uses password-reset response checks and parallel candidate-model comparisons to illustrate quality changes.
What it assumes
Assumes a production LLM whose responses can be tested; establishes no specific technical background.
What you can do after
Diagnose emerging quality changes by testing response patterns and comparing candidate outputs with production responses.
How it connects
Connects quality degradation with LLM testing, quality monitoring, automated testing, and shadow testing.

Also explained in

Compare how 5 books explain degradation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Reliable AI Systems. The section links point to the parts of the book it draws on.