Skip to main content
QUICK REVIEW

[Paper Review] Learning to Filter Context for Retrieval-Augmented Generation

Zhiruo Wang, Jun Araki|arXiv (Cornell University)|Nov 14, 2023
Topic ModelingComputer Science8 citations
TL;DR

FilCo proposes sentence-level context filtering to improve retrieval-augmented generation by training a context filter on StrInc, Lexical overlap, and CXMI measures, reducing noise and computation while improving six knowledge-intensive tasks.

ABSTRACT

On-the-fly retrieval of relevant knowledge has proven an essential element of reliable systems for tasks such as open-domain question answering and fact verification. However, because retrieval systems are not perfect, generation models are required to generate outputs given partially or entirely irrelevant passages. This can cause over- or under-reliance on context, and result in problems in the generated output such as hallucinations. To alleviate these problems, we propose FILCO, a method that improves the quality of the context provided to the generator by (1) identifying useful context based on lexical and information-theoretic approaches, and (2) training context filtering models that can filter retrieved contexts at test time. We experiment on six knowledge-intensive tasks with FLAN-T5 and LLaMa2, and demonstrate that our method outperforms existing approaches on extractive question answering (QA), complex multi-hop and long-form QA, fact verification, and dialog generation tasks. FILCO effectively improves the quality of context, whether or not it supports the canonical output.

Motivation & Objective

  • Motivate the need to improve context quality in retrieval-augmented generation to reduce reliance on irrelevant passages.
  • Propose FilCo, a sentence-level context filtering approach guided by three measures to select useful text spans.
  • Show that learned context filtering improves performance across six knowledge-intensive datasets.
  • Demonstrate substantial input-length reduction and comparable or superior gains to silver-standard filtering.
  • Provide guidance on which filtering signals work best per task and extend evaluation to multi-passages.

Proposed method

  • Define a fine-grained filtering function to select sentence-level text spans from retrieved passages.
  • Use three oracle-like filtering measures: StrInc (whether a span contains the output), Lexical overlap (unigram overlap with the example/output), and CXMI (change in generation probability when context is added).
  • Train a context-filtering model M_ctx to predict filtered context t_silver from q and retrieved passages P, using oracle-filtered signals as supervision.
  • Train a generation model M_gen to produce the target o given filtered context t_silver (training) and t_pred at inference.
  • At test time, generate t_pred with M_ctx and feed M_gen with q concatenated with t_pred to produce o.
  • Compare FilCo (sentence-level filtering) to Full-context augmentation and passage-level filtering (Psg), including a Silver upper-bound where t_silver is used directly.
Figure 1: FilCo filters out irrelevant content (marked in red) and leaves precisely supporting content, making it easier for the generator to predict the correct answer.
Figure 1: FilCo filters out irrelevant content (marked in red) and leaves precisely supporting content, making it easier for the generator to predict the correct answer.

Experimental results

Research questions

  • RQ1Can sentence-level context filtering improve the fidelity and accuracy of outputs in retrieval-augmented generation across multiple knowledge-intensive tasks?
  • RQ2Which filtering signals (StrInc, Lexical, CXMI) best complement different task types (extractive QA, abstractive QA, fact verification, and dialog)?
  • RQ3Does learned filtering reduce input length and computational cost without sacrificing, and often improving, end-task performance?
  • RQ4How does FilCo perform in multi-passage settings compared to single-passage filtering and full-context baselines?

Key findings

  • FilCo consistently outperforms full-context augmentation and passage-level filtering across six tasks including extractive QA, multi-hop QA, long-form QA, fact verification, and dialog generation.
  • FilCo reduces input length by 44-64% across tasks while achieving comparable or better end-task results to silver-filtered contexts.
  • Different tasks benefit from different filtering signals: StrInc for extractive QA, Lexical for dialog, and CXMI for complex tasks like multi-hop QA and fact verification.
  • FilCo improves end-generation metrics by notable margins (e.g., NQ EM gains of 4.3 and 8.6 with Flan-T5 and Llama2; ELI5 F1 gains of 0.6 and 2.6; FEVER accuracy gains of 0.6 and 3.5 respectively).
  • In multi-passage settings, FilCo maintains its advantages over baselines, with additional gains in several tasks when using top-5 passages.
Figure 2: The FilCo pipeline: (i) filtering retrieved passages, (ii) generation with filtered context.
Figure 2: The FilCo pipeline: (i) filtering retrieved passages, (ii) generation with filtered context.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.