š Improved Ollama Review Guide
Guides developers in configuring an AI code review tool that filters false positives and understands project context.
What this file does
Guides developers in configuring an AI code review tool that filters false positives and understands project context.
When to use it
- Setting up AI-powered code review for a project
- Reducing noise from automated review suggestions
- Customizing review focus for specific codebases
- Improving review accuracy with ensemble models
Assumes this stack
š Improved Ollama Review Guide
What's New
- ā Project context - AI now understands your Pacific Disaster Platform
- ā Better prompts - Focuses on real bugs, not style opinions
- ā False positive filtering - Removes known bad advice automatically
- ā Ensemble mode ready - Multi-model consensus for better accuracy
Quick Start
Best Quality (Recommended)
# Enable ensemble mode
echo "USE_ENSEMBLE=true" >> .env.local
# Run review
npm run ollama:review
Fast Review (Good for quick checks)
npm run ollama:fast
Review Specific File
npm run ollama:review -- src/components/YourComponent.tsx
Quality Improvements
Before (ā Old Issues)
- False claims about aria-label
- Nitpicky style suggestions
- Generic "add comments" advice
- Wrong framework assumptions
After (ā New Behavior)
- Focused on real bugs only
- Understands Next.js/React patterns
- Knows your project context
- Filters out false positives
How to Customize
1. Adjust Project Context
Edit .ollama-context.md to add:
- New patterns to ignore
- Specific things to check
- Project-specific conventions
2. Add More False Positive Filters
In scripts/ollama-review.js, add patterns to filterFalsePositives():
const falsePositivePatterns = [
/your-pattern-here/i,
// Add more...
];
3. Change Review Focus
Modify getReviewFocus() in the script to emphasize different areas.
Best Practices
ā DO Use For:
- Pre-commit checks - Catch bugs before pushing
- Complex logic - Get second opinion on tricky code
- New features - Quick sanity check
- Learning - Understand potential issues
ā DON'T Rely On For:
- Final say - Human review is still essential
- Framework expertise - AI can be wrong about React/Next.js
- Architecture - Complex decisions need human judgment
- Security audits - Use dedicated security tools
Troubleshooting
"Too many false positives"
- Check
.ollama-context.mdhas your patterns - Add more filters to
filterFalsePositives() - Use ensemble mode for consensus
"Review too generic"
- Add more specific context to
.ollama-context.md - Update
getReviewFocus()for your file types - Try different models (qwen2.5:14b is best)
"Missing real issues"
- Enable ensemble mode
- Reduce
SKIP_TRIVIALthreshold - Review more files at once (context helps)
Model Recommendations
| Task | Model | Why |
|---|---|---|
| Deep review | qwen2.5:14b-instruct | Best reasoning, catches real issues |
| Fast check | gemma2:2b | Quick, good for obvious bugs |
| Consensus | Multiple (ensemble) | Best accuracy, reduces false positives |
Metrics
Track your improvements:
- Bugs caught before production
- False positives reduced
- Time saved in reviews
- Team agreement with suggestions
Good luck! š
What's inside
7 sections covering setup, customization, best practices, troubleshooting, and model recommendations with code examples.
Change this for your project
- Replace
Pacific Disaster Platformwith your project context - Replace
.ollama-context.mdwith your own context file - Replace
scripts/ollama-review.jswith your script path - Replace
qwen2.5:14b-instructwith your preferred model
Where it goes
Keep alongside your test suite. Used to define and score model evaluations.
Worth borrowing
- Ensemble mode using multiple models to reduce false positives
- Explicit false positive filtering via pattern matching in a dedicated function
Related Documents
AI Tools for Developers
Curates a personal reference of AI coding tools, models, and setup instructions for VS Code, Xcode, and Cursor.
Voice AI Leaderboards, Benchmarks, and Evaluation Gaps (Jan 2025 -- Feb 2026)
Surveys 20+ voice AI benchmarks from Jan 2025, Feb 2026, identifies evaluation gaps, and provides leaderboard data for STT, TTS, and end-to-end voice agents.
Evaluating AI Agent Systems: Metrics, Benchmarks, and Quality Assurance (2024-2026)
Surveys 2024-2026 metrics, benchmarks, and monitoring tools for evaluating AI agent systems, with recommendations for a self-improving coding agent.
IATA BCBP Standard Compliance
Documents which IATA BCBP fields and barcode formats a Swift library implements, including Version 8 gender code support.