This repository provides ready-to-use workflows for LLM-assisted title/abstract (TiAb) screening as described in a manuscript in submission.
Two main workflows are implemented:
- Open-source LLM workflow (Fs-NR-L(os) in the paper)
- Notebook:
run-TiAbScreen_opensource.ipynb
- Notebook:
- OpenAI LLM workflow (Fs-M in the paper)
- Notebook:
run-TiAbScreen_openai.ipynb - Supports both batch API and on‑demand API usage.
- Notebook:
-
Clone this repository and install the required Python dependencies ('requirements.txt'). Use a virtual environment preferably:
git clone https://github.com/OpenBfS/ai-sr-litscreen.git cd ai-sr-litscreen python -m venv .venv source .venv/bin/activate # on Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Prepare input files by replacing the provided dummy files with your own:
examples.txt– few‑shot examples (recommended: 4 TiAb records with PECOS‑wise decisions and reasons; at least one fully eligible and one with all or most PECOS elements ineligible).pecos_criteria.yaml– PECOS eligibility criteria for your systematic review or research question.abs-screen.xlsxorabs-screen.ris– TiAb records to be screened.
-
Run a workflow:
- For open‑source models, open
run-TiAbScreen_opensource.ipynb. - For OpenAI models, open
run-TiAbScreen_openai.ipynband choose batch or on‑demand API mode as described in the notebook. Make sure to enter your Open API key in the.envfile.
- For open‑source models, open
-
Helper functions:
functions_openai.pyandfunctions_opensource.pycontain shared helper functions and are imported by the notebooks.
-
Output:
- You can export the labelled TiAb as the original Excel or RIS files, with the workflow-generated labels in a "Label" column or "LB" field, respectively.
Code is released under the MIT License. See LICENSE for details.