Source-linked AI summary

Prompt-Guided Retrieval Augmentation for Non-Knowledge-Intensive Tasks

Zhicheng Guo, Sijie Cheng, Yile Wang, Peng Li, Yang Liu

arXiv:2305.17653v1cs.CL

TL;DR

Retrieval augmentation remains under-explored for many NKI tasks because they require diverse relevance functions while large-index training creates a cost/performance trade-off. PGRA combines a shared static task-agnostic retriever with a prompt-guided task-specific reranker, and experiments show it generally outperforms prior retrieval-augmented methods. Its scope is currently limited to classification and does not cover sentence-pair or generation tasks.

  • Problem

    Retrieval augmentation is under-explored for many NKI tasks, which require diverse relevance functions and create a training-cost/performance dilemma.

    Source: §1 · pp. 1–2
  • Method

    PGRA builds a shared static index with a task-agnostic retriever, then reranks candidates using a prompt-guided PLM and task-specific relevance.

    Source: §1 · p. 2, §2.1 · p. 3, §2.2 · p. 3
  • Results

    PGRA overall outperforms previous state-of-the-art retrieval-augmented methods across diverse NKI tasks.

    Source: §6 · p. 9
  • Takeaways & Limitations

    Prompt-guided retrieval augmentation is effective across diverse NKI tasks and supports task-specific evidence selection without periodic index updates during training.

    Source: §1 · p. 2

    PGRA is restricted to classification tasks and has not been evaluated on sentence-pair or generation tasks.

    Source: Limitations · p. 9

Abstract

from arXiv · show

Retrieval-augmented methods have received increasing attention to support downstream tasks by leveraging useful information from external resources. Recent studies mainly focus on exploring retrieval to solve knowledge-intensive (KI) tasks. However, the potential of retrieval for most non-knowledge-intensive (NKI) tasks remains under-explored. There are two main challenges to leveraging retrieval-augmented methods for NKI tasks: 1) the demand for diverse relevance score functions and 2) the dilemma between training cost and task performance. To address these challenges, we propose a two-stage framework for NKI tasks, named PGRA. In the first stage, we adopt a task-agnostic retriever to build a shared static index and select candidate evidence efficiently. In the second stage, we design a prompt-guided reranker to rerank the nearest evidence according to task-specific relevance for the reader. Experimental results show that PGRA outperforms other state-of-the-art retrieval-augmented methods. Our analyses further investigate the influence factors to model performance and demonstrate the generality of PGRA. Codes are available at https://github.com/THUNLP-MT/PGRA.

1 Introduction

Retrieval augmentation is well studied for knowledge-intensive tasks but remains under-explored for broader NKI tasks, which require diverse relevance functions and create a training-cost/performance trade-off. PGRA addresses these challenges with a two-stage retrieval-and-reranking framework that uses shared static indexing and task-specific prompts.

  • NKI retrieval augmentation remains under-explored beyond language modeling, text generation, and machine translation, despite applications such as sentiment analysis and text classification.Source: §1 · p. 1
  • NKI tasks require diverse relevance functions, such as sentence-level semantic similarity for classification and linguistic similarity for acceptability.Source: §1 · p. 2
  • Jointly updating large external indexes can improve performance but is expensive, whereas static indexes reduce cost while limiting task-specific relevance.Source: §1 · p. 2
  • PGRA first uses a task-agnostic retriever with a shared static index, then applies a prompt-guided PLM reranker using task-specific relevance before reader prediction.Source: §1 · p. 2, Figure 1 · p. 2
  • The framework combines retrieval and reranking with textual prompts to maintain reasonably low training cost while addressing diverse relevance requirements across NKI tasks.Source: §1 · p. 2

2 Methods

PGRA uses a shared task-agnostic retriever to efficiently recall candidates, a prompt-guided reranker to impose task-specific relevance, and a reader to generate predictions. The design separates inexpensive candidate retrieval from task-adaptive reranking before evidence fusion.

2 Methods

  • PGRA has three components: a shared static-index retriever, a prompt-guided PLM reranker, and a reader that uses top-d evidence as augmentation.Source: §2 · pp. 2–3

2.1 Task-Agnostic Retriever

  • The task-agnostic retriever encodes queries and external texts, stores text representations as index keys, and shares the static index across tasks to reduce training cost.Source: §2.1 · p. 3
  • Top-k candidates are selected from softmax retrieval scores and efficiently approximated with FAISS Maximum Inner Product Search before reranking.Source: §2.1 · p. 3

2.2 Prompt-Guided Reranker

  • The prompt-guided reranker addresses task-specific relevance by using few-shot exemplars and manually written task descriptions with an autoregressive PLM.Source: §2.2 · p. 3, Table 1 · p. 3
  • Prompt-guided PLM representations encode task-relevant features for queries and candidates, whose similarities determine reranking and selection of top-d evidence.Source: §2.2 · pp. 3–4

2.3 Reader

  • The FiD reader independently encodes each query-evidence pair, applies decoder cross-attention, and predicts labels after reformulating NKI tasks as language modeling.Source: §2.3 · p. 4

3 Experiments

Experiments evaluate PGRA across four non-knowledge-intensive task types against supervised, few-shot, nearest-neighbour, and retrieval-augmented baselines. PGRA outperforms these baselines across most tasks in both T5-base and T5-large setups.

3.1 Experimental Setups

  • The evaluation covers sentiment analysis, linguistic acceptability, question classification, and subjectivity analysis, using accuracy except Matthew’s correlation for CoLA.Datasets include SST-2, SST-5, CR, MR, MPQA, CoLA, TREC, and Subj.Source: §3.1 · p. 4
  • Baselines include in-context learning, supervised T5, k-nearest neighbour, LM-BFF, RAG, and FiD, with retrieval-augmented methods using the same T5 readers for fair comparison.The setup uses Wiki1M as the external resource, BERT-base-uncased as the shared retriever, OPT-13b as the reranker, and T5 readers.Source: §3.1 · p. 4

3.2 Results

  • Across most tasks, PGRA outperforms supervised and retrieval-augmented baselines in both T5-base and T5-large setups.Table 2 compares the baselines and PGRA under separate T5-base and T5-large settings.Source: Table 2 · p. 5, §3.2 · p. 5
  • PGRA significantly outperforms k-nearest neighbour and few-shot methods, including in-context learning with OPT-13b and LM-BFF.LM-BFF performs better than k-nearest neighbour and in-context learning but remains substantially below PGRA.Source: §3.2 · p. 5

4 Analysis

The analyses link PGRA’s performance to task-specific evidence quality, retrieval-stage settings, reranker capacity, evidence granularity, training cost, and retriever choice. Across these settings, sentence-level evidence and PGRA’s two-stage design show favorable results for NKI tasks.

4.1 Effects of Label Consistency

  • More label-consistent evidence generally corresponds to higher accuracy, with PGRA retrieving more consistent evidence than FiD and approaching 100% accuracy above 13 consistent items.The small groups with 3–4 consistent items can also show high accuracy, but their results are statistically insignificant because few instances belong to those groups.Source: §4.1 · p. 6

4.2 Effects of k and d

  • Larger k consistently improves average performance, whereas larger d produces a relatively stable trend because the top consistent evidence remains unchanged when candidates are fixed.The analysis therefore expects larger first-stage candidate pools to help PGRA when sufficient computing resources are available.Source: §4.2 · p. 6

4.3 Effects of OPT Model Sizes

  • Across five downstream tasks, larger OPT models achieve better performance, and larger models with higher consistency scores result in better performance overall.The authors believe larger OPT models better apply task-specific features to encode representations and obtain more effective task-specific relevance scores for retrieving evidence.Source: §4.3 · pp. 6–7

4.4 Effects of Evidence Granularity

  • Sentence-level external evidence significantly outperforms passage-level evidence across all evaluated NKI tasks.The authors argue that sentences more readily express task-specific signals such as sentiment orientation than paragraphs.Source: §4.4 · p. 7

4.5 Training Cost

  • PGRA builds its 1M-item index once at about 0.5 hours, while refreshed-index models incur approximately c×n×h cost across n refreshes and h tasks.The comparison focuses on index-building and refreshing time because those operations account for a substantial portion of training cost.Source: §4.5 · p. 7

4.6 Generalization on Retrievers

  • PGRA consistently outperforms FiD with BM25, BERT, or SimCSE first-stage retrievers, while BM25 performs worse than the BERT and SimCSE variants.This supports adaptation of the second-stage framework to different retriever types.Source: §4.6 · pp. 7–8

4.7 Case Study

  • In an SST-2 case study, PGRA predicts correctly where FiD and RAG fail because its retrieved sentences align with the input’s negative sentiment orientation.FiD and RAG retrieve lexical or semantic overlaps that lack the sentiment alignment needed for the classification decision.Source: §4.7 · p. 8

5 Related Work

Prior retrieval-augmented work primarily targets knowledge-intensive tasks through retriever–reader systems, while related prompt methods adapt language modeling or retrieval. PGRA instead combines prompt-guided task-specific reranking with a shared retrieval setup for NKI tasks.

Retrieval-Augmented Methods

  • Retrieval-augmented systems commonly use BM25 or trained dual encoders followed by readers, especially for knowledge-intensive question answering requiring explicit knowledge [Izacard and Grave, 2021; Izacard et al., 2022].The section positions PGRA as targeting fine-grained textual information for non-knowledge-intensive tasks without training a separate retriever for each task.Source: §5 · p. 8
  • Wang et al. (2022) keep a shared BM25 retriever across tasks while modifying the reader, whereas PGRA uses two retrieval stages to find task-specific information at low cost.PGRA’s distinction is task-specific reranking rather than only reader-side information filtering.Source: §5 · p. 8

Prompt-based Methods

6 Conclusion

PGRA addresses diverse relevance requirements in NKI tasks with a shared first-stage index and prompt-guided second-stage reranking. The paper reports broad performance gains, analyzes label consistency, and finds generality across evidence granularities and retrievers.

6 Conclusion

  • PGRA uses a task-agnostic retriever to build shared static indexes, then a prompt-guided reranker to select candidates using task-specific relevance for the reader.The two-stage design is intended to support wider NKI tasks while avoiding a separately trained retriever for each task.Source: §6 · p. 9
  • PGRA overall outperforms previous state-of-the-art retrieval-augmented methods and shows generality across evidence granularities and retriever types.The analyses also examine how label consistency between inputs and retrieved evidence relates to performance.Source: §6 · p. 9
  • The authors identify improving pseudo-label consistency as a future direction for enhancing model performance.This direction follows directly from the paper’s analysis of consistency between inputs and retrieved evidence.Source: §6 · p. 9

Limitations

PGRA has not been evaluated on sentence-pair tasks or generation tasks and has limited evaluation on KI tasks, constraining its demonstrated generality.

  • PGRA has not been tested on sentence-pair tasks because Wikipedia contains few sentence pairs for retrieval.The authors suggest larger, more diverse corpora as a possible remedy.Source: Limitations · p. 9
  • PGRA is restricted to classification tasks, while retrieving evidence for generation may require information related to both source and target.The authors identify machine translation as an example and leave this question for future work.Source: Limitations · p. 9
  • PGRA has not been extensively tested on KI tasks beyond preliminary Appendix F analysis, limiting claims about generality.KI tasks may require passage-level knowledge matching and more specialized prompts.Source: Limitations · p. 9

Ethics Statement

The work frames retrieval augmentation as a computational and fairness concern, while acknowledging that dataset choices may introduce bias into results and retrieved text.

  • Retrieval augmentation can require substantial computation for indexing, retrieval, and index refreshing, limiting usability and potentially harming fairness.PGRA aims to balance retrieval performance and training cost without retraining a retriever or rebuilding an index for each new task.Source: Ethics Statement · p. 9
  • Using Wikipedia and common tasks may reflect data-selection biases in the results, requiring additional attention to bias when scaling retrieved-text applications.Source: Ethics Statement · p. 9

A Multiple Runs of the Main Experiment

The appendix reports repeated runs and analyses of evidence quantity, model size, label consistency, and retriever choice across PGRA experiments.

A Multiple Runs of the Main Experiment

B Experiments with More Retrieved Evidence For FiD baselines

C Impact of k, d and OPT Model Sizes

  • Sections 4.2 and 4.3 analyze the effects of first-stage top-k, second-stage top-d, and OPT model size, keeping other hyperparameters identical to Table 2 settings.Tables 5, 6, and 9 report detailed performance for each task in these ablations.Source: C Impact of k, d and OPT Model Sizes · p. 12, Table 5 · p. 12

D Label Consistency

E Generality on Retrievers

F Generalization on KI tasks

On a sampled FEVER fact-verification benchmark, PGRA outperforms FiD with a sentence-level datastore, while passage-level retrieval remains a limitation.

  • 77.7% accuracy for PGRA versus 73.8% for FiD confirms a performance increase on FEVER with a sentence-level Wiki1m datastore.Both systems use T5-base and the same other hyperparameters as Table 2.Source: F Generalization on KI tasks · p. 12
  • FiD with a traditional passage-level datastore can achieve better performance, highlighting a limitation of PGRA's sentence-level setup.Passage-level datastores require substantially different relevance metrics.Source: F Generalization on KI tasks · p. 12

G Datasets and Metrics

The appendix documents the datasets, training setup, and prompt resources used across the experiments, along with tables for task information and additional analyses.

G Datasets and Metrics

H Training Details

  • Models are trained for 5000 steps after searching learning rates from 1e-5 to 1e-4 and batch sizes of 4 or 8.The best hyperparameters are reported in Table 7.Source: H Training Details · p. 13

I Prompts

  • The appendix includes the prompts used across all 8 tasks.Prompt instances for in-context learning in the prompt-guided reranker are provided in Table 13.Source: I Prompts · p. 13, Table 13 · p. 15
  • The impact of OPT model size is analyzed with k = 150 and d = 16.The detailed analysis appears in Table 9.Source: Table 9 · p. 14
  • Pseudo-label consistency is analyzed across different OPT models, averaging consistency and performance over five tasks with k = 150 and d = 16.The analysis is summarized in Table 10.Source: Table 10 · p. 14
  • Generalization performance is compared for FiD and PGRA using different first-stage encoders.The comparison is presented in Table 11.Source: Table 11 · p. 14
Loading 2305.17653v1…