Autobool
Collection
AutoBool is a reinforcement learning (RL) framework for training large language models (LLMs) to generate high-quality Boolean queries for systema
•
5 items
•
Updated
•
1
This model is part of the AutoBool framework, a reinforcement learning approach for training large language models to generate high-quality Boolean queries for systematic literature reviews.
This variant uses direct generation without explicit reasoning steps. The model is instructed to output only the final Boolean query inside <answer></answer> tags without any explanation or reasoning process.
<answer>[Boolean query]</answer>The model was trained using:
This model is designed for:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "ielabgroup/Autobool-Qwen4b-No-reasoning"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Define your systematic review topic
topic = "Thromboelastography (TEG) and rotational thromboelastometry (ROTEM) for trauma-induced coagulopathy"
# Construct the prompt with system and user messages
messages = [
{"role": "system", "content": "You are an expert systematic review information specialist.
You are tasked to formulate a systematic review Boolean query in response to a research topic. The final Boolean query must be enclosed within <answer> </answer> tags. Do not include any explanation or reasoning."},
{"role": "user", "content": f'You are given a systematic review research topic, with the topic title "{topic}".
Your task is to formulate a highly effective Boolean query in MEDLINE format for PubMed.
The query should balance **high recall** (capturing all relevant studies) with **reasonable precision** (avoiding irrelevant results):
- Use both free-text terms and MeSH terms (e.g., chronic pain[tiab], Pain[mh]).
- **Do not wrap terms or phrases in double quotes**, as this disables automatic term mapping (ATM).
- Combine synonyms or related terms within a concept using OR.
- Combine different concepts using AND.
- Use wildcards (*) to capture word variants (e.g., vaccin* → vaccine, vaccination):
- Terms must have ≥4 characters before the * (e.g., colo*)
- Wildcards work with field tags (e.g., breastfeed*[tiab]).
- Field tags limit the search to specific fields and disable ATM.
- Do not include date limits.
- Tag term using term field (e.g., covid-19[ti] vaccine[ti] children[ti]) when needed.
**Only use the following allowed field tags:**
Title: [ti], Abstract: [ab], Title/Abstract: [tiab]
MeSH: [mh], Major MeSH: [majr], Supplementary Concept: [nm]
Text Words: [tw], All Fields: [all]
Publication Type: [pt], Language: [la]
Output and only output the formulated Boolean query inside <answer></answer> tags. Do not include any explanation or content outside or inside the <answer> tags.'}
]
# Generate the query
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=2048)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
# Extract the query from <answer> tags
import re
match = re.search(r'<answer>(.*?)</answer>', response, re.DOTALL)
if match:
query = match.group(1).strip()
print(query)
If you use this model, please cite:
@inproceedings{autobool2026,
title={AutoBool: Reinforcement Learning for Boolean Query Generation in Systematic Reviews},
author={[Shuai Wang, Harrisen Scells, Bevan Koopman, Guido Zuccon]},
booktitle={Proceedings of the 2026 Conference of the European Chapter of the Association for Computational Linguistics (EACL)},
year={2025}
}
Apache 2.0