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.
This tool helps academics craft comprehensive rebuttals by analyzing reviews from multiple strategic angles:
- Purely Technical - Intellectual, evidence-based responses assuming good-faith reviewers
- Diplomatic - Balanced approach with ego-stroking and acknowledgment of reviewer insights
- Defensive - Risk-minimizing strategy focused on maximizing acceptance probability
Each perspective generates a separate rebuttal in its own isolated context to ensure independent analysis.
- 📄 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
pip install -r requirements.txt- Get a Gemini API key from Google AI Studio
- Copy
.env.exampleto.env:cp .env.example .env
- Edit
.envand add your API key:GOOGLE_API_KEY=your_actual_api_key_here
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)
You can run the script in two ways:
Option 1: Process files in the current directory
python rebuttal_strategizer.pyOption 2: Specify a directory containing your paper and reviews
python rebuttal_strategizer.py paper/The script will:
- Find and upload your PDF from the specified directory
- Locate all
review-*.txtfiles in that directory - Strategize 3 draft rebuttals for each review (purely technical, diplomatic, defensive)
- Save outputs to a
rebuttals/subdirectory in the same location
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
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 approachPROMPT_DIPLOMATIC- Diplomatic approach with acknowledgmentPROMPT_DEFENSIVE- Risk-minimizing, accommodating approach
Edit the prompts to match your field's conventions or your personal style.
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.
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
- Review all three outputs - Different perspectives might reveal different strengths
- Mix and match - Take the best elements from each perspective
- Edit the final version - Use AI output as a draft, not the final submission
- Customize prompts - Tailor prompts.py to your field's culture
- Check context - Ensure your paper PDF is the correct final version
- Python 3.7+
- Google Gemini API key
- Internet connection for API calls
- 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
"No PDF file found"
- Ensure there's a
.pdffile 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
.envfile exists and contains your API key - Ensure
.envis 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
MIT License - Feel free to modify and use for your academic work.
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.