liveBook · Manning

Human-in-the-loop

As explained in Generative AI in Action

Human evaluation is the assessment of an artifact or system by people using judgments, observations, surveys, or interviews.

Human-in-the-loop keeps people involved when generative AI outputs need judgment or a consequential decision. A human may evaluate output quality, review and correct generated content, or make the final decision while AI assists. The level of oversight should reflect the risk: a flawed recipe and unsafe instructions for repairing machinery do not have the same consequences. section 1.5 section 13.3.3

For a repeatable evaluation process:

  • Define criteria suited to the application, such as accuracy, fluency, relevance, and bias; give evaluators clear guidelines and rubrics. section 12.5
  • Choose domain experts, trained annotators, or a crowdsourcing platform; provide clear instructions and an interface for collecting judgments. section 12.5
  • Collect enough assessments for meaningful analysis, check interrater agreement, and use the findings to improve training data, model architecture, or prompts. Repeat evaluations to monitor progress. section 12.5

Reviewing generated code

Before deploying AI-generated code, a developer reviews and tests it for bugs, security vulnerabilities, performance, readability, maintainability, and compliance. Surveys or interviews can add human judgments about code quality alongside automated metrics, tests, and debugging. The tool assists; the developer remains responsible for validation. section 5.3.4 section 5.3.5

Human judgment complements rather than replaces automated metrics and task-specific benchmarks: it can catch context, nuance, and bias those measures miss. It also has limits. Reviews cost time and money, and judgments can be subjective; evaluator training, clear rubrics, and appropriate aggregation help make results more reliable. In production, plan how human intervention will be managed and monitored, especially for critical decisions or content requiring review. section 12.0 section 12.5 section 11.1

Table 13.2 Application-level RAI mitigations
Mitigation
Description
Review and edit
Encourage users to critically assess AI-generated outputs, supporting efficient correction and highlighting potential inaccuracies.
User responsibility
Remind users of their accountability for the final content, especially when reviewing suggestions such as code.
Citations
If AI content is reference based, cite sources to clarify the origin of the information.
Predetermined responses
For potentially harmful queries, provide thoughtful, precrafted responses to maintain decorum and direct users to appropriate policies.
Input/output limitation
Restrict input and output lengths to minimize the production of undesirable content and prevent misuse.
AI role disclosure
Inform users they are interacting with an AI, not a human, and disclose if the content is AI generated, which may be legally required.
Bot detection
Implement mechanisms to prevent the creation of APIs over your product, ensuring controlled use.
Anthropomorphism prevention
Anthropomorphism prevention means ensuring that AI systems don’t seem human. It’s about clear communication that AI doesn’t think or feel to avoid confusion and ensure people use AI properly, without expecting it to act like a human. Implement safeguards against AI outputs that suggest human-like qualities or capabilities, reducing misinterpretation risks.
Structured inputs/outputs
Use prompt engineering to structure inputs and limit outputs to specific formats, avoiding open-ended responses.

Application-level mitigations include asking users to review and edit AI output and reminding them of responsibility for final content. section 13.3.3

How Generative AI in Action covers it

How deep it goes
Outlines criteria, evaluator selection, annotation, agreement analysis, and iteration, without specifying a software implementation.
Examples
Uses generated-code review, surveys and interviews, crowdsourced annotation, and critical machinery-repair instructions to illustrate differing oversight needs.
What it assumes
Assumes familiarity with generated outputs and their applications, while introducing evaluation criteria and rubrics explicitly.
What you can do after
Practice/perform it by assessing outputs with rubrics, checking judgment reliability, and retaining human review or final control where risk warrants it.
How it connects
Links human evaluation to automated metrics, prompt engineering, code testing, and responsible AI.

Also explained in

Compare how 17 books explain human-in-the-loop →

Related concepts

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