This project automates the systematic review process by leveraging Large Language Models (LLMs) and advanced NLP techniques. It provides a modular pipeline to handle text extraction, vector embeddings, and decision-making for relevance determination. The automation significantly reduces the manual workload while maintaining scalability and accuracy.
Key features include:
- PDF Text Extraction: Extract structured text from articles.
- Vector Embedding Storage: Store embeddings for semantic similarity search.
- Automated Screening: Use LLMs to screen abstracts and make inclusion decisions.
- Decision Logging: Export results to a structured Excel file for review.
The pipeline consists of four main steps:
- PDF Loading and Parsing: Articles in PDF format are loaded and parsed using
MultiPDFExtractor. - Metadata Extraction: Titles, authors, and keywords are extracted via LLMs.
- Text Chunking: The content is divided into manageable chunks using recursive text splitting and NLTK sentence tokenization.
- Embedding Generation: Each chunk is converted into vector embeddings using OpenAI's
text-embedding-ada-002model. - Chroma Vectorstore: The embeddings are stored in a persistent Chroma database for efficient retrieval.
- Question Handling: Questions are read from an input Excel file.
- Multi-Query Retrieval: For each question, multiple paraphrased sub-queries are generated using LLMs to enhance retrieval accuracy.
- Relevant Chunk Retrieval: Chroma is queried to fetch the most relevant text chunks for each sub-query. These are combined and de-duplicated for further processing.
- Context Construction: Retrieved chunks are combined into a coherent context.
- Answer Generation: Using an LLM and a custom prompt template, answers are generated based on the context and the question.
- Result Validation: Generated answers are validated for clarity and completeness.
- Inclusion/Exclusion: The system evaluates whether each article should be included in the review based on the generated answers.
- Excel Logging: Decisions (YES/NO) and explanations are recorded in an Excel file, with color-coded rows (green for YES, red for NO) for easy interpretation.
- Python 3.8+
- OpenAI API Key (stored in a
.envfile) - Required Python packages (listed in
requirements.txt)
-
Clone the repository:
git clone https://github.com/your-username/automated-review.git cd automated-review -
Create a Conda environment:
conda create -n automated_review python=3.8 -y conda activate automated_review
-
Install dependencies:
pip install -r requirements.txt
-
Download required NLTK resources:
python install.py
-
Add your OpenAI API key to the
.envfile:OPENAI_API_KEY="your-openai-api-key" -
Run the extraction pipeline:
python extract.py --pdf_dir path/to/your/pdf-directory
-
Execute the main pipeline:
python main.py --pdf_dir path/to/your/pdf-directory --questions_excel path/to/your/output_excel --output_excel path/to/your/output_excel
- Akinseloyin, O., Jiang, X., & Palade, V. (2024). A Novel Question-Answering Framework for Automated Abstract Screening Using Large Language Models. medRxiv. https://doi.org/10.1101/2023.12.17.23300102
- Syriani, E., David, I., & Kumar, G. (2023). Assessing the Ability of ChatGPT to Screen Articles for Systematic Reviews. arXiv. https://doi.org/10.48550/arXiv.2307.06464
- Khraisha, Q., et al. (2023). Can large language models replace humans in the systematic review process? arXiv. https://doi.org/10.48550/arXiv.2310.17526
- Mitrov, G., et al. (2024). Combining Semantic Matching, Word Embeddings, Transformers, and LLMs for Enhanced Document Ranking: Application in Systematic Reviews. Big Data and Cognitive Computing. https://doi.org/10.3390/bdcc8090110
- Landschaft, A., et al. (2024). Implementation and evaluation of an additional GPT-4-based reviewer in PRISMA-based medical systematic literature reviews. International Journal of Medical Informatics. https://doi.org/10.1016/j.ijmedinf.2024.105531
- Scherbakov, D., et al. (2024). The emergence of Large Language Models (LLM) as a tool in literature reviews. arXiv. https://doi.org/10.48550/arXiv.2409.04600