Can ChatGPT Write a Good Boolean Query for Systematic Review Literature Search?

Shuai Wang, Harrisen Scells, Bevan Koopman, Guido ZucconarXiv 2023

TL;DR

This paper evaluates whether ChatGPT can automate the creation of complex Boolean queries for medical systematic reviews. The researchers found that while ChatGPT excels at generating high-precision queries—making it a potential boon for "rapid reviews"—it suffers from low recall and a tendency to "hallucinate" non-existent medical subject headings (MeSH).

What Problem Does This Paper Address?

Systematic reviews are the "gold standard" of evidence-based medicine, providing comprehensive summaries of all available literature on a specific clinical question. However, the foundation of a good review is a high-quality Boolean search query.

Writing these queries is a major bottleneck: they must be broad enough to find every relevant study (high recall) but specific enough to avoid burying researchers in thousands of irrelevant papers (high precision). Currently, this process requires significant expertise and time from information specialists. The authors investigate if Large Language Models (LLMs) like ChatGPT can alleviate this burden by formulating these queries from scratch or refining existing ones.

Methods

The researchers explored three main strategies for interacting with ChatGPT (specifically the January 2023 version):

  1. Single Prompt Formulation: Generating a query based only on the review title. They tested three prompt levels:
  2. Simple: A basic one-sentence request.
  3. Detailed: Providing a "persona" (e.g., "You are an information specialist") and specific instructions on balancing precision and recall.
  4. With Example (Few-shot): Providing a sample review title and its professionally authored Boolean query to guide the model.
  5. Query Refinement: Taking an existing, potentially sub-optimal query and asking ChatGPT to improve its effectiveness.
  6. Guided Prompting: A novel multi-step approach that mimics the "objective method" used by human experts. This involves four steps:
  7. Extracting 50 relevant terms from a "seed" study.
  8. Classifying those terms into categories (Health conditions, Treatments, Study designs).
  9. Grouping terms logically using OR and AND operators.
  10. Refining the final query by adding MeSH terms.

Datasets

The study utilized two primary benchmarks:

  • CLEF TAR (2017 & 2018): A standard dataset for "Technologically Assisted Reviews" containing 72 review topics focused on diagnostic test accuracy.
  • Seed Collection: A dataset of 40 systematic review topics that include "seed" studies (relevant papers known before the search begins), which are essential for the guided prompting method.

Key Insights and Ideas

  • The Precision-Recall Trade-off: ChatGPT is a "conservative" searcher. It is remarkably good at finding a small, highly relevant set of papers (high precision) but often misses the "long tail" of evidence required for a full systematic review (low recall).
  • Few-Shot Prompting is Essential: Simply asking for a query (Simple/Detailed prompts) yields mediocre results. Providing a high-quality example in the prompt significantly boosts performance, as seen in the comparison of prompts q1-q3 vs. q4-q5 in Figure 6 (Table 4).
  • Guided Prompting Wins: Breaking the complex task of query writing into manageable sub-tasks (the Guided approach) led to the most effective queries, showing massive gains in both precision and recall compared to single-shot attempts.
  • MeSH Hallucinations: One of the most significant "aha" moments was the discovery that ChatGPT frequently generates MeSH terms that do not exist in the official PubMed vocabulary. Over 50% of the MeSH terms generated in some tests were incorrect.
  • Non-Determinism: The model is volatile. Running the exact same prompt multiple times can result in queries with widely varying effectiveness (up to 12% variance in recall).

Key Results

The quantitative results, summarized in Figure 6 (Table 4), highlight ChatGPT's strengths and weaknesses:

  • Precision: On the CLEF dataset, ChatGPT's "Detailed" prompt (q2) achieved a precision of 0.1166, nearly 6 times higher than the original human-authored queries (0.0207).
  • Recall: Conversely, the recall for the same prompt was only 0.1310, compared to 0.8317 for the original queries. This suggests ChatGPT-generated queries might miss ~87% of relevant studies in a standard configuration.
  • Guided Prompting Gains: On the Seed Collection, the Guided approach improved precision by 249.6% and recall by 301.6% compared to the best single-prompt method (q4).
Main results for single prompt query formulation showing the precision-recall trade-off.

Limitations and Future Work

The authors acknowledge several critical hurdles:

  • Reproducibility: The non-deterministic nature of LLMs makes it difficult for researchers to rely on them for a process where reproducibility is paramount.
  • Vocabulary Accuracy: The high rate of MeSH term errors suggests that a post-processing step—where an automated tool validates or suggests correct MeSH terms—is necessary.
  • Black Box Nature: As a proprietary model, it's unclear if ChatGPT had already "seen" the test queries during its training, which could bias the results.

Future work should focus on integrating LLMs with specialized medical databases to verify terminology and exploring "snowballing" (using citation networks) to recover the recall lost by the model's conservative search strategy.

Summary updated

BibTeX
@misc{wang2023can,
  author = {Shuai Wang and Harrisen Scells and Bevan Koopman and Guido Zuccon},
  title = {{Can ChatGPT Write a Good Boolean Query for Systematic Review Literature Search?}},
  year = {2023},
  eprint = {2302.03495},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.03495},
}
Figure