Skip to content

VerticalResearchGroup/Rebuttal-Strategizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gauntlet Rebuttal Strategizer

An AI-powered academic paper rebuttal strategizer that analyzes peer reviews and generates draft rebuttals from three strategic perspectives using Google's Gemini 2.5 Pro.

Overview

This tool helps academics craft comprehensive rebuttals by analyzing reviews from multiple strategic angles:

  1. Purely Technical - Intellectual, evidence-based responses assuming good-faith reviewers
  2. Diplomatic - Balanced approach with ego-stroking and acknowledgment of reviewer insights
  3. Defensive - Risk-minimizing strategy focused on maximizing acceptance probability

Each perspective generates a separate rebuttal in its own isolated context to ensure independent analysis.

Features

  • 📄 Analyzes your paper PDF alongside reviewer comments
  • 🎯 Three distinct strategic perspectives for rebuttals
  • 🔒 Isolated contexts for each perspective (no cross-contamination)
  • 📁 Organized output structure (one directory per review)
  • ✏️ Editable system prompts for customization
  • 🔄 Processes multiple reviews automatically

Setup

1. Install Dependencies

pip install -r requirements.txt

2. Configure API Key

  1. Get a Gemini API key from Google AI Studio
  2. Copy .env.example to .env:
    cp .env.example .env
  3. Edit .env and add your API key:
    GOOGLE_API_KEY=your_actual_api_key_here
    

3. Prepare Your Files

Place the following in your project directory:

  • One PDF file - Your academic paper (e.g., my_paper.pdf)
  • Review files - Named as review-1.txt, review-2.txt, etc. (4-6 files)

Usage

Basic Usage

You can run the script in two ways:

Option 1: Process files in the current directory

python rebuttal_strategizer.py

Option 2: Specify a directory containing your paper and reviews

python rebuttal_strategizer.py paper/

The script will:

  1. Find and upload your PDF from the specified directory
  2. Locate all review-*.txt files in that directory
  3. Strategize 3 draft rebuttals for each review (purely technical, diplomatic, defensive)
  4. Save outputs to a rebuttals/ subdirectory in the same location

Example

If you have this structure:

paper/
├── my_paper.pdf
├── review-A.txt
└── review-B.txt

Run: python rebuttal_strategizer.py paper/

Results will be created in:

paper/
├── my_paper.pdf
├── review-A.txt
├── review-B.txt
└── rebuttals/
    ├── review-A/
    │   ├── rebuttal_purely_technical.txt
    │   ├── rebuttal_diplomatic.txt
    │   └── rebuttal_defensive.txt
    └── review-B/
        ├── rebuttal_purely_technical.txt
        ├── rebuttal_diplomatic.txt
        └── rebuttal_defensive.txt

Customizing Prompts

The system prompts are defined in prompts.py. You can edit these to customize the tone and strategy of each perspective:

  • PROMPT_PURELY_TECHNICAL - Technical, intellectual approach
  • PROMPT_DIPLOMATIC - Diplomatic approach with acknowledgment
  • PROMPT_DEFENSIVE - Risk-minimizing, accommodating approach

Edit the prompts to match your field's conventions or your personal style.

Example Review File Format

Create review files as plain text:

review-1.txt:

The paper presents an interesting approach to X, but there are several concerns:

1. The methodology in Section 3 lacks detail about...
2. The comparison with prior work [5] is insufficient...
3. The experimental results do not adequately address...

Overall, the work shows promise but requires major revisions.

Strategic Perspective Guide

When to Use Each Perspective

Purely Technical:

  • Reviewer appears knowledgeable and fair
  • You have strong evidence/data to support your position
  • Review is constructive and professional
  • Scientific merit is the primary concern

Diplomatic:

  • Reviewer has valid points but might be sensitive
  • You need to balance agreement and defense
  • Reviewer is senior or well-known in the field
  • Building relationships is important

Defensive:

  • Review is harsh or borderline unfair
  • Acceptance is critical (e.g., thesis defense, tenure)
  • You're uncertain about the best technical argument
  • Risk tolerance is low

Tips

  1. Review all three outputs - Different perspectives might reveal different strengths
  2. Mix and match - Take the best elements from each perspective
  3. Edit the final version - Use AI output as a draft, not the final submission
  4. Customize prompts - Tailor prompts.py to your field's culture
  5. Check context - Ensure your paper PDF is the correct final version

Requirements

  • Python 3.7+
  • Google Gemini API key
  • Internet connection for API calls

Limitations

  • Requires valid Gemini API key with credits
  • PDF must be readable by Gemini's API
  • Each rebuttal generation consumes API credits
  • Quality depends on review clarity and paper content

Troubleshooting

"No PDF file found"

  • Ensure there's a .pdf file in the directory

"No review files found"

  • Review files must be named review-1.txt, review-2.txt, etc.

"GOOGLE_API_KEY not found"

  • Check that .env file exists and contains your API key
  • Ensure .env is in the same directory as the script

API Errors

  • Verify your API key is valid and has sufficient credits
  • Check your internet connection
  • Ensure PDF is not corrupted or too large

License

MIT License - Feel free to modify and use for your academic work.

Contributing

Suggestions and improvements welcome! This tool is designed to be customizable to different academic fields and writing styles.


Note: This tool generates drafts. Always review, edit, and ensure rebuttals represent your authentic voice and position. Academic integrity is paramount.

About

GenAI based strategizer for rebuttals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages