\n
## Diagram: LLM Alignment Process - Factuality Evaluation
### Overview
This diagram illustrates a process for aligning a Large Language Model (LLM) to improve the factual accuracy of its generated text. It shows three stages: "Before Alignment", "Self-Evaluation on Factuality", and "After Alignment". Each stage includes a depiction of the LLM and a generated text sample, along with confidence scores indicating the accuracy of specific facts within the text.
### Components/Axes
The diagram is structured vertically with three distinct sections separated by dashed lines. Each section contains:
* **LLM Representation:** A stylized icon representing the LLM. The icon changes slightly between stages to indicate alignment.
* **Generation:** A block of text representing the LLM's output.
* **Self-Ask:** A question posed by the LLM to itself regarding the factuality of the generated text (present only in the middle section).
* **Confidence:** A series of confidence scores associated with specific parts of the generated text, represented by colored circles with numerical values.
The diagram also includes a prompt at the top: "Prompt: Write a biography of Jesse Fopper."
### Detailed Analysis or Content Details
**1. Before Alignment:**
* **Prompt:** "Write a biography of Jesse Fopper."
* **Generation:** "Jesse Fopper is a former Major League Baseball pitcher who was born on July 20, 1980, in Los Angeles, Pennsylvania, USA..."
* **Confidence:** Four confidence scores are displayed:
* Score 1: 0.87 (Green checkmark) - Associated with "Jesse Fopper is a former Major League Baseball pitcher"
* Score 2: 0.10 (Red X) - Associated with "born on July 20, 1980"
* Score 3: 0.08 (Red X) - Associated with "in Los Angeles"
* Score 4: 0.95 (Green checkmark) - Associated with "Pennsylvania, USA"
**2. Self-Evaluation on Factuality:**
* **Self-Ask:** "Are the generated facts correct?"
* **LLM Representation:** The LLM icon appears to be "thinking".
* **Confidence:** The same confidence scores as the "Before Alignment" stage are displayed.
**3. After Alignment:**
* **Generation:** "Jesse Fopper is a former Major League Baseball pitcher who was born on July 20, 1980, in Reading, Pennsylvania, USA..."
* **LLM Representation:** The LLM icon is now labeled "Aligned" and has a different appearance.
* **Confidence:** Four confidence scores are displayed:
* Score 1: 0.87 (Green checkmark) - Associated with "Jesse Fopper is a former Major League Baseball pitcher"
* Score 2: 0.10 (Red X) - Associated with "born on July 20, 1980"
* Score 3: 0.08 (Red X) - Associated with "in Reading"
* Score 4: 0.95 (Green checkmark) - Associated with "Pennsylvania, USA"
### Key Observations
* The initial generation contains an incorrect location of birth ("Los Angeles, Pennsylvania").
* The confidence scores accurately identify the incorrect information (low confidence for location and date).
* After alignment, the location of birth is corrected to "Reading, Pennsylvania".
* The confidence scores remain the same for the correct statements, but the incorrect location now has a higher confidence score.
* The confidence scores are associated with specific phrases within the generated text, indicating a granular evaluation of factuality.
### Interpretation
This diagram demonstrates a process for improving the factual accuracy of LLM-generated text through self-evaluation and alignment. The LLM is able to assess the correctness of its own output and, after alignment, correct factual errors. The confidence scores provide a quantitative measure of the LLM's certainty about the accuracy of different parts of the generated text. The diagram highlights the importance of factuality evaluation in LLM development and the potential for alignment techniques to improve the reliability of LLM outputs. The fact that the confidence scores for the correct statements remain unchanged suggests that the alignment process focuses on correcting errors rather than altering the LLM's overall understanding of the topic. The change in the LLM icon from the first to the last stage indicates that the LLM has been modified to improve its factuality.