liveBook · Manning

Factuality

As explained in Machine Learning Platform Engineering

Factual accuracy is the degree to which generated content agrees with verifiable facts.

Factuality measures whether generated content agrees with verifiable facts. In LLM applications, it is evaluated instead of exact string equality because identical prompts can produce different valid responses. section 13.2 section 12.1.1

Use factuality as part of an evaluation approach that:

  • Assesses semantic correctness and factual accuracy rather than relying on traditional assertions such as expected-string matching. section 13.2 section 12.1.1
  • Accounts for variation caused by sampling strategies, temperature, top-K, and top-P settings when interpreting results. section 12.1.1
  • Combines factuality with adherence to guidelines and safety checks for production validation. section 13.2 section 13.5
Listing 12.1 Parameters that control output randomness
temperature=0.0  #1
temperature=0.7  #2
temperature=1.5  #3

top_k=1 #4
top_k=40  #5
top_k=100  #6

top_p=0.1  #7
top_p=0.9  #8
top_p=1.0 #9

Compare temperature, top-K, and top-P settings to understand how output randomness complicates factuality evaluation. section 12.1.1

How Machine Learning Platform Engineering covers it

How deep it goes
Defines factual accuracy and its evaluation role, but stops short of prescribing a concrete scoring algorithm.
Examples
Contrasts exact assertions with semantic evaluation and relates results to temperature, top-K, and top-P sampling.
What it assumes
Assumes familiarity with LLM prompts and introduces nondeterministic sampling as the reason traditional assertions fail.
What you can do after
Evaluate LLM responses with semantic and factual criteria instead of exact-string assertions.
How it connects
Connects factuality with semantic correctness, guideline adherence, safety, and nondeterministic outputs.

Also explained in

Compare how 2 books explain factuality →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.