Constructing and Evaluating Declarative RAG Pipelines in PyTerrier

Search engines often follow a pipeline architecture, where complex but effective reranking components are used to refine the results of an initial retrieval. Retrieval augmented generation (RAG) is an exciting application of the pipeline architecture, where the final component generates a coherent answer for the users from the retrieved documents. In this demo paper, we describe how such RAG pipelines can be formulated in the declarative PyTerrier architecture, and the advantages of doing so. Our PyTerrier-RAG extension for PyTerrier provides easy access to standard RAG datasets and evaluation measures, state-of-the-art LLM readers, and using PyTerrier's unique operator notation, easy-to-build pipelines. We demonstrate the succinctness of indexing and RAG pipelines on standard datasets (including Natural Questions) and how to build on the larger PyTerrier ecosystem with state-of-the-art sparse, learned-sparse, and dense retrievers, and other neural rankers.

Authors

Institutions

Publication Details

Published
2025-07-13
DOI
https://doi.org/10.1145/3726302.3730150
Citations
3
Primary Topic
Network Packet Processing and Optimization
Type
article
Field-Weighted Citation Impact
6.81
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Constructing and Evaluating Declarative RAG Pipelines in PyTerrier

Craig Macdonald, Zaiqiao Meng, Andrew Parry, Jinyuan Fang
3 citations
Network Packet Processing and Optimization
6.81
article

Constructing and Evaluating Declarative RAG Pipelines in PyTerrier

Craig Macdonald, Zaiqiao Meng, Andrew Parry, Jinyuan Fang
article en
3 citations

Abstract

Search engines often follow a pipeline architecture, where complex but effective reranking components are used to refine the results of an initial retrieval. Retrieval augmented generation (RAG) is an exciting application of the pipeline architecture, where the final component generates a coherent answer for the users from the retrieved documents. In this demo paper, we describe how such RAG pipelines can be formulated in the declarative PyTerrier architecture, and the advantages of doing so. Our PyTerrier-RAG extension for PyTerrier provides easy access to standard RAG datasets and evaluation measures, state-of-the-art LLM readers, and using PyTerrier's unique operator notation, easy-to-build pipelines. We demonstrate the succinctness of indexing and RAG pipelines on standard datasets (including Natural Questions) and how to build on the larger PyTerrier ecosystem with state-of-the-art sparse, learned-sparse, and dense retrievers, and other neural rankers.

University of Glasgow (GB)
Openalex Percentile: Top 3%
Network Packet Processing and Optimization
6.81
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Constructing and Evaluating Declarative RAG Pipelines in PyTerrier — Craig Macdonald, Zaiqiao Meng, et al. · (2025) | TGRS Research Map | TGRS