> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/academy/tier-2-core-skills/m08-evals-human-review/lab-3-configure-and-validate-online-faithfulness-evaluation.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Lab 3: Configure and validate online faithfulness evaluation

Hands-on lab for lesson 3 of module M08, configure and validate online faithfulness evaluation.

{% @uptiq-training/training-labels content="Module 8 | brand
Lesson 3 of 6 | brand
Lab 3 | success
20 minutes | neutral
Bloom level Apply | neutral" %}

{% @uptiq-training/training-navigator title="M08 Evals & Human Review" content="Lesson 1: Understand the evals framework, offline vs online | soon
Lesson 2: Build and run an offline evaluation dataset | soon
Lab 2: Build and run an offline evaluation dataset
Lesson 3: Configure and validate online faithfulness evaluation | soon
Lab 3: Configure and validate online faithfulness evaluation | current
Lesson 4: Run per-evaluator evaluations and inspect score detail | soon
Lab 4: Run per-evaluator evaluations and inspect score detail
Lesson 5: Review and resolve human review tasks | soon
Lab 5: Review and resolve human review tasks
Lesson 6: Track eval costs and interpret judge vs jury model constraints | soon" %}

## Lab overview

**Exercise title:** Configure and Validate Online Faithfulness Evaluation

**Difficulty level:** Apply / Understand (Bloom Level)

**Estimated hands-on time:** 20 minutes (4 min concept review + 4 min formative check + 12 min hands-on lab)

**What you will build:** You will create a Faithfulness evaluator in Control Center, assign it to the borrower onboarding agent, turn on Online Eval, run a test conversation designed to produce an ungrounded response, and confirm the evaluator scored and flagged that response on the Scores tab.

**Enabling objective:** Configure online Faithfulness evaluation for a production agent to automatically flag agent responses that are not grounded in source documents and tool results, and explain what faithfulness checks detect and their limitations for a compliance audience.

**Prerequisites:**

* The borrower onboarding agent from Module 3 (M03) must exist in your project with a knowledge base attached.
* At least one AI Gateway–enabled judge model must be available in your tenant. If the judge model picker is empty, contact your platform administrator before proceeding.
* You must have access to Control Center → Evals.

## Your sandbox environment

**Environment access URL:** `<provided by your instructor>`

| **Connection detail**              | **Where to find it**                                                                                                      |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Control Center URL**             | Provided by your instructor or in your welcome email                                                                      |
| **Project name**                   | Displayed in the account/project switcher at the top of the console                                                       |
| **Borrower onboarding agent name** | Listed under your project's agents; created in M03                                                                        |
| **AI Gateway–enabled judge model** | Visible in the judge model picker when creating an evaluator — the picker lists only models your organization has enabled |

**Pre-provisioned resources — no setup required:**

* The borrower onboarding agent from M03 is already deployed in your sandbox project.
* A knowledge base containing the borrower onboarding policy document is already attached to the agent.
* At least one AI Gateway–enabled model is available in the tenant for use as a judge model.

## Configuration template

Use this template as a reference when completing Procedure 1. Fill in the fields marked `<YOUR-VALUE>` during the lab.

### New Evaluator — Single Judge

| **Field**                                        | **Value**      | **Notes**                                                         |
| ------------------------------------------------ | -------------- | ----------------------------------------------------------------- |
| **Evaluator name**                               | `<YOUR-VALUE>` | Use a descriptive label, e.g., `Borrower Onboarding Faithfulness` |
| **Framework**                                    | `Single judge` | Do not change — Jury is not used in this exercise                 |
| **Evaluation method**                            | `Faithfulness` | Do not change                                                     |
| **Judge model**                                  | `<YOUR-VALUE>` | Select any model shown in the AI Gateway–enabled picker           |
| **Confidence threshold**                         | `50%`          | Accept the default — do not change                                |
| **Route low-confidence results to human review** | `On`           | Required — turn this on before saving                             |

### Agent Enablement Settings

| **Field**              | **Value**                            | **Notes**                                          |
| ---------------------- | ------------------------------------ | -------------------------------------------------- |
| **Agent**              | Borrower onboarding agent (from M03) | Locate this agent on the Agent enablement tab      |
| **Assigned evaluator** | `<YOUR-VALUE>`                       | The Faithfulness evaluator you just created        |
| **Sampling**           | `100%`                               | Accept the default                                 |
| **Online eval toggle** | `On`                                 | Required — scoring does not start until this is on |

## Step-by-step instructions

### Procedure 1 — Create the Faithfulness Evaluator

{% stepper %}
{% step %}
**Navigate to the Evaluators page**

Navigate to `Control Center → Evals → Evaluators`.

You should see the Evaluators list, which shows all account-level evaluators. If you have not created any evaluators yet, the list will be empty.

{% hint style="info" %}
**Checkpoint:** Confirm you are on the Evaluators page under Control Center → Evals, not under Agent Builder. Evaluators are account-level objects — they are not created inside an individual agent.
{% endhint %}
{% endstep %}

{% step %}
**Open the new evaluator form**

Select New evaluator (or Create evaluator, depending on your tenant's UI label) to open the evaluator creation form.

You should see a form with fields for Evaluator name, Framework, Evaluation method, Judge model, Confidence threshold, and Route low-confidence results to human review.
{% endstep %}

{% step %}
**Enter the evaluator name**

In the Evaluator name field, enter a descriptive label such as `Borrower Onboarding Faithfulness`.

{% hint style="info" %}
**Tip:** Use a name that identifies both the agent and the evaluation method. You may create multiple evaluators across your account, and a descriptive name makes it easier to assign the right one later.
{% endhint %}
{% endstep %}

{% step %}
**Select the framework and evaluation method**

Set Framework to `Single judge`.

Set Evaluation method to `Faithfulness`.

{% hint style="info" %}
**Concept:** Faithfulness measures how much of what the agent said is supported by the context it was given — the retrieved documents, tool results, and what the user said in the conversation. It does not check whether the agent's answer is true in the real world. A factually correct answer that came from the agent's training data rather than the retrieved policy document will fail a Faithfulness check, because the context does not support it. This is the key distinction for a compliance audience: Faithfulness is a grounding check, not a truth check.
{% endhint %}
{% endstep %}

{% step %}
**Select a judge model**

In the Judge model field, select any model shown in the picker.

{% hint style="warning" %}
**Warning:** The picker lists only models your organization has enabled in AI Gateway. If the picker is empty, no judge models are available in your tenant. Stop here and contact your platform administrator — you cannot create a functional evaluator without a judge model.
{% endhint %}
{% endstep %}

{% step %}
**Accept the confidence threshold and turn on human review routing**

Leave Confidence threshold at its default value of `50%`.

Turn on Route low-confidence results to human review.

{% hint style="info" %}
**Concept:** The confidence threshold controls when a result is flagged for human review. When the judge's confidence in its verdict falls below 50%, the result is routed to the Human Review queue — but only if routing is turned on. You are turning it on now so that a low-confidence result from your test conversation will appear in Human Review in a later exercise.
{% endhint %}
{% endstep %}

{% step %}
**Save the evaluator**

Select Save (or Create, depending on your tenant's UI label).

You should see the new evaluator appear in the Evaluators list with the name you entered, the Faithfulness method, and the Single judge framework.

{% hint style="info" %}
**Checkpoint:** Confirm the evaluator appears in the list. If it does not appear, refresh the page. If it still does not appear, repeat Steps 2–7.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 2 — Assign the Evaluator to the Borrower Onboarding Agent

{% stepper %}
{% step %}
**Open the Agent enablement tab**

On the Evaluators page, select the Agent enablement tab.

You should see a list of agents in your project, each with columns for Project, Assigned evaluators, Sampling, and an Online eval toggle.

{% hint style="info" %}
**Concept:** The Agent enablement tab is where you connect account-level evaluators to specific agents. Assigning an evaluator here does not start scoring — you must also turn on the Online eval toggle for that agent.
{% endhint %}
{% endstep %}

{% step %}
**Locate the borrower onboarding agent and open Edit**

Find the borrower onboarding agent row. Select Edit on that row.

You should see the agent's assignment dialog, where you can assign evaluators, set Sampling, and turn on the Online eval toggle.
{% endstep %}

{% step %}
**Assign the Faithfulness evaluator**

In the assignment dialog, select the Faithfulness evaluator you created in Procedure 1.

Confirm Sampling is set to `100%`. If it shows a different value, change it to `100%`.

{% hint style="info" %}
**Tip:** Sampling controls the percentage of live conversations that are evaluated. At 100%, every conversation is scored. In a production environment with high conversation volume, you might lower this to reduce eval model costs — but for this exercise, keep it at 100% so your test conversation is guaranteed to be scored.
{% endhint %}
{% endstep %}

{% step %}
**Turn on the Online eval toggle**

Turn on the Online eval toggle for the borrower onboarding agent.

Select Save to apply the changes.

You should see the borrower onboarding agent row on the Agent enablement tab now showing the Faithfulness evaluator assigned and the Online eval toggle in the on position.

{% hint style="info" %}
**Checkpoint:** Confirm both conditions are true before proceeding:

1. The Faithfulness evaluator is listed in the agent's Assigned evaluators column.
2. The Online eval toggle is on.

If the toggle is off, scoring will not occur — no conversations will be evaluated regardless of Sampling.
{% endhint %}

{% hint style="warning" %}
**Warning:** Assigning the evaluator alone is not enough. The Online eval toggle must also be on. This is the most common setup error in this exercise.
{% endhint %}
{% endstep %}
{% endstepper %}

### Procedure 3 — Run a Test Conversation and Confirm Scoring

{% stepper %}
{% step %}
**Open the borrower onboarding agent and start a test conversation**

Navigate to the borrower onboarding agent in Agent Builder and open the Try agent chat panel.

Send a question that is outside the scope of the uploaded policy document — a question the agent cannot answer from the knowledge base and will likely answer from its general training knowledge instead.

{% hint style="info" %}
**Tip:** Ask about a topic that is plausibly related to borrower onboarding but is not covered in your policy document. For example, ask about a regulatory requirement, a fee structure, or a process step that your document does not address. The goal is to prompt the agent to answer from general knowledge rather than retrieved context.
{% endhint %}

{% hint style="warning" %}
**Warning:** There is a known limitation here (PKB Gap G3): the source documentation does not describe a guaranteed method for producing an ungrounded response from the borrower onboarding agent. If the agent answers from the knowledge base rather than general knowledge, the Faithfulness evaluator may not flag the response. If your first test conversation does not produce a flagged result in Step 14, try a different question that is more clearly outside the document's scope, or run two or three additional conversations to increase the chance of capturing an ungrounded response.
{% endhint %}
{% endstep %}

{% step %}
**Navigate to the Scores tab**

Navigate to `Control Center → Evals → Online Eval → Scores`.

Allow a brief moment for background scoring to complete. The Faithfulness evaluator scores conversations in the background without delaying responses — the score may not appear instantly.

{% hint style="info" %}
**Concept:** Scoring happens off the critical path — if the grading process encounters an error or timeout, it is logged and retried, but the live conversation is never affected. The user never sees a delay because of evaluation.
{% endhint %}
{% endstep %}

{% step %}
**Confirm the evaluator scored the conversation and identify the verdict**

Locate the row for your test conversation. Confirm the Faithfulness evaluator produced a score and identify whether the response was flagged.

You should see at least one scored conversation row showing the agent name, the Faithfulness evaluator, and a verdict.

{% hint style="info" %}
**Checkpoint:** Confirm a scored row appears for the borrower onboarding agent with the Faithfulness evaluator. If no row appears after waiting 1–2 minutes, see the Troubleshooting Quick Reference — the most likely cause is that the Online eval toggle was not on when the conversation ran.
{% endhint %}
{% endstep %}

{% step %}
**Explain the grounding-vs.-truth distinction**

In the free-text field provided by your instructor (or in your lab notes), write one sentence explaining why a factually correct response might still fail a Faithfulness check.

Your answer should capture the core distinction: Faithfulness measures whether the agent's claims are supported by the retrieved context, not whether they are true in the real world. A correct answer that came from training data rather than the policy document is unsupported — and therefore fails — even if the answer is accurate.
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>Fixes for common problems in this lab</summary>

| **Symptom**                                                                          | **Cause**                                                                                                                                                                                           | **Fix**                                                                                                                                                              |
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **No rows appear on the Scores tab after running a test conversation**               | The Online eval toggle was off when the conversation ran — scoring only occurs for conversations that happen after the toggle is turned on                                                          | Return to the Agent enablement tab, confirm the toggle is on, then run a new test conversation                                                                       |
| **Judge model picker is empty when creating the evaluator**                          | No models are enabled in AI Gateway for your tenant                                                                                                                                                 | Contact your platform administrator to enable at least one model in AI Gateway before proceeding                                                                     |
| **The Faithfulness evaluator did not flag the test conversation response**           | The agent answered from the knowledge base rather than general knowledge — the response was grounded, so Faithfulness did not flag it                                                               | Run a new test conversation with a question more clearly outside the scope of the policy document; see the tip in Step 12                                            |
| **The evaluator was created but does not appear in the assignment dialog in Step 9** | The evaluator may not have saved, or a page refresh is needed                                                                                                                                       | Refresh the page and check the Evaluators list; if the evaluator is missing, repeat Steps 2–7                                                                        |
| **The scored row appears but the verdict is not what you expected**                  | The judge model assessed the claims in the response and found them supported (or unsupported) based on the retrieved context at that turn — the verdict reflects grounding, not real-world accuracy | Review the score detail to see the judge's reasoning; this is expected behavior and is a useful teaching moment about Faithfulness limitations                       |
| **A run shows Failed on the Runs tab**                                               | Four possible causes: judge model unavailable, evaluation method not found, evaluation timed out (run stayed Pending or Running for more than two hours), or a scoring error                        | Hover over the Failed status to read the specific reason, then address the named cause (check model availability, check evaluator configuration, or wait and retry)  |
| **No tasks appear in Human Review after a low-confidence result**                    | Either Route low-confidence results to human review was not turned on in the evaluator, or all scored conversations met the confidence threshold                                                    | Check the evaluator configuration and confirm the routing toggle is on; if needed, the confidence threshold can be raised to make more results route to human review |

</details>

## Checkpoints and validation

### Embedded checkpoints (formative)

1. **Evaluator created:** Confirm the Faithfulness evaluator appears in the Evaluators list with the correct name, Single judge framework, Faithfulness method, and Route low-confidence results to human review turned on. If it does not appear, repeat Procedure 1.
2. **Agent assigned and toggle on:** On the Agent enablement tab, confirm the borrower onboarding agent shows the Faithfulness evaluator in its Assigned evaluators column and the Online eval toggle is on. If either condition is false, return to Steps 9–11.
3. **Scored conversation on Scores tab:** Confirm at least one scored conversation appears on `Control Center → Evals → Online Eval → Scores` for the borrower onboarding agent with the Faithfulness evaluator. If no row appears after 1–2 minutes, confirm the toggle was on before the conversation ran, then run a new test conversation.
4. **Grounding-vs.-truth explanation:** Confirm your free-text response captures the distinction: Faithfulness checks whether claims are supported by retrieved context, not whether they are true in the real world.

### Summative Assessment

The following four items assess your understanding of the concepts and procedures in this lesson. Select the best answer for each.

<details>

<summary><strong>Item 1 — EO-2 (Faithfulness limitations)</strong></summary>

An agent answers a borrower's question about the maximum loan-to-value ratio. The answer is factually correct — it matches current regulatory guidance. However, the agent retrieved no documents during that turn and answered entirely from its training data.

What will the Faithfulness evaluator report?

A. Passed — the answer is factually correct, so it is supported.

B. Failed — the answer is not supported by retrieved context or tool results.

C. Skipped — turns with no retrieved context are automatically excluded from scoring.

D. Pending — the evaluator cannot score a turn without retrieved context.

**Correct answer:** B

**Explanation:** Faithfulness measures whether the agent's claims are supported by the context it was given — retrieved documents, tool results, and what the user said. A claim that is true but absent from the context is unsupported. The agent answered from training data, not from retrieved context, so the claims are unsupported and the evaluator will report a failure. (Note: a turn with no retrieved context is not automatically skipped — the judge evaluates whatever the user supplied and reports a lower certainty, but an answer made entirely from training data with no contextual support will be scored as unsupported.)

**Enabling objective:** EO-2

</details>

<details>

<summary><strong>Item 2 — EO-2 (What Faithfulness scores)</strong></summary>

A borrower asks the agent to clarify what "debt-to-income ratio" means. The agent responds with a clarifying question: "Are you asking about the calculation method or the threshold used in your loan product?"

How does the Faithfulness evaluator score this turn?

A. Passed — clarifying questions are always grounded in the conversation.

B. Failed — the agent did not provide a factual answer from the knowledge base.

C. Not scored — questions and clarifications carry no factual claim and are not evaluated.

D. Routed to Human Review — the evaluator cannot determine whether a question is grounded.

**Correct answer:** C

**Explanation:** Faithfulness only scores factual claims. Questions, clarifications, refusals, and statements about what the agent itself is doing carry no factual claim and are not counted either way. This turn contains no factual assertion — it is a clarifying question — so the Faithfulness evaluator does not score it.

**Enabling objective:** EO-2

</details>

<details>

<summary><strong>Item 3 — EO-2 (Where evaluators are defined)</strong></summary>

Where are evaluators defined in the Uptiq Platform?

A. Inside each agent in Agent Builder → Test → Evals

B. At the account level in Control Center → Evals → Evaluators

C. At the project level in Control Center → Projects → Evaluators

D. Inside each agent in Agent Builder → Monitor → Online Eval

**Correct answer:** B

**Explanation:** Evaluators are account-level objects defined in Control Center → Evals → Evaluators. They are not created per agent or per project — one evaluator can be assigned to any agent in the account. The Agent enablement tab on the same page is where you assign evaluators to specific agents.

**Enabling objective:** EO-2

</details>

<details>

<summary><strong>Item 4 — EO-2 (Human Review routing)</strong></summary>

What two conditions must both be true for a result to route to Human Review?

A. The verdict must be Failed, and the evaluator must have Route low-confidence results to human review turned on.

B. The result's confidence must be below the evaluator's confidence threshold, and Route low-confidence results to human review must be turned on.

C. The result's confidence must be below 50%, and the agent's Sampling must be set to 100%.

D. The verdict must be Failed, and the result's confidence must be below the evaluator's confidence threshold.

**Correct answer:** B

**Explanation:** A result routes to Human Review when two conditions are both true: (1) the result's confidence is below the evaluator's confidence threshold, and (2) the evaluator has Route low-confidence results to human review turned on. This can happen even when the verdict is Passed — a passing result with low confidence still routes to human review if routing is on. A Failed result with confidence above the threshold is auto-accepted, not routed.

**Enabling objective:** EO-2

</details>

## Solution reference

<details>

<summary>The completed state of your work</summary>

The following describes the completed state of your sandbox environment after all procedures are successfully executed.

**Evaluators list:** A Faithfulness evaluator (e.g., `Borrower Onboarding Faithfulness`) appears in the account-level Evaluators list with:

* Framework: Single judge
* Evaluation method: Faithfulness
* Judge model: the AI Gateway–enabled model you selected
* Confidence threshold: 50%
* Route low-confidence results to human review: On

**Agent enablement tab:** The borrower onboarding agent row shows:

* Assigned evaluators: the Faithfulness evaluator you created
* Sampling: 100%
* Online eval toggle: On

**Online Eval → Scores tab:** At least one scored conversation row appears for the borrower onboarding agent, showing the Faithfulness evaluator's verdict for the test conversation you ran. If the test conversation produced a response not grounded in the knowledge base, the verdict will indicate the response was flagged (unsupported claims detected). If the response was grounded, the verdict will indicate it passed.

**Free-text explanation (example):** "A factually correct response can still fail a Faithfulness check if the agent answered from its training data rather than the retrieved policy document, because Faithfulness measures grounding in context, not real-world truth."

{% hint style="info" %}
**Tip:** If your Scores tab shows a passing verdict and you expected a failure, this is not necessarily an error — it means the agent retrieved and used the knowledge base to answer your test question. Try a question that is more clearly outside the scope of the policy document to produce an ungrounded response. See PKB Gap G3 in the lesson notes for context on this known limitation.
{% endhint %}

</details>

{% hint style="success" %}
**Lab complete.** Confirm every checkpoint above before you move on.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/academy/tier-2-core-skills/m08-evals-human-review/lab-3-configure-and-validate-online-faithfulness-evaluation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
