Base LLMs comment on 73.5% of completely clean PRs. Prism is fine-tuned with 25% negative clean examples to maintain silence on defect-free code, reaching 96.8% of Claude 3.5 Sonnet's F1 score at 37.1Ã lower cost.
Test Prism's ability to converse with developers on pull requests. When a developer explains that an input is already sanitized upstream, Prism concedes gracefully rather than stubbornly arguing.
â ī¸ STD-SEC-01: Parameterized Database Queries
Raw string formatting detected in SQL execution. An untrusted user_id variable could allow SQL injection if passed directly into the query string.
Prism grounds all review findings in explicit engineering standards rather than vague stylistic opinions. The hybrid BM25 + dense retrieval system matches diff context directly against these rules.
Benchmark conducted across 300+ real pull requests mined from 24 open-source repositories (FastAPI, Vite, tRPC, Pydantic, HTTPX). Test split is strictly decontaminated with zero repository overlap.
| Model / Architecture | Precision | Recall | F1 Score | Clean PR FPR | p50 Latency | Cost / 10k PRs |
|---|---|---|---|---|---|---|
| Frontier API (Claude 3.5 Sonnet) | 0.9675 | 0.9551 | 0.9613 | 5.88% | 251.5 ms | $133.40 |
| Mid-Size API (Claude 3.5 Haiku) | 0.9062 | 0.9295 | 0.9177 | 17.65% | 110.1 ms | $33.50 |
| Base Qwen2.5-Coder-7B (Zero-Shot) | 0.6782 | 0.7564 | 0.7152 | 73.53% (High Noise) | 60.7 ms | $9.80 |
| Fine-Tuned 7B (BF16 Full) | 0.8889 | 0.9744 | 0.9297 | 29.41% | 60.7 ms | $9.80 |
| Fine-Tuned 7B (AWQ 4-bit) đ Prism | 0.9187 | 0.9423 | 0.9304 | 23.53% | 40.5 ms | $3.60 |
| AST Linters (flake8 / eslint) | 0.0000 | 0.0000 | 0.0000 | 0.00% | 0.0 ms | $0.00 |