LatteReview 🤖☕
🚨 NEW in v1.2.0: Works with the newest models from OpenAI (GPT-6, GPT-5.x), Anthropic (Claude Opus 5.5, Sonnet 5, Fable 5.1) and Google (Gemini 3.x), plus local models like Qwen 3.8 through Ollama, while older models keep working unchanged. See What's New below and Model compatibility.
LatteReview is a powerful Python package designed to automate academic literature review processes through AI-powered agents. Just like enjoying a cup of latte ☕, reviewing numerous research articles should be a pleasant, efficient experience that doesn't consume your entire day!
🆕 What's New in v1.2.0
- Current models: tested with OpenAI GPT-6 (
gpt-6-astra,gpt-6-sol,gpt-6-luna) and GPT-5.x, Anthropic Claude Opus 5.5, Sonnet 5, Haiku 4.5 and Fable 5.1, and Google Gemini 3.x (gemini-3.8-flash,gemini-3.5-flash-lite). Older models such asgpt-4o-miniandgemini-2.5-flashkeep working. - No more rejected-parameter errors: if a model rejects a setting in
model_args(e.g.,temperatureon GPT-6 or Claude 5, ormax_tokenson OpenAI reasoning models), LatteReview drops or renames it with a one-time warning and retries. If a reasoning model runs out of tokens before finishing its answer, the call is retried without the limit. - New default models:
OpenAIProviderandLiteLLMProviderdefault togpt-6-luna,GoogleProvidertogemini-3.8-flash, andOllamaProvidertoqwen3.8:27b. Passmodel=to choose another. - Better local models:
OllamaProviderconstrains answers to the reviewer's JSON schema, mapsreasoning_effortto Ollama'sthinksetting, passes othermodel_args(e.g.,top_p) as model options instead of failing, andclose()works again. Tested withqwen3.8:27bon a 32 GB Apple Silicon Mac. - More accurate costs: computed from the token usage each API reports, including hidden reasoning tokens.
- Python 3.10 or later is now required. On Python 3.9,
pipinstalls 1.1.1.
See the CHANGELOG for the full list.
🎯 Key Features
- Multi-agent review system with customizable roles and expertise levels for each reviewer
- Support for multiple review rounds with hierarchical decision-making workflows
- Review diverse content types including article titles, abstracts, custom texts, and even images using LLM-powered reviewer agents
- Define reviewer agents with specialized backgrounds and distinct evaluation capabilities (e.g., scoring or concept abstraction or custom reviewers of your own preferance)
- Create flexible review workflows where multiple agents operate in parallel or sequential arrangements
- Enable reviewer agents to analyze peer feedback, cast votes, and propose corrections to other reviewers' assessments
- Enhance reviews with item-specific context integration, supporting use cases like Retrieval Augmented Generation (RAG)
- Broad compatibility with LLM providers through LiteLLM, including OpenAI and Ollama
- Model-agnostic integration supporting OpenAI, Gemini, Claude, Groq, DeepSeek, OpenRouter, and local models via Ollama
- High-performance asynchronous processing for efficient batch reviews
- Standardized output format featuring detailed scoring metrics and reasoning transparency
- Robust cost tracking and memory management systems
- Extensible architecture supporting custom review workflow implementation
- NEW: Support for RIS (Research Information Systems) file format for academic literature review
💾Installation
pip install lattereview
LatteReview requires Python 3.10 or later. Please refer to the installation guide for detailed instructions.
🚀 Quick Start and Documentation
LatteReview enables you to create custom literature review workflows with multiple AI reviewers. Each reviewer can use different models and providers based on your needs. Below is a working example of how you can use LatteReview for doing a quick title/abstract review with two junior and one senior reviewers (all AI agents)! And this is just the beginning! Beyond study screening, LatteReview can handle data abstraction, customized pipelines, image analysis, and much more. Explore the Tutorials for more examples!
Please refer to the Quick Start page and Documentation page for detailed instructions.
The example below is fully self-contained: set your API keys, install the package, and run it as-is. It uses one OpenAI and one Gemini model, so it needs OPENAI_API_KEY and GEMINI_API_KEY (in a .env file or exported in your shell). You can swap in any LiteLLM-supported model — see Model Support.
from lattereview.providers import LiteLLMProvider
from lattereview.agents import TitleAbstractReviewer
from lattereview.workflows import ReviewWorkflow
import pandas as pd
import asyncio
from dotenv import load_dotenv
# Load environment variables (e.g., OPENAI_API_KEY, GEMINI_API_KEY) from a .env file
load_dotenv()
# First Reviewer: Conservative approach
reviewer1 = TitleAbstractReviewer(
provider=LiteLLMProvider(model="gpt-6-luna"),
name="Alice",
backstory="a radiologist with expertise in systematic reviews",
inclusion_criteria="The study must focus on applications of artificial intelligence in radiology.",
exclusion_criteria="Exclude studies that are not peer-reviewed or not written in English.",
model_args={"reasoning_effort": "low"},
)
# Second Reviewer: More exploratory approach
reviewer2 = TitleAbstractReviewer(
provider=LiteLLMProvider(model="gemini/gemini-3.8-flash"),
name="Bob",
backstory="a computer scientist specializing in medical AI",
inclusion_criteria="The study must focus on applications of artificial intelligence in radiology.",
exclusion_criteria="Exclude studies that are not peer-reviewed or not written in English.",
model_args={"reasoning_effort": "low"},
)
# Expert Reviewer: Resolves disagreements
expert = TitleAbstractReviewer(
provider=LiteLLMProvider(model="gpt-6-sol"),
name="Carol",
backstory="a professor of AI in medical imaging",
inclusion_criteria="The study must focus on applications of artificial intelligence in radiology.",
exclusion_criteria="Exclude studies that are not peer-reviewed or not written in English.",
model_args={"reasoning_effort": "high"},
additional_context="Alice and Bob disagree with each other on whether or not to include this article. You can find their reasonings above.",
)
# Define workflow
workflow = ReviewWorkflow(
workflow_schema=[
{
"round": 'A', # First round: Initial review by both reviewers
"reviewers": [reviewer1, reviewer2],
"text_inputs": ["title", "abstract"]
},
{
"round": 'B', # Second round: Expert reviews only disagreements
"reviewers": [expert],
"text_inputs": ["title", "abstract", "round-A_Alice_output", "round-A_Bob_output"],
"filter": lambda row: row["round-A_Alice_evaluation"] != row["round-A_Bob_evaluation"]
}
]
)
# Prepare your data: a DataFrame (or .csv/.xlsx/.ris file path) with 'title' and 'abstract' columns
data = pd.DataFrame(
{
"title": [
"Deep learning for automated detection of pneumonia on chest radiographs",
"Effects of mindfulness meditation on stress levels in college students",
],
"abstract": [
"We developed a convolutional neural network to detect pneumonia on chest X-rays.",
"A randomized trial of mindfulness training in 200 undergraduates reduced stress.",
],
}
)
# Or load from a file: data = pd.read_excel("articles.xlsx")
results = asyncio.run(workflow(data)) # Returns a pandas DataFrame with all original and output columns
# Save results
results.to_csv("review_results.csv", index=False)
🔌 Model Support
LatteReview offers flexible model integration through multiple providers:
- LiteLLMProvider (Recommended): Supports OpenAI, Anthropic (Claude), Gemini, Groq, DeepSeek, OpenRouter, and more
- OpenAIProvider: Direct integration with OpenAI and Gemini APIs
- GoogleProvider: Direct integration with Gemini through Google's
google-genaiSDK - OllamaProvider: Optimized for local models via Ollama
If you don't pass a model, OpenAIProvider and LiteLLMProvider use gpt-6-luna, GoogleProvider uses gemini-3.8-flash, and OllamaProvider uses qwen3.8:27b (run ollama pull qwen3.8:27b first). For Claude, pass e.g. LiteLLMProvider(model="anthropic/claude-sonnet-5") or "anthropic/claude-haiku-4-5" for a cheaper option.
Note: Models should support async operations and structured JSON outputs for optimal performance.
Model compatibility
Newer reasoning models reject some request parameters that older models accept. OpenAI's GPT-5/GPT-6 families and o-series models reject max_tokens (they use max_completion_tokens) and non-default temperature/top_p. Anthropic's Claude Opus 4.7+, Claude 5 and Fable models reject temperature, top_p and top_k. LatteReview handles this for you. If a model rejects a parameter in model_args, it is dropped (or max_tokens is sent as max_completion_tokens) with a one-time warning. If a reasoning model runs out of tokens before finishing its answer, the call is retried without the token limit. Models that accept these parameters are called exactly as before, so existing code keeps working.
For reasoning models, we recommend leaving out max_tokens and temperature and using reasoning_effort (e.g., "low" for screening, "high" for an expert reviewer) instead. See Model compatibility in the docs for details.
📖 Documentation
Full documentation and API reference are available at: https://pouriarouzrokh.github.io/LatteReview
🎓 Tutorials
✅ TitleAbstractReviewer:
🔸1. A simple task of abstract screening based on 1-5 scoring + inclusion and exclusion criteria
✅ AbstractionReviewer:
🔸1. Data abstraction from abstracts/manuscripts
✅ ScoringReviewer:
🔸1. A simple task of abstract screening based on custom scoring by multiple agents
🔸2. Question answering with RAG (Retrieval Augmented Generation)
🔸3. Image analysis by LatteReview
✅ Custom Reviewer:
🔸1. How to Customize the AbstractReviewer Agent for Your Needs
🔸2. Chat with the agents and other base functionalities
🔸3.: Combination of differnet agents for a comprehensive literature review
🛣️ Roadmap for Future Features
- Implementing LiteLLM to add support for additional model providers
- Draft the package full documentation
- Enable agents to return a percentage of certainty
- Enable agents to be grounded in static references (text provided by the user)
- Enable agents to be grounded in dynamic references (i.e., recieve a function that outputs a text based on the input text. This function could, e.g., be a RAG function.)
- Support for image-based inputs and multimodal analysis
- Development of
AbstractionReviewerclass for automated paper summarization - Showcase how
AbstractionReviewerclass could be used to analyse the literature around a certain topic. - Adding a tutorial example and also a section to the docs on how to create custom reviewer agents.
- Adding a
TitleAbstractRevieweragent and adding a tutorial for it. - Evaluating LatteReview.
- Writing the white paper for the package and public launch
- Addign support for
RISfiles. - Adding support for models without structured-output (json_schema) capability via an automatic JSON-mode fallback (e.g., DeepSeek).
- Supporting the newest reasoning models (GPT-6, Claude 5, Gemini 3.x) with automatic handling of parameters they reject.
- Development of a no-code web application
- (for v>) Adding conformal prediction tool for calibrating agents on their certainty scores
- (for v>2.0.0) Adding a dialogue tool for enabling agents to seek external help (from helper agents or parallel reviewer agents) during review.
- (for v>2.0.0) Adding a memory component to the agents for saving their own insights or insightful feedback they receive from the helper agents.
👨💻 Author
|
|
Pouria Rouzrokh, MD, MPH, MHPE Medical Practitioner and Machine Learning Engineer Incoming Radiology Resident @Yale University Former Data Scientist @Mayo Clinic AI Lab |
❤️ Support LatteReview
If you find LatteReview helpful in your research or work, consider supporting its continued development. Since we're already sharing a virtual coffee break while reviewing papers, maybe you'd like to treat me to a real one? ☕ 😊
Ways to Support:
- Become my sponsor on GitHub
- Treat me to a cup of coffee on Ko-fi ☕
- Star the repository to help others discover the project
- Submit bug reports, feature requests, or contribute code
- Share your experience using LatteReview in your research
📜 License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (see the LICENSE file). To view a copy of this license, visit creativecommons.org/licenses/by-nc-nd/4.0.
🤝 Contributing
I welcome contributions! Please feel free to submit a Pull Request.
Acknowledgement
I would like to express my heartfelt gratitude to Moein Shariatnia for his invaluable support and contributions to this project.
📚 Citation
If you use LatteReview in your research, please cite our paper:
@misc{rouzrokh2025lattereview,
title={LatteReview: A Multi-Agent Framework for Systematic Review Automation Using Large Language Models},
author={Pouria Rouzrokh and Moein Shariatnia},
year={2025},
eprint={2501.05468},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
Metadata
Release files for lattereview 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lattereview-1.2.0.tar.gz | 42.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lattereview-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.4 kB
Release files / lattereview-1.2.0.tar.gz
| Download URL | lattereview-1.2.0.tar.gz |
|---|---|
| Size | 42.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f56f853614ee46a36e80b4068ec23fd287968e08edbab2ea5e2319e61c3db695
|
|
BLAKE2b-256 checksum How to use checksums |
d07bd0f4540c222bebfbddbf7a827c2d73c5f735d2344290e0abedcb38edb850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / lattereview-1.2.0-py3-none-any.whl
| Download URL | lattereview-1.2.0-py3-none-any.whl |
|---|---|
| Size | 44.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74d44bcfd4cd8a87dc45004a1409f9e702475e63d8d249ea0e33d704bf7421a8
|
|
BLAKE2b-256 checksum How to use checksums |
c84d65931b8579c99fb27449f3b71dac0e413e453b4352fdab68f2c28e401e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|