﻿# DeepEval conversational RAG: attach retrieved evidence to the turn that used it

Preserve turn-level retrieval and tool lineage in DeepEval conversations, separating static reference context from the evidence actually available during each answer.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-deepeval-conversation-turn-retrieval-context-lineage/
Language: en

## Preserve the evidence available at answer time

A conversation can contain a correct final answer even though an earlier claim was unsupported when made. DeepEval's [multi-turn case reference](https://deepeval.com/docs/evaluation-multiturn-test-cases) supports assistant-turn retrieval and tool information. Preserve that timing when preparing evaluation records. Flattening all retrieved material into a conversation-wide pool can make evidence obtained later appear to support an earlier answer, changing the meaning of a grounding assessment without changing any response text.

## Separate ideal context from runtime retrieval

The [single-turn documentation](https://deepeval.com/docs/evaluation-test-cases) distinguishes static reference context from actual retrieval results. These fields serve different purposes even when their text overlaps. A curated relevant passage describes what should be available; a runtime passage describes what the application actually returned. Do not populate both automatically from the reference collection, because that removes the retrieval behavior the evaluation was supposed to observe and can hide a failure to find supporting evidence.

## Keep turn roles and sources intact

The conversational reference assigns retrieved context and called tools to assistant turns. Keep their source identity and relationship to the answer rather than attaching every artifact to whichever turn is easiest to serialize. A tool result available after an answer cannot justify that answer's earlier factual claim. Similarly, a user assertion is not automatically verified knowledge. Preserve roles so the evaluator can distinguish what the application retrieved, what the user said and what the model added.

## Choose a metric that reads the intended fields

The [metric guide](https://deepeval.com/docs/metrics-introduction) describes metric inputs and measurement behavior. A conversational style check and a grounding check need different evidence. Verify the selected metric's requirements for the installed version and inspect the actual judge input where available. A rich conversation object does not guarantee that every populated field participates in every score. Document the fields used instead of treating stored metadata as proof that the metric considered it.

## Test a changed retrieval history

Create paired diagnostic conversations with the same answer text but different evidence availability. Check whether the grounding assessment changes for the intended reason, while unrelated style judgments remain interpretable. The guides to [RAG metric boundaries](/journal/ragas-retrieval-faithfulness-metric-boundaries/) and [conversation isolation](/journal/fg2-promptfoo-conversation-id-history-isolation/) provide related controls. Accept the record when each claim can be assessed against the evidence actually available at its turn, preserving the difference between a knowledgeable reference dataset and a successful runtime retrieval process.
