Papers
Topics
Authors
Recent
Search
2000 character limit reached

CopyPasteLLM: Grounded Response Generation

Updated 15 July 2026
  • CopyPasteLLM is a retrieval-augmented generation framework that uses high copying of provided evidence to enhance contextual faithfulness and mitigate hallucinations.
  • The framework employs three prompting methods—CP-Order, CP-Link, and CP-Refine—to balance evidence reuse, readability, and query relevance.
  • Empirical results demonstrate significant improvements in accuracy on faithfulness benchmarks, achieving up to 24.5% gains using only 365 training samples.

CopyPasteLLM is a Retrieval-Augmented Generation-oriented LLM training framework that mitigates hallucinations by explicitly preferring responses with a high copying degree from the provided context. Rather than treating copying as a defect, it treats context reuse as a mechanism for contextual faithfulness: the model is obtained through two-stage high-copying response preference training, and is designed to reduce reliance on parametric knowledge when the task requires grounded answering from external evidence (Long et al., 1 Oct 2025).

1. Concept and problem setting

CopyPasteLLM addresses a specific failure mode of RAG systems: contextual faithfulness remains challenging because LLMs may not consistently trust provided context, leading to hallucinations that diverge from the retrieved evidence. The framework is motivated by settings in which answers must be grounded, faithful, and attributable, including conflict-heavy contexts and biomedical question answering (Long et al., 1 Oct 2025).

The central design choice is to operationalize faithfulness through copying behavior. In this formulation, a response that directly reuses relevant spans from the supplied context is not merely extractive; it is evidence-bearing. This shifts the training target from generic answer quality toward a preference for answers whose claims can be traced to the prompt context. A plausible implication is that CopyPasteLLM belongs to a class of methods that recast grounding as a generation-control problem rather than solely a retrieval or post-hoc verification problem.

A common misconception is that “copying” here refers to memorized reproduction from pretraining corpora. In CopyPasteLLM, the copied material is the supplied RAG context, not latent training-set content. This distinguishes it from work on memorization and copyright compliance that studies reproduction of training data under prompting (Mueller et al., 2024).

2. Empirical basis: copying degree and hallucination

The empirical premise of CopyPasteLLM is an inverse correlation between response copying degree and context-unfaithful hallucinations on RAGTruth. The reported observation is that higher copying degrees reduce hallucinations by fostering genuine contextual belief (Long et al., 1 Oct 2025).

Copying degree is quantified with two metrics that follow the Newsroom-style formulation:

κ=1AfFf,δ=1AfFf2\kappa = \frac{1}{|A|}\sum_{f \in \mathcal{F}}|f|, \quad \delta = \frac{1}{|A|}\sum_{f \in \mathcal{F}}|f|^2

where κ\kappa is Copy Coverage, δ\delta is Copy Density, AA is the answer, and F\mathcal{F} is the set of copy fragments. Copy Coverage measures the fraction of answer tokens directly copied from the context, while Copy Density emphasizes longer contiguous copied fragments (Long et al., 1 Oct 2025).

This metric choice matters because CopyPasteLLM is not optimized for arbitrary lexical overlap. The framework distinguishes between simple extractiveness and grounded reuse of evidence. In effect, longer contiguous spans serve as stronger signals that the model is anchoring itself in the context rather than paraphrasing from internal knowledge. The paper’s interpretation is that copying reduces hallucination by suppressing unsupported reformulation, especially under knowledge conflict. This suggests that copying degree can function as a controllable proxy for contextual belief in RAG.

3. CopyPaste-Prompting methods

The first stage of the framework, CopyPaste-Prompting, generates high-copying candidate answers from each query-context pair. It uses three prompting methods with progressively different trade-offs among copying degree, faithfulness, and readability (Long et al., 1 Oct 2025).

Method Core operation Stated trade-off
CP-Order Extract complete, relevant sentences and only reorder them Maximizes copying, sacrificing some fluency for faithfulness
CP-Link Add short transition sentences between copied spans Improves readability and logical flow
CP-Refine Iterative writer-reviewer loop with revision Best balances faithfulness, readability, and query relevance

CP-Order implements a strict extractive regime. It extracts complete, relevant sentences from the context verbatim, allows only reordering, and forbids both paraphrasing and new factual content. In the paper’s characterization, this maximizes copying while sacrificing some fluency for faithfulness (Long et al., 1 Oct 2025).

CP-Link relaxes this regime by permitting short transition sentences between copied spans. These transitions are not allowed to introduce new facts; they only “glue” the copied evidence into a more coherent answer. The purpose is to improve readability and logical flow without breaking faithfulness constraints (Long et al., 1 Oct 2025).

CP-Refine is the most elaborate prompting scheme. It uses a writer-reviewer loop in which a writer proposes an answer, a reviewer provides feedback on copying degree, faithfulness, relevance, and fluency, and the writer revises until a composite copy score exceeds a threshold, written as σ(t)θσ\sigma^{(t)} \geq \theta_\sigma. Among the three methods, CP-Refine is reported as the best overall compromise between evidence reuse and answer quality (Long et al., 1 Oct 2025).

These three prompting modes define the data-generation substrate for the later preference-learning stage. A plausible implication is that they also instantiate an internal curriculum: from hard extractive control, to linked extraction, to iterative refinement under multi-objective feedback.

4. Preference construction and training procedure

The second stage converts generated candidates into preference data and then trains the target model to prefer high-copying, context-faithful outputs. For each query-context pair, the framework generates six candidate responses: Base, Attributed, Citations, CP-Order, CP-Link, and CP-Refine (Long et al., 1 Oct 2025).

Candidate responses are filtered using a multi-dimensional criterion set. The reported dimensions are contextual faithfulness, copying degree, query relevance, and fluency. The specific tools named in the pipeline are AlignScore and MiniCheck for contextual faithfulness, κ\kappa and δ\delta for copying degree, embedding similarity for query relevance, and perplexity for fluency (Long et al., 1 Oct 2025).

After filtering, the system applies an Elo-style pairwise LLM-as-judge tournament to rank candidates by hallucination severity rather than by stylistic preference alone. The summary explicitly notes Twist and Causal hallucination types as part of this ranking process. Preference pairs are then constructed automatically. When gold labels are available, gold answers are appended to the best CopyPaste output for positive examples, while negatives are formed by appending wrong answers to other CopyPaste variants. The pipeline produces approximately five preference pairs per sample (Long et al., 1 Oct 2025).

The training step uses Direct Preference Optimization with parameter-efficient fine-tuning through LoRA adapters. The article’s central claim about data efficiency is that strong performance is obtained with only 365 training samples, described as 1/50th of the baseline data requirement (Long et al., 1 Oct 2025). This is one of the method’s defining properties: it does not require a large manually curated hallucination corpus, because its supervision is induced from high-copying candidate generation and automated preference construction.

5. Evaluation results and mechanistic interpretation

CopyPasteLLM is evaluated on RAGTruth, FaithEval, ConFiQA, and PubMedQA. The reported result is best performance in both counterfactual and original contexts on FaithEval, ConFiQA, and PubMedQA, with 12.2% to 24.5% accuracy improvements on FaithEval over the best baseline, while requiring only 365 training samples (Long et al., 1 Oct 2025).

The FaithEval numbers given in the summary are model-specific. For Llama-3-8B, CopyPasteLLM reaches 92.8% versus 80.2% for Context-DPO. For Mistral-7B-v0.2, it reaches 89.3% versus 77.1%. For Llama-3.1-8B, it reaches 92.6% versus 68.5%. The same summary notes that GPT-4o scores 47.5% in this comparison (Long et al., 1 Oct 2025). On ConFiQA, CopyPasteLLM is reported to outperform all baselines, with the largest gains on the conflict-heavy MR and MC subsets. On PubMedQA, the summary table reports 91.4% for CopyPasteLLM against 88.6% for the best baseline (Long et al., 1 Oct 2025).

At the prompting stage, all three CopyPaste methods improve contextual faithfulness and reduce hallucinations over strong abstractive and citation baselines, with CP-Refine identified as the best overall variant. This is an important clarification: the framework does not simply maximize copying unconditionally. CP-Order yields the strongest extractiveness, but CP-Refine yields the best balance among faithfulness, readability, and relevance (Long et al., 1 Oct 2025).

Mechanistic analysis is conducted with the Context-Parameter Copying Capturing algorithm. The procedure compares generation with and without context, examines top-KK token probabilities at each decoding step, and separates context-copied tokens from tokens attributable to parametric generation. The reported finding is that CopyPasteLLM shows significantly stronger and earlier reliance on context tokens, reduced usage and confidence in parametric tokens, and hidden-state separation in which contextual knowledge representations remain unchanged compared to the base model while parametric representations and their influence are suppressed (Long et al., 1 Oct 2025). The paper interprets this as evidence that CopyPasteLLM recalibrates reliance on internal parametric knowledge rather than external knowledge during generation.

6. Position within the broader copying literature and open questions

CopyPasteLLM is part of a broader body of research that treats copying not as a single pathology but as a structural property of LLM inference. In CopySpec, copying is exploited for inference acceleration: repeated sequences in chat history or context are speculated and verified, yielding speed-ups without compromising output quality and without requiring additional GPU memory (Dumitru et al., 13 Feb 2025). In that setting, copying is an efficiency primitive. In CopyPasteLLM, by contrast, copying is a faithfulness primitive.

Related work on context traceback studies a different but adjacent problem: identifying which context segments are responsible for an LLM output. TracLLM develops context traceback for long-context models to support debugging, forensic analysis, and trust-building (Wang et al., 4 Jun 2025). A plausible implication is that CopyPasteLLM and TracLLM are complementary: one encourages grounded reuse, while the other helps locate the context segments that contributed most to the final output.

Copying is also a security surface. Copy-Guided Attacks show that reasoning-capable LLMs can be manipulated through carefully crafted triggers embedded in code, exploiting the model’s tendency to copy tokens from prompts into its reasoning traces (Li et al., 22 Jul 2025). This creates an important caveat for CopyPasteLLM: stronger copying behavior can improve contextual faithfulness in benign RAG settings, but copying bias is not universally beneficial. Its utility depends on the trustworthiness of the provided context.

The main internal trade-off documented by CopyPasteLLM is already visible in its prompting variants. CP-Order maximizes copying but may sacrifice fluency, whereas CP-Refine best balances faithfulness, readability, and query relevance (Long et al., 1 Oct 2025). This suggests that the relevant optimization target is not maximal copying in isolation, but high-copying behavior subject to constraints on answer usefulness. In that sense, CopyPasteLLM is best understood not as a purely extractive model, but as a preference-trained grounded generation framework that uses copying as its principal control signal.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to CopyPasteLLM.