Code Monkey home page Code Monkey logo

chatgpt_screener's Introduction

๐Ÿ“š ChatGPT Article Screener Script ๐Ÿค–

This script leverages the power of OpenAI's GPT-3.5 Turbo to automate the academic article screening process. It processes an XML file of articles exported from EndNote, evaluates their relevance based on PICOS criteria, and saves the results in both CSV and XML formats.


๐Ÿ›  Installation & Requirements

To install the required Python packages, run the following command:

pip install -r requirements.txt

๐Ÿ“ฆ Required Packages

  • beautifulsoup4
  • pandas
  • openai
  • tqdm
  • tenacity

๐Ÿ“‹ Command Line Arguments

Here are the command-line arguments that the script accepts:

Argument Description Example
--xml_file Path to the EndNote XML file "path/to/xml/file.xml"
--systemprompt System prompt for AI role definition "You are a medical researcher AI."
--preprompt Pre-prompt for role definition "You are an AI assistant..."
--prompt Main task prompt for the AI "You are given an article..."
--postprompt PICOS criteria to guide the AI "Population (P): Patients..."
--output Path to save the output file (without extension) "path/to/output/file"
--apikey Your OpenAI API key "YOUR_API_KEY"
--model OpenAI model to use "gpt-3.5-turbo"
--temperature Model's temperature setting 0.0
--interval Time interval between API requests (in seconds) 20.0
--sleep If "true", puts the computer to sleep after script execution "true"

โš™ Example Usage

Here's how you can run the script:

python script.py --xml_file "path/to/xml/file.xml" --systemprompt "You are a medical researcher AI." --preprompt "You are an AI assistant..." --prompt "You are given an article..." --postprompt "Population (P): Patients..." --output "path/to/output/file" --apikey "YOUR_API_KEY" --model "gpt-3.5-turbo" --temperature 0.8 --interval 20.0 --sleep "true"

๐Ÿ“„ Output Files

The script generates two output files:

  • A new XML file with the ratings added.
  • A CSV file with the article details, ratings, and AI responses.

๐Ÿ“ Additional Notes

  • Make sure to replace "YOUR_API_KEY" with your actual OpenAI API key.
  • The script employs exponential backoff to handle API rate limits or failures gracefully.

๐Ÿ“š Cite this Project

If you use this script in your research or project, please cite it using the following:

DOI

chatgpt_screener's People

Contributors

mahbodez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.