[Paper Review] Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLP
DSP proposes a framework that composes Demonstrate, Search, and Predict stages to enable sophisticated interactions between frozen language models and retrieval models, achieving state-of-the-art in-context learning on knowledge-intensive tasks without fine-tuning.
Retrieval-augmented in-context learning has emerged as a powerful approach for addressing knowledge-intensive tasks using frozen language models (LM) and retrieval models (RM). Existing work has combined these in simple "retrieve-then-read" pipelines in which the RM retrieves passages that are inserted into the LM prompt. To begin to fully realize the potential of frozen LMs and RMs, we propose Demonstrate-Search-Predict (DSP), a framework that relies on passing natural language texts in sophisticated pipelines between an LM and an RM. DSP can express high-level programs that bootstrap pipeline-aware demonstrations, search for relevant passages, and generate grounded predictions, systematically breaking down problems into small transformations that the LM and RM can handle more reliably. We have written novel DSP programs for answering questions in open-domain, multi-hop, and conversational settings, establishing in early evaluations new state-of-the-art in-context learning results and delivering 37-120%, 8-39%, and 80-290% relative gains against the vanilla LM (GPT-3.5), a standard retrieve-then-read pipeline, and a contemporaneous self-ask pipeline, respectively. We release DSP at https://github.com/stanfordnlp/dsp
Motivation & Objective
- Argue that task-aware, programmable interaction between LMs and RMs surpasses simple retrieve-then-read pipelines.
- Introduce the DSP framework to express pipelines that bootstrap demonstrations, perform multi-hop searches, and generate grounded predictions.
- Show that DSP enables state-of-the-art in-context learning results on knowledge-intensive tasks without LM or RM fine-tuning.
- Demonstrate modular transformations and composable operators that support end-task-label-driven demonstration bootstrapping.
- Provide open-source release of DSP for broader experimentation and reuse.
Proposed method
- Define three-stage DSP (Demonstrate, Search, Predict) as composable transformations operating on an Example datatype.
- Use Demonstrate to bootstrap demonstrations via weak supervision from end-task labels.
- Employ Search to perform multi-hop and conversational retrieval driven by LM-generated queries.
- Use Predict to generate and select grounded predictions using demonstrations and retrieved passages.
- Support multiple demonstration selection and prediction aggregation strategies (e.g., self-consistency, PoT, ensemble prompts) without LM fine-tuning.
- Evaluate DSP on Open-SQuAD, HotPotQA, and QReCC with frozen GPT-3.5 and ColBERTv2, reporting relative gains compared to baselines.
Experimental results
Research questions
- RQ1Can a task-aware, programmable DSP pipeline outperform vanilla in-context learning and standard retrieve-then-read setups on knowledge-intensive tasks?
- RQ2What transformations and compositions between LM and RM best enable multi-hop and conversational reasoning without fine-tuning?
- RQ3How do demonstrations, multi-hop search strategies, and prediction aggregation contribute to grounding and accuracy in knowledge-intensive NLP?
- RQ4Does bootstrapping demonstrations and adaptive demonstration selection improve robustness across open-domain QA, multi-hop QA, and conversational QA?
Key findings
- DSP yields 37–120% relative gains over vanilla GPT-3.5 baselines across tasks.
- DSP yields 8–39% relative gains over a standard retrieve-then-read pipeline.
- DSP yields 80–290% relative gains over a contemporaneous self-ask pipeline.
- Open-source DSP implementation is provided at the authors’ repository.
- Demonstrate enables automatic annotation of intermediate steps from end-task labels, reducing hand-labeling needs.
- Experiments cover open-domain QA, multi-hop QA, and conversational QA with frozen modules and no fine-tuning.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.