﻿# LongBench v2 evaluation: answer extraction, context modes and skipped outputs

Inspect the released LongBench v2 prediction script to separate full-context, retrieval and no-context runs and retain the true evaluation denominator.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/data-guide-longbench-v2-deep-context/
Language: en

## The dataset targets deeper long-context tasks

LongBench v2 uses multiple-choice questions across realistic long-context categories, including document, dialogue, repository and structured-data understanding. Its record schema includes domain, difficulty and length categories alongside context, choices and answer.

Keep those fields when constructing a local run. They support diagnostic slices and distinguish the new task construction from the original LongBench suite. A multiple-choice format does not make a context-heavy question equivalent to a short closed-book knowledge test.

## Context modes change the available evidence

The released prediction script supports full context, retrieved chunks and a no-context mode. The retrieval path selects chunks and orders them using their source indices. These variants present different evidence to the model and should remain separate result populations.

Name the retrieval artifact and selection policy when applicable. A strong retrieval-mode result can reflect the retriever as well as the reader. A no-context result can expose prior knowledge or other shortcuts, but is not a direct substitute for the full-context task.

## Answer extraction has a concrete surface contract

The inspected script extracts a choice from particular answer phrasings and removes formatting markers before matching. It also supports a reasoning mode with a later answer-extraction call. A correct choice expressed outside the expected form can therefore fail the parser.

Preserve raw responses and parsed choices. Report invalid formatting separately when diagnosing errors, without silently awarding correctness through a different undocumented rule. If an adapter changes the contract, validate and version that change.

## Truncation and output files need explicit provenance

The script limits prompts according to model configuration and can keep beginning/end token segments. Its saved context field is abbreviated, so that output field alone cannot reconstruct the full model input. Preserve the source revision and effective prompt elsewhere in the experiment artifacts.

The script can skip records after empty generation results. Reconcile output identifiers with intended dataset identifiers before computing coverage. A shorter result file is not automatically a complete run over an easier subset.

## Reasoning budget belongs beside accuracy

The paper studies deeper understanding and reasoning rather than only finding one isolated string. Compare direct-answer and reasoning settings with their actual generation budgets and number of calls visible. More computation changes the system being evaluated.

A proposed report records dataset slice, context mode, prompt policy, parser, missing identifiers and budget. This article performs no benchmark and names no current winner. Its purpose is to keep apparently simple multiple-choice accuracy connected to the data and execution choices that produced it.

## Primary references

[LongBench v2 research](https://arxiv.org/abs/2412.15204).

[LongBench v2 prediction implementation](https://raw.githubusercontent.com/THUDM/LongBench/main/pred.py).

[LongBench v2 curator dataset](https://huggingface.co/datasets/zai-org/LongBench-v2).

Related explanations: [Full-input provenance](/journal/document-markdown-json-provenance/); [Retrieved context and overlap](/journal/rag-chunk-overlap-duplicate-evidence/).
