﻿# lm-eval few-shot chats: conversational examples change the evaluated prompt

Audit how lm-eval turns demonstrations into chat messages, applies system instructions and handles target spacing before comparing instruction-tuned models.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-lm-eval-fewshot-multiturn-conversation-construction/
Language: en

## Describe the demonstration format

Few-shot evaluation is not specified completely by the number of examples. Demonstrations can appear inside a single text prompt or as alternating conversation turns. The [interface documentation](https://github.com/EleutherAI/lm-evaluation-harness/blob/main/docs/interface.md) describes the chat-template and few-shot conversation options. In the current documented interface, applying chat formatting enables conversational few-shot presentation unless disabled. Record the effective setting rather than inferring it from a command copied from an older installation.

## Inspect roles before inspecting scores

The [model integration contract](https://github.com/EleutherAI/lm-evaluation-harness/blob/main/docs/model_guide.md) includes template application and tokenizer identity. A conversation's role markers, system instruction and final assistant prefix can affect what the model is being asked to continue. Inspect the rendered input for a representative sample. Check whether examples are complete user–assistant exchanges, whether the test answer is withheld and whether the generation prompt starts at the intended assistant position instead of continuing a demonstration.

## Check the answer boundary separately

The [chat delimiter note](https://github.com/EleutherAI/lm-evaluation-harness/blob/main/docs/chat-template-readme.md) documents a change to target delimiter handling when templates are applied to likelihood and multiple-choice requests. Do not repair apparent spacing by adding an extra separator without examining the produced sequence. A template may already supply the necessary structural boundary. Such edits can alter the continuation's tokens even when the displayed question and answer choices look unchanged to a human reader.

## Keep prompt variants out of weight comparisons

If conversational demonstrations outperform flattened text, the result supports a claim about the tested prompting configuration. It does not isolate a change to model weights. When comparing checkpoints, hold demonstration identities, ordering, system instruction and chat formatting fixed where the model interfaces permit it. Where templates must differ, disclose that boundary. A shared benchmark label does not erase differences in the actual sequence delivered to each model's tokenizer.

## Retain a readable prompt audit

Save representative rendered conversations with the run configuration and protect any nonpublic evaluation examples appropriately. For a format migration, compare both versions on the same diagnostic samples before running the complete task. The guides to [task revision control](/journal/data-guide-lm-eval-task-config-revisions/) and [continuation-token alignment](/journal/fg2-lm-eval-continuation-token-boundary-likelihood/) explain related controls. Publish the effective conversation construction alongside scores so later readers can distinguish a prompting change from a capability change without guessing how examples entered the model.
