This guide provides quick setup instructions for deploying the Literature Review feature with ASReview integration.
Option A: Docker (Easiest)
# On GPU-enabled server
docker run -d \
--name asreview \
--gpus all \
-p 5275:5275 \
-v asreview-data:/data \
--restart unless-stopped \
asreview/asreview:latest \
asreview lab --host 0.0.0.0 --port 5275Option B: Python (Alternative)
# On GPU-enabled server
pip install asreview[all]
asreview lab --host 0.0.0.0 --port 5275 &Edit config.py:
# Enable Literature Review feature
ENABLE_LITERATURE_REVIEW = True
# Configure ASReview service URL
ASREVIEW_SERVICE_URL = "http://your-gpu-server:5275"Replace your-gpu-server with:
- IP address:
http://192.168.1.100:5275 - Hostname:
http://gpu-server.local:5275 - Same host:
http://localhost:5275
# Kill existing processes
pkill -f harvest_be.py
pkill -f harvest_fe.py
# Start HARVEST
python3 launch_harvest.py# Check ASReview connectivity
curl http://localhost:5001/api/literature-review/healthExpected output:
{
"ok": true,
"available": true,
"configured": true,
"version": "1.x.x"
}- Login to HARVEST admin panel
- Go to Literature Search tab
- Search for papers: e.g., "CRISPR gene editing"
- Review results
- Click "Start Literature Review" button
- Enter project name: "CRISPR Review 2024"
- Select ML model: "Naive Bayes" (default)
- Click "Create Project"
- Review paper presented (title, abstract, authors)
- Mark as:
- ✅ Relevant: Meets your criteria
- ❌ Irrelevant: Doesn't meet criteria
- Repeat for next paper (shown in order of predicted relevance)
- Stop when satisfied or all papers screened
- Click "Export Results"
- Select export format:
- Create new HARVEST project
- Download CSV
- Copy DOIs to clipboard
- Use relevant papers for annotation
Problem: ASREVIEW_SERVICE_URL not set
Solution:
# Edit config.py
nano config.py
# Add/update line:
ASREVIEW_SERVICE_URL = "http://gpu-server:5275"
# Restart HARVEST
python3 launch_harvest.pyProblem: Cannot reach ASReview service
Solutions:
-
Check ASReview is running:
curl http://gpu-server:5275/api/health
-
Check firewall allows port 5275:
sudo ufw allow 5275/tcp
-
Verify network connectivity:
ping gpu-server telnet gpu-server 5275
Problem: ASReview service not responding
Solutions:
-
Restart ASReview:
docker restart asreview # or pkill -f asreview asreview lab --host 0.0.0.0 --port 5275 &
-
Check ASReview logs:
docker logs asreview
-
Increase timeout in config.py:
ASREVIEW_REQUEST_TIMEOUT = 600 # 10 minutes
You have two main options for deploying ASReview with HARVEST. Choose based on your needs.
IMPORTANT: There is no on/off switch! You just configure which URL to use in config.py:
# Option 1: Nginx Direct Proxy (faster)
ASREVIEW_SERVICE_URL = "https://yourdomain.com/harvest/asreview"
# Option 2: HARVEST Proxy (simpler)
ASREVIEW_SERVICE_URL = "http://asreview-host:5123"That's it! The URL format determines which method is used:
- Full URL with path (e.g.,
https://domain.com/harvest/asreview) → Nginx proxies ASReview - Direct host:port (e.g.,
http://host:5123) → HARVEST proxies ASReview
No code changes needed to switch - just update config.py and restart HARVEST!
Quick Decision:
| Your Situation | Recommended Option |
|---|---|
| Production with nginx | ✅ Option 1 (Nginx Proxy) |
| Development/Testing | ✅ Option 2 (HARVEST Proxy) |
| No nginx access | ✅ Option 2 (HARVEST Proxy) |
| High traffic (10+ users) | ✅ Option 1 (Nginx Proxy) |
| Single user testing | ✅ Option 2 (HARVEST Proxy) |
| Want best performance | ✅ Option 1 (Nginx Proxy) |
| Want simplest setup | ✅ Option 2 (HARVEST Proxy) |
| Need to debug issues | ✅ Option 2 (HARVEST Proxy) |
Not sure? Start with Option 2 (HARVEST Proxy) - it's easier to set up and you can always switch to Option 1 later for better performance.
Best for: Production deployments, better performance, standard practice
This approach has nginx proxy ASReview directly, which is more efficient and offloads work from HARVEST.
# Proxy HARVEST application
location /harvest/ {
proxy_pass http://localhost:8050/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Proxy ASReview service with React SPA support
location /harvest/asreview/ {
# Remove /harvest/asreview prefix before passing to ASReview
rewrite ^/harvest/asreview/(.*) /$1 break;
# Proxy to ASReview service
# Replace with your ASReview host and port
proxy_pass http://asreview-host:5123;
# Standard proxy headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Timeouts
proxy_connect_timeout 10s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
# CRITICAL: Fix React SPA paths using sub_filter
# This injects a <base> tag to tell the browser where to resolve relative URLs
sub_filter_once off;
sub_filter_types text/html text/css application/javascript;
sub_filter '<head>' '<head><base href="/harvest/asreview/">';
# Also rewrite absolute paths in HTML/JS
sub_filter 'href="/' 'href="/harvest/asreview/';
sub_filter 'src="/' 'src="/harvest/asreview/';
# Disable redirect rewriting
proxy_redirect off;
# CORS headers (if needed)
add_header Access-Control-Allow-Origin "*" always;
}Then configure HARVEST to use the nginx-proxied ASReview:
# In config.py
ASREVIEW_SERVICE_URL = "https://yourdomain.com/harvest/asreview"Advantages:
- ✅ Better performance (one less hop)
- ✅ Offloads proxying to nginx (designed for this)
- ✅ Standard production practice
- ✅ Works with your existing nginx setup
Requirements:
- nginx
sub_filtermodule (usually included by default) - nginx configured with proper base path rewriting
Test nginx config before reloading:
sudo nginx -t
sudo systemctl reload nginxBest for: Development, testing, simpler deployments without nginx
Let HARVEST handle all ASReview proxying (nginx just proxies HARVEST):
# In your nginx configuration, just proxy to HARVEST
location /harvest/ {
proxy_pass http://localhost:8050/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Then configure HARVEST to connect directly to ASReview:
# In config.py
# Replace with your ASReview host and port
ASREVIEW_SERVICE_URL = "http://asreview-host:5123" # Direct connectionHow it works:
- Browser requests
/harvest/proxy/asreview/... - Nginx forwards to HARVEST frontend
- HARVEST's
/proxy/asreview/route forwards to ASReview service - HARVEST handles MIME type correction and base path injection automatically
- Browser receives correctly formatted responses
Advantages:
- ✅ HARVEST handles React SPA routing automatically (code already in place)
- ✅ No nginx sub_filter configuration needed
- ✅ Centralized proxy logic in HARVEST code (easier to debug)
- ✅ Works with ASReview on internal/private networks
Disadvantages:
- ❌ Extra hop adds latency (Browser → nginx → HARVEST → ASReview)
- ❌ Uses HARVEST server resources for proxying
Use Option 1 (nginx direct proxy) if:
- You're deploying to production
- You want best performance
- You're comfortable with nginx configuration
- You want to follow standard web server practices
- You have nginx with sub_filter module available
Use Option 2 (HARVEST proxy) if:
- You're in development/testing
- You want simpler configuration
- You don't have access to nginx config
- ASReview is on an internal/private network only accessible from HARVEST server
- You prefer centralized proxy logic
| Metric | Nginx Proxy | HARVEST Proxy |
|---|---|---|
| Latency per request | ~5-10ms | ~15-30ms |
| Server resource usage | Minimal | Medium |
| Concurrent users | Excellent (1000+) | Good (10-50) |
| Large file transfers | Very efficient | Good |
Verdict: Nginx proxy is 2-3x faster and more resource-efficient.
| Aspect | Nginx Proxy | HARVEST Proxy |
|---|---|---|
| Setup time | ~10 minutes | ~2 minutes |
| Configuration changes | 2 files (nginx + HARVEST) | 1 file (HARVEST only) |
| Requires nginx knowledge | Yes | No |
| Requires nginx access | Yes | No |
Verdict: HARVEST proxy is much simpler to set up.
| Aspect | Nginx Proxy | HARVEST Proxy |
|---|---|---|
| Log location | Nginx logs + HARVEST logs | HARVEST logs only |
| Error debugging | Need to check nginx | Python stack traces |
| Code inspection | nginx config file | Python code |
| Flexibility | Limited to nginx features | Full Python flexibility |
Verdict: HARVEST proxy is easier to debug and modify.
| Aspect | Nginx Proxy | HARVEST Proxy |
|---|---|---|
| Industry standard | Yes ✅ | No (custom) |
| Scalability | Excellent | Good |
| Load balancing | Native support | Requires code |
| Monitoring | Standard nginx tools | Custom implementation |
Verdict: Nginx proxy follows best practices for production.
Switching is easy - just configuration changes:
From HARVEST Proxy → Nginx Proxy:
- Update nginx config (add sub_filter directives)
- Test:
sudo nginx -t - Reload:
sudo systemctl reload nginx - Update HARVEST config.py:
ASREVIEW_SERVICE_URL = "https://yourdomain.com/harvest/asreview" - Restart HARVEST
From Nginx Proxy → HARVEST Proxy:
- Update HARVEST config.py:
ASREVIEW_SERVICE_URL = "http://asreview-host:5123" - Restart HARVEST
- (Optional) Remove sub_filter directives from nginx
No code changes needed - both options use the same Python proxy code as a fallback.
If ASReview doesn't load properly through nginx (Option 1):
-
Verify sub_filter module is available:
nginx -V 2>&1 | grep -o with-http_sub_module # Should output: with-http_sub_module
-
Check nginx logs for errors:
tail -f /var/log/nginx/error.log
-
Test the base tag injection by viewing page source:
curl https://yourdomain.com/harvest/asreview/ | grep -i "<base" # Should show: <base href="/harvest/asreview/">
-
Check Content-Type headers for static files:
curl -I https://yourdomain.com/harvest/asreview/static/js/main.xxx.js # Should return: Content-Type: application/javascript -
If sub_filter doesn't work, fall back to Option 2 (HARVEST proxy)
If you're currently using Option 2 and want to switch:
- Update nginx config with the Option 1 configuration
- Test nginx config:
sudo nginx -t - Update HARVEST config.py to point to nginx URL
- Reload nginx:
sudo systemctl reload nginx - Restart HARVEST:
python3 launch_harvest.py
No code changes needed - HARVEST's proxy at /proxy/asreview/ will still work but won't be used.
Ensure ASReview uses GPU:
# Check GPU available
nvidia-smi
# Run ASReview with GPU
docker run --gpus all ...- Naive Bayes: Fastest, good for <1000 papers
- Logistic Regression: Balanced, good for most cases
- Random Forest: Most accurate, slower
- SVM: Best for complex criteria, needs more training
For large reviews:
- Upload papers in batches of 500
- Screen in sessions of 50-100
- Export results regularly
- Read full documentation: LITERATURE_REVIEW.md
- Learn ASReview: https://asreview.ai/tutorials
- Configure advanced features: GPU optimization, custom models
- Integrate with HARVEST projects and annotation workflow
- HARVEST issues: Open GitHub issue
- ASReview documentation: https://asreview.readthedocs.io
- ASReview community: https://github.com/asreview/asreview/discussions
This checklist helps deploy the Literature Review feature to production.
Choose deployment method:
- Docker (recommended for production)
- Python virtual environment
- Systemd service
GPU Host Requirements:
- NVIDIA GPU available (check with
nvidia-smi) - Docker installed (if using Docker)
- Python 3.8+ (if using Python install)
- Network connectivity to HARVEST
Deploy ASReview:
# Option A: Docker
docker run -d \
--name asreview \
--gpus all \
-p 5275:5275 \
-v asreview-data:/data \
--restart unless-stopped \
asreview/asreview:latest \
asreview lab --host 0.0.0.0 --port 5275
# Option B: Python
pip install asreview[all]
asreview lab --host 0.0.0.0 --port 5275 &Verify service:
curl http://gpu-server:5275/api/health
# Should return: {"version": "...", "status": "ok"}Firewall rules:
- Allow port 5275 on GPU server
- Allow HARVEST → ASReview connectivity
# On GPU server
sudo ufw allow 5275/tcp
sudo ufw statusTest connectivity:
# From HARVEST server
telnet gpu-server 5275
curl http://gpu-server:5275/api/healthEdit config.py:
# Enable feature
ENABLE_LITERATURE_REVIEW = True
# Configure service URL
ASREVIEW_SERVICE_URL = "http://gpu-server:5275"
# Optional: API key
ASREVIEW_API_KEY = ""
# Timeouts
ASREVIEW_REQUEST_TIMEOUT = 300
ASREVIEW_CONNECTION_TIMEOUT = 10Or use environment variables:
export ASREVIEW_SERVICE_URL="http://gpu-server:5275"
export ASREVIEW_API_KEY=""Add to nginx.conf:
# ASReview service proxy
location /asreview/ {
proxy_pass http://gpu-server:5275/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_connect_timeout 10s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}Test nginx config:
sudo nginx -t
sudo systemctl reload nginxUpdate HARVEST config:
ASREVIEW_SERVICE_URL = "https://yourdomain.com/asreview"Test ASReview health:
curl http://localhost:5001/api/literature-review/healthExpected response:
{
"ok": true,
"available": true,
"configured": true,
"service_url": "http://gpu-server:5275",
"version": "1.x.x",
"status": "ok"
}Run integration tests (optional):
# Start mock service
python3 asreview_mock_service.py &
# Run tests
python3 test_literature_review_integration.py# Kill existing processes
pkill -f harvest_be.py
pkill -f harvest_fe.py
# Start HARVEST
python3 launch_harvest.py
# Or if using systemd
sudo systemctl restart harvestCheck logs:
# HARVEST logs
tail -f harvest.log
# ASReview logs (Docker)
docker logs -f asreview
# ASReview logs (systemd)
sudo journalctl -u asreview -fTest workflow:
- Login to HARVEST as admin
- Go to Literature Search tab
- Search for papers
- Click "Start Literature Review" (if frontend implemented)
- Or use API directly:
# Test API endpoint
curl -X GET \
http://localhost:5001/api/literature-review/health \
-H 'Cookie: session=...'Setup monitoring:
- ASReview service uptime
- GPU utilization
- API response times
- Error rates
Monitor ASReview:
# Check service status
curl http://gpu-server:5275/api/health
# Check GPU usage
nvidia-smi
# Check Docker stats
docker stats asreviewUpdate internal docs:
- Document ASReview service URL
- Document admin procedures
- Create runbook for common issues
- Train users on new feature
Backup procedures:
- ASReview data directory (
/datain Docker) - HARVEST database (includes project metadata)
- Configuration files
# Backup ASReview data
docker cp asreview:/data /backup/asreview-data-$(date +%Y%m%d)
# Backup HARVEST config
cp config.py /backup/config.py.$(date +%Y%m%d)Symptoms:
- Error in UI: "ASReview service not configured"
- Health check returns:
"configured": false
Solutions:
- Check
ASREVIEW_SERVICE_URLin config.py - Restart HARVEST to load new config
- Verify environment variables not overriding config
Symptoms:
- Error: "Cannot connect to ASReview service"
- Timeout on health check
Solutions:
-
Verify ASReview service is running:
curl http://gpu-server:5275/api/health
-
Check firewall rules:
sudo ufw status telnet gpu-server 5275
-
Check service logs:
docker logs asreview
Symptoms:
- Service responds but returns errors
- Slow response times
Solutions:
-
Check GPU availability:
nvidia-smi
-
Check resource usage:
docker stats asreview
-
Restart ASReview:
docker restart asreview
-
Check disk space:
df -h
Symptoms:
- "Unauthorized" errors
- Admin check fails
Solutions:
-
Verify admin user in HARVEST:
python3 create_admin.py
-
Check session cookies are set
-
Verify admin email in config
If deployment fails:
# In config.py
ENABLE_LITERATURE_REVIEW = Falsepkill -f harvest_be.py
pkill -f harvest_fe.py
python3 launch_harvest.pydocker stop asreview
# or
pkill -f asreviewcp /backup/config.py.YYYYMMDD config.pyWhen upgrading ASReview version:
docker cp asreview:/data /backup/asreview-data-upgradedocker stop asreview
docker rm asreviewdocker pull asreview/asreview:latestdocker run -d \
--name asreview \
--gpus all \
-p 5275:5275 \
-v asreview-data:/data \
--restart unless-stopped \
asreview/asreview:latest \
asreview lab --host 0.0.0.0 --port 5275curl http://gpu-server:5275/api/health- ASReview service not exposed to public internet
- Firewall rules restrict access to HARVEST only
- Use VPN for remote ASReview service
- HTTPS enabled for production (nginx)
- Admin authentication required
- Session management working correctly
- API key configured (if needed)
- ASReview service organization-controlled
- Data retention policy configured
- Backup encryption enabled
- Access logs enabled
# Check GPU memory
nvidia-smi --query-gpu=memory.used,memory.free --format=csv
# Limit GPU memory (if needed)
docker run ... -e TF_FORCE_GPU_ALLOW_GROWTH=true ...# Docker resource limits
docker run ... \
--memory=8g \
--cpus=4 \
...- Setup Prometheus/Grafana for metrics
- Monitor GPU utilization
- Track API response times
- Alert on errors
- All pre-deployment steps completed
- Service deployed and verified
- Monitoring configured
- Documentation updated
- Team trained
- Backup procedures in place
- Rollback procedure tested
Deployment Date: _______________
Deployed By: _______________
Service URL: _______________
Notes:
______________________________________________________________
______________________________________________________________
______________________________________________________________
- HARVEST Support: _______________
- ASReview Documentation: https://asreview.readthedocs.io
- IT Support: _______________
- GPU Server Admin: _______________
The Literature Review feature integrates ASReview, an AI-powered systematic review tool, into HARVEST. This feature helps researchers efficiently screen and shortlist literature by using active learning to predict paper relevance and prioritize review efforts.
ASReview is an open-source active learning tool for systematic literature reviews. It uses machine learning to:
- Learn from your decisions: The AI model trains on papers you mark as relevant or irrelevant
- Predict relevance: Estimates which unscreened papers are most likely to be relevant
- Prioritize screening: Shows you the most relevant papers first
- Reduce workload: Can reduce manual screening effort by 95% or more
- Efficient screening: Focus on likely-relevant papers first
- AI-assisted decisions: ML model learns your criteria over time
- Systematic approach: Structured review process with progress tracking
- Export results: Get list of relevant papers for further analysis
The Literature Review feature uses a remote service architecture for optimal performance:
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ │ │ │ │ │
│ HARVEST │ HTTP │ HARVEST │ HTTP │ ASReview │
│ Frontend │────────▶│ Backend │────────▶│ Service │
│ (Browser) │ │ (Flask) │ │ (GPU Server) │
│ │ │ │ │ │
└─────────────────┘ └──────────────────┘ └──────────────────┘
ASReview requires:
- GPU acceleration: For fast ML model training and inference
- ML dependencies: TensorFlow/PyTorch and other heavy libraries
- Computational resources: CPU/RAM for large datasets
By deploying ASReview on a separate GPU-enabled host, HARVEST remains lightweight while leveraging powerful ML capabilities when needed.
ASReview can be deployed in several ways:
# Pull official ASReview Docker image
docker pull asreview/asreview:latest
# Run ASReview service on GPU-enabled host
docker run -d \
--name asreview-service \
--gpus all \
-p 5275:5275 \
-v asreview-data:/data \
--restart unless-stopped \
asreview/asreview:latest \
asreview lab --host 0.0.0.0 --port 5275# On GPU-enabled server
ssh gpu-server
# Create virtual environment
python3 -m venv asreview-env
source asreview-env/bin/activate
# Install ASReview with GPU support
pip install asreview[all]
pip install tensorflow-gpu # or pytorch with GPU support
# Start ASReview service
asreview lab --host 0.0.0.0 --port 5275Create /etc/systemd/system/asreview.service:
[Unit]
Description=ASReview Service for HARVEST
After=network.target
[Service]
Type=simple
User=asreview
WorkingDirectory=/opt/asreview
ExecStart=/opt/asreview/venv/bin/asreview lab --host 0.0.0.0 --port 5275
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.targetThen enable and start:
sudo systemctl daemon-reload
sudo systemctl enable asreview
sudo systemctl start asreviewEdit /home/runner/work/HARVEST/HARVEST/config.py:
# Literature Review Configuration (ASReview Integration)
ENABLE_LITERATURE_REVIEW = True # Enable the feature
# ASReview Service URL - Update this with your ASReview server URL
ASREVIEW_SERVICE_URL = "http://asreview-gpu-host:5275"
# Optional: API key if your ASReview service requires authentication
ASREVIEW_API_KEY = ""
# Timeout settings
ASREVIEW_REQUEST_TIMEOUT = 300 # 5 minutes for long operations
ASREVIEW_CONNECTION_TIMEOUT = 10 # 10 seconds to establish connectionDirect Connection:
ASREVIEW_SERVICE_URL = "http://192.168.1.100:5275"Via Nginx Proxy:
ASREVIEW_SERVICE_URL = "https://yourdomain.com/asreview"Same Host (for testing):
ASREVIEW_SERVICE_URL = "http://localhost:5275"If using nginx proxy for ASReview service:
Add to your nginx configuration:
# ASReview service proxy
location /asreview/ {
proxy_pass http://asreview-gpu-host:5275/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Timeouts for long-running operations
proxy_connect_timeout 10s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}Restart HARVEST and check the Literature Review feature:
# Restart HARVEST
python3 launch_harvest.py
# Check ASReview connectivity
curl http://localhost:5001/api/literature-review/healthExpected response:
{
"ok": true,
"available": true,
"configured": true,
"service_url": "http://asreview-gpu-host:5275",
"version": "1.x.x",
"status": "ok"
}The Literature Review feature integrates with the existing Literature Search:
- Navigate to Literature Search tab
- Search for papers using semantic search
- Review and select papers of interest
- Click "Start Literature Review" button
When starting a literature review:
-
Project Name: Enter a descriptive name (e.g., "CRISPR Gene Editing Review 2024")
-
Description: Optional notes about review criteria
-
ML Model: Choose algorithm (Naive Bayes is default, recommended)
- Naive Bayes (nb): Fast, works well with small training sets
- SVM (svm): Powerful, requires more training data
- Random Forest (rf): Robust, good for complex criteria
- Logistic Regression (logistic): Interpretable, balanced performance
-
Prior Knowledge (optional):
- Mark papers you already know are relevant
- Mark papers you know are irrelevant
- Helps bootstrap the ML model
-
Click "Create Project" to upload papers to ASReview
ASReview presents papers in order of predicted relevance:
-
Review paper details:
- Title
- Authors
- Abstract
- Relevance score (0-100%)
-
Make decision:
- ✅ Relevant: Paper meets your criteria
- ❌ Irrelevant: Paper doesn't meet criteria
- 📝 Note (optional): Document reason for decision
-
Model learns: After each decision, the ML model updates and re-ranks remaining papers
-
Progress tracking: See how many papers reviewed, estimated remaining
Stop screening when:
- All papers reviewed: Systematic completion
- Diminishing returns: Several consecutive irrelevant papers
- Confidence threshold: Remaining papers below relevance threshold
Export relevant papers to:
- HARVEST Project: Create new annotation project
- Download CSV: Export for external tools
- Copy DOIs: Paste into other systems
ASReview learns your criteria from examples. For HARVEST use cases:
Relevant papers have:
- Experimental validation (in vivo/in vitro)
- Statistical analysis
- Replication studies
- Peer-reviewed
Irrelevant papers:
- Pure computational predictions
- Review articles
- Opinion pieces
- Preliminary conference abstracts
Relevant papers describe:
- Gene-phenotype relationships
- Protein-protein interactions
- Drug-target associations
- Pathway mechanisms
Irrelevant papers:
- General overviews
- Taxonomy papers
- Tool descriptions
- Unrelated organisms/systems
Relevant papers:
- Environmental stress experiments
- Molecular stress responses
- Survival/reproduction measurements
- Stress biomarkers
Irrelevant papers:
- Clinical/medical stress (wrong domain)
- Psychological stress
- Engineering stress analysis
GET /api/literature-review/healthReturns ASReview service status.
POST /api/literature-review/projects
Content-Type: application/json
{
"project_name": "My Review",
"description": "Optional description",
"model_type": "nb"
}POST /api/literature-review/projects/{project_id}/upload
Content-Type: application/json
{
"papers": [
{
"title": "Paper Title",
"abstract": "Abstract text",
"authors": ["Author 1", "Author 2"],
"doi": "10.1234/example",
"year": 2024
}
]
}POST /api/literature-review/projects/{project_id}/start
Content-Type: application/json
{
"prior_relevant": ["10.1234/relevant"],
"prior_irrelevant": ["10.5678/irrelevant"]
}GET /api/literature-review/projects/{project_id}/nextReturns next paper to screen.
POST /api/literature-review/projects/{project_id}/record
Content-Type: application/json
{
"paper_id": "10.1234/example",
"relevant": true,
"note": "Has experimental validation"
}GET /api/literature-review/projects/{project_id}/progressReturns review statistics.
GET /api/literature-review/projects/{project_id}/exportReturns list of relevant papers.
Symptom: "ASReview service not configured" error
Solutions:
- Check
ASREVIEW_SERVICE_URLin config.py - Verify ASReview service is running
- Test connectivity:
curl http://asreview-host:5275/api/health - Check firewall rules allow connections
Symptom: Request timeout errors
Solutions:
- Increase
ASREVIEW_REQUEST_TIMEOUTin config.py - Check network latency between HARVEST and ASReview
- Verify ASReview service has adequate resources
- Check nginx proxy timeout settings
Symptom: Slow paper screening, long waits
Solutions:
- Ensure ASReview service has GPU access
- Check GPU utilization:
nvidia-smi - Reduce concurrent reviews
- Upgrade to faster GPU
- Consider lighter ML model (nb instead of rf/svm)
Symptom: Poor relevance predictions, random ordering
Solutions:
- Provide more prior knowledge examples (5-10 relevant, 5-10 irrelevant)
- Be consistent in decision criteria
- Try different ML model type
- Ensure sufficient training data (>20 decisions)
Symptom: Browser console errors like:
Error: Could not establish connection. Receiving end does not exist.
GET https://domain.com/static/js/main.xxx.js NS_ERROR_CORRUPTED_CONTENT
The resource was blocked due to MIME type ("text/html") mismatch (X-Content-Type-Options: nosniff)
Cause: ASReview is a React Single Page Application (SPA) that serves static assets (JavaScript, CSS) from /static/ paths. When proxied through HARVEST, these assets may:
- Be served with incorrect MIME types (e.g.,
text/htmlinstead ofapplication/javascript) - Have incorrect base paths, causing the browser to request them from the wrong location
Solution: This issue has been fixed in the HARVEST proxy implementation. The proxy now:
- Detects correct MIME types from file extensions (
.js,.css,.json, etc.) - Injects
<base>tag into HTML responses to fix relative URL resolution - Overrides incorrect Content-Type headers for static assets
If you're still experiencing this issue after updating HARVEST:
-
Verify you have the latest version with the proxy fix:
cd /home/runner/work/HARVEST/HARVEST git pull -
Clear browser cache to remove cached responses:
- Open browser DevTools (F12)
- Right-click reload button → "Empty Cache and Hard Reload"
- Or use Incognito/Private mode
-
Check proxy configuration:
- Ensure
ASREVIEW_SERVICE_URLis correct in config.py - If using nginx, verify the proxy configuration passes all requests correctly
- Ensure
-
Verify ASReview service is returning correct responses:
# Test direct access to ASReview (should return HTML) curl -i http://asreview-host:5275/ # Test static file directly (should return JavaScript) curl -i http://asreview-host:5275/static/js/main.xxx.js
-
Check HARVEST logs for proxy errors:
tail -f harvest.log | grep -i "asreview\|proxy"
Technical Details:
- HARVEST's
/proxy/asreview/route now handles React SPA routing properly - HTML responses receive a
<base href="/proxy/asreview/">tag injection - Static assets (.js, .css, .json, fonts, images) have their Content-Type corrected
- This allows ASReview to load correctly within HARVEST's iframe
- Literature Review requires admin authentication
- All API endpoints check admin status
- Session-based authentication via cookies
- ASReview service should be on trusted network
- Use HTTPS for production deployments
- Configure firewall to restrict ASReview access
- Consider VPN for remote ASReview service
- Papers uploaded to ASReview service
- Service may store metadata temporarily
- Configure ASReview data retention policies
- Use organization-controlled ASReview instance
- One review per topic: Keep reviews focused
- Meaningful names: Use descriptive project names
- Document criteria: Note inclusion/exclusion criteria in description
- Export regularly: Save results incrementally
- Start with 10-20 decisions: Train model with diverse examples
- Be consistent: Apply same criteria throughout
- Add notes: Document decision rationale
- Review in sessions: Avoid decision fatigue
- Trust the model: Papers are prioritized intelligently
- Double-check borderline papers: Review low-confidence decisions
- Sample irrelevant papers: Periodically verify excluded papers
- Track agreement: Monitor consistency over time
- Export for validation: Have second reviewer check results
For optimal ASReview performance:
# Check GPU availability
nvidia-smi
# Set GPU memory growth (TensorFlow)
export TF_FORCE_GPU_ALLOW_GROWTH=true
# Limit GPU memory (if shared)
export CUDA_VISIBLE_DEVICES=0| Model Type | Speed | Accuracy | Data Needed | Best For |
|---|---|---|---|---|
| Naive Bayes | ⚡⚡⚡ | ⭐⭐ | Low | Quick reviews, small datasets |
| Logistic | ⚡⚡ | ⭐⭐⭐ | Medium | Balanced performance |
| SVM | ⚡ | ⭐⭐⭐ | High | Complex criteria, large datasets |
| Random Forest | ⚡⚡ | ⭐⭐⭐⭐ | High | Best accuracy, slower |
For large reviews (>1000 papers):
- Upload in batches of 500 papers
- Screen in sessions of 50-100 decisions
- Export results periodically
- Monitor memory usage on ASReview host
-
Search → Literature Search tab
- Query multiple sources
- Gather initial candidate papers
-
Review → Literature Review feature
- Upload papers to ASReview
- AI-assisted screening
- Shortlist relevant papers
-
Annotate → Annotate tab
- Extract entity relationships
- Add triples for relevant papers
- Build knowledge base
-
Analyze → Browse tab
- Query annotations
- Visualize relationships
- Export data
Link Literature Review with HARVEST Projects:
- Create HARVEST project from Literature Search
- Start Literature Review for same papers
- Export relevant papers from review
- Focus annotation efforts on reviewed papers
For advanced users, ASReview can be configured with:
- Custom feature extraction
- Ensemble models
- Transfer learning from previous reviews
- Domain-specific embeddings
See ASReview documentation for details.
Use ASReview client directly in Python:
from asreview_client import get_asreview_client
client = get_asreview_client()
# Create project
result = client.create_project("My Review")
project_id = result['project_id']
# Upload papers
papers = [...] # From literature search
client.upload_papers(project_id, papers)
# Start review
client.start_review(project_id)
# Screen papers
while True:
result = client.get_next_paper(project_id)
if result['paper'] is None:
break
paper = result['paper']
# Make decision (relevant = True/False)
relevant = decide_relevance(paper)
client.record_decision(project_id, paper['doi'], relevant)
# Export results
results = client.export_results(project_id)
relevant_papers = results['relevant_papers']For small teams or testing:
┌─────────────────────────────────┐
│ Same Host │
│ │
│ ┌──────────┐ ┌────────────┐ │
│ │ HARVEST │ │ ASReview │ │
│ │ :8050 │ │ :5275 │ │
│ └──────────┘ └────────────┘ │
│ │
└─────────────────────────────────┘
For production with GPU:
┌──────────────┐ ┌──────────────────┐
│ HARVEST │ │ GPU Server │
│ Server │ HTTP │ │
│ │────────▶│ ASReview Service │
│ Web + API │ │ :5275 │
└──────────────┘ └──────────────────┘
For enterprise deployments:
┌─────────────────┐
│ Nginx Proxy │
│ :443 (HTTPS) │
└────────┬────────┘
│
┌───────────────┴───────────────┐
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ HARVEST │ │ ASReview │
│ /harvest/* │ │ /asreview/* │
│ :8050 │ │ :5275 │
└─────────────────┘ └─────────────────┘
Planned features:
- Collaborative reviews: Multiple reviewers with conflict resolution
- Review templates: Pre-configured criteria for common review types
- Citation network: Visualize paper relationships
- Automated exports: Schedule exports to HARVEST projects
- Progress dashboards: Visualize review progress over time
- Quality metrics: Inter-rater reliability, decision confidence
- HARVEST README:
/README.md - ASReview Documentation: https://asreview.readthedocs.io
- ASReview GitHub: https://github.com/asreview/asreview
- Check this documentation
- Review ASReview tutorials: https://asreview.ai/tutorials
- Open GitHub issue for HARVEST integration problems
- Contact ASReview community for ASReview-specific questions
If you use this feature in research, please cite:
HARVEST: (Add HARVEST citation here)
ASReview:
van de Schoot, R., de Bruin, J., Schram, R., Zahedi, P., de Boer, J., Weijdema, F., ...
& Oberski, D. L. (2021). ASReview: Open Source Software for Efficient and Transparent
Active Learning for Systematic Reviews. Nature Machine Intelligence, 3(2), 125–133.
https://doi.org/10.1038/s42256-020-00287-7
ASReview is licensed under Apache License 2.0. See ASReview project for details.