Add Mercury and Microsoft decision benchmarks
#39
by jfbrown95 - opened
- .gitattributes +2 -0
- README.md +33 -6
- assets/bug-tradeoff.svg +10 -4
- assets/lint-tradeoff.svg +8 -2
- assets/security-tradeoff.svg +10 -4
- openrouter-decisions-manifest.json +22 -0
- openrouter_decisions.py +334 -0
- predictions/current/bug/mercury-decide.jsonl +0 -0
- predictions/current/bug/microsoft-decision-1.jsonl +0 -0
- predictions/current/lint/mercury-decide.jsonl +0 -0
- predictions/current/lint/microsoft-decision-1.jsonl +0 -0
- predictions/current/security/mercury-decide.jsonl +0 -0
- predictions/current/security/microsoft-decision-1.jsonl +0 -0
- results-current.jsonl +12 -0
- results.jsonl +12 -0
- test_openrouter_decisions.py +92 -0
- tradeoff.py +4 -0
.gitattributes
CHANGED
|
@@ -60,3 +60,5 @@ predictions/current/*/gliner25-decide.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
| 60 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 61 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 62 |
predictions/current/*/openai-decisions.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 60 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 61 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 62 |
predictions/current/*/openai-decisions.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
predictions/current/*/mercury-decide.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
predictions/current/*/microsoft-decision-1.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -25,6 +25,8 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
|
|
| 25 |
| [CodeQL](https://codeql.github.com/) | Local CPU run in Docker; CodeQL CLI 2.27.1 |
|
| 26 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | [OpenAI Decisions API](https://api.openai.com/v1/decisions) (`gpt-6-luna`) |
|
| 27 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | [Fastino classification API](https://api.fastino.ai/v1/chat/completions) (`fastino/GLiNER-2.5-Decide`) |
|
|
|
|
|
|
|
| 28 |
|
| 29 |
<!-- BEGIN TRADEOFF_RESULTS -->
|
| 30 |
|
|
@@ -48,8 +50,10 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 48 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 49 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | **0** | $1.102 |
|
| 50 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | **0** | $0.239 |
|
|
|
|
| 51 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 17.7% | 12.7% | 5.0% | **0** | $0.551 |
|
| 52 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.0% | 39.7% | 3.3% | **0** | $0.239 |
|
|
|
|
| 53 |
| [TypeLLM](https://typellm.ai/docs) | 8.3% | 5.5% | 2.7% | **0** | $0.576 |
|
| 54 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 25.3% | 22.6% | 2.7% | **0** | $0.182 |
|
| 55 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 4.1% | 2.5% | 1.6% | **0** | Free tier |
|
|
@@ -66,7 +70,9 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 66 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | **0** | $0.247 |
|
| 67 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | **0** | $0.054 |
|
| 68 |
| [TypeLLM](https://typellm.ai/docs) | 11.3% | 5.8% | 5.6% | **0** | $0.129 |
|
|
|
|
| 69 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.0% | 15.6% | 4.5% | **0** | $0.123 |
|
|
|
|
| 70 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 28.5% | 24.3% | 4.2% | **0** | $0.040 |
|
| 71 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.3% | 41.8% | 2.6% | **0** | $0.054 |
|
| 72 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 5.2% | 3.0% | 2.2% | **0** | Free tier |
|
|
@@ -86,12 +92,14 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 86 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 34.6% | 23.6% | **11.0%** | **0** | $0.507 |
|
| 87 |
| [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | **0** | $0.566 |
|
| 88 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | **0** | $1.469 |
|
|
|
|
| 89 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 55.6% | 46.8% | 8.8% | **0** | Free tier |
|
| 90 |
-
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | **0** |
|
|
|
|
| 91 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | **0** | $0.251 |
|
| 92 |
| [CodeQL](https://codeql.github.com/)* | 4.8% | 1.5% | 3.3% | — | — |
|
| 93 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.1% | **1.6%** | 0.5% | 6 | $0.434 |
|
| 94 |
-
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | **100.0%** | 99.9% | 0.1% | **0** |
|
| 95 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | **0** | ~$1.432 |
|
| 96 |
|
| 97 |
\* CodeQL scored 305 pairs in Python, JavaScript, TypeScript, C and C++; 18 additional pairs could not be scored because source recovery, source verification or analysis failed. [Details](CODEQL.md) · [Method decisions](codeql-comparison/)
|
|
@@ -103,11 +111,13 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 103 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 40.5% | 31.5% | **9.0%** | **0** | $0.530 |
|
| 104 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 34.2% | 29.0% | 5.2% | **0** | Free tier |
|
| 105 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.6% | 16.7% | 3.9% | **0** | $0.182 |
|
| 106 |
-
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | **0** |
|
| 107 |
| [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | **0** | $0.203 |
|
|
|
|
|
|
|
| 108 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.0% | **1.5%** | 0.6% | 1 | $0.142 |
|
| 109 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | **0** | ~$0.528 |
|
| 110 |
-
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | **100.0%** | 100.0% | 0.0% | **0** |
|
| 111 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 8.0% | 8.1% | -0.1% | **0** | $0.091 |
|
| 112 |
|
| 113 |
## Perch Lint Bench
|
|
@@ -120,12 +130,14 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 120 |
|
| 121 |
| Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
|
| 122 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 123 |
-
| [
|
|
|
|
| 124 |
| [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | **0** | $0.050 |
|
| 125 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | **0** | $0.048 |
|
| 126 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.1% | 0.9% | 48.1% | **0** | Free tier |
|
| 127 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | **0** | $0.018 |
|
| 128 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 50.0% | 11.2% | 38.8% | **0** | $0.014 |
|
|
|
|
| 129 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 38.8% | 37.4% | 1.4% | **0** | **~$0.010** |
|
| 130 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 32.2% | 31.3% | 0.9% | **0** | $0.018 |
|
| 131 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | **$0.010** |
|
|
@@ -134,11 +146,13 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
|
|
| 134 |
|
| 135 |
| Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
|
| 136 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 137 |
-
| [
|
|
|
|
| 138 |
| [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | **0** | $0.016 |
|
| 139 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | **0** | $0.016 |
|
| 140 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.3% | 1.4% | 47.9% | **0** | Free tier |
|
| 141 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | **0** | $0.006 |
|
|
|
|
| 142 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.1% | 8.5% | 36.6% | **0** | $0.005 |
|
| 143 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.7% | 49.3% | 1.4% | **0** | **~$0.003** |
|
| 144 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | $0.004 |
|
|
@@ -160,6 +174,8 @@ JevLike (192-byte input), Laya (512-token input), and Kev (packed-branch limit)
|
|
| 160 |
|
| 161 |
GPT-6 Luna Decisions receives each method's saved context with all applicable checks as two-option choice questions in one request. True and false criteria define the options. Semantic lint scores invert the probability that the rule is satisfied. Costs use API-reported input tokens at [$0.10 per million](https://developers.openai.com/api/docs/guides/decisions#pricing-and-availability); output and cache operations carry no extra charge.
|
| 162 |
|
|
|
|
|
|
|
| 163 |
## Files and reproduction
|
| 164 |
|
| 165 |
- [`results-current.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results-current.jsonl): current-pack aggregate results for public and private splits; no private pair data.
|
|
@@ -173,6 +189,7 @@ GPT-6 Luna Decisions receives each method's saved context with all applicable ch
|
|
| 173 |
- [`gliner_decide.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/gliner_decide.py): runs GLiNER-2.5-Decide through its native classification endpoint, saves returned confidences and failed requests, and scores each completed track.
|
| 174 |
- [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
|
| 175 |
- [`openai_decisions.py`](openai_decisions.py) and [`openai-decisions-manifest.json`](openai-decisions-manifest.json): resumable Decisions API scorer and public benchmark file checksums.
|
|
|
|
| 176 |
- [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
|
| 177 |
|
| 178 |
To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
|
|
@@ -213,6 +230,16 @@ are recorded as failed requests, without a probability score. The six-set local
|
|
| 213 |
run used 24 workers and a request limiter of 1.5 million estimated input tokens
|
| 214 |
per minute. Recorded method elapsed times include client throttling and rate-limit backoff. The public manifest contains only the three public sets.
|
| 215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
## License
|
| 217 |
|
| 218 |
Everything here except the scripts is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): the results, predictions, question pack and this card. The scripts (`*.py`, `*.mjs` and `adapters/`) are licensed under MIT. The pair data is in the [bug](https://huggingface.co/datasets/perchscan/bug-pairs-public), [security](https://huggingface.co/datasets/perchscan/security-pairs-public) and [lint](https://huggingface.co/datasets/perchscan/perch-lint-bench-public) datasets, each with its own license. See their cards for the data sources.
|
|
|
|
| 25 |
| [CodeQL](https://codeql.github.com/) | Local CPU run in Docker; CodeQL CLI 2.27.1 |
|
| 26 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | [OpenAI Decisions API](https://api.openai.com/v1/decisions) (`gpt-6-luna`) |
|
| 27 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | [Fastino classification API](https://api.fastino.ai/v1/chat/completions) (`fastino/GLiNER-2.5-Decide`) |
|
| 28 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`inception/mercury-decide`) |
|
| 29 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`microsoft/microsoft-decision-1`, Azure) |
|
| 30 |
|
| 31 |
<!-- BEGIN TRADEOFF_RESULTS -->
|
| 32 |
|
|
|
|
| 50 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 51 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | **0** | $1.102 |
|
| 52 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | **0** | $0.239 |
|
| 53 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 24.0% | 18.8% | 5.1% | **0** | $0.481 |
|
| 54 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 17.7% | 12.7% | 5.0% | **0** | $0.551 |
|
| 55 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.0% | 39.7% | 3.3% | **0** | $0.239 |
|
| 56 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 8.8% | 5.6% | 3.2% | 1 | $0.224 |
|
| 57 |
| [TypeLLM](https://typellm.ai/docs) | 8.3% | 5.5% | 2.7% | **0** | $0.576 |
|
| 58 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 25.3% | 22.6% | 2.7% | **0** | $0.182 |
|
| 59 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 4.1% | 2.5% | 1.6% | **0** | Free tier |
|
|
|
|
| 70 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | **0** | $0.247 |
|
| 71 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | **0** | $0.054 |
|
| 72 |
| [TypeLLM](https://typellm.ai/docs) | 11.3% | 5.8% | 5.6% | **0** | $0.129 |
|
| 73 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 25.5% | 20.6% | 4.8% | **0** | $0.108 |
|
| 74 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.0% | 15.6% | 4.5% | **0** | $0.123 |
|
| 75 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 9.4% | 5.1% | 4.4% | **0** | $0.050 |
|
| 76 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 28.5% | 24.3% | 4.2% | **0** | $0.040 |
|
| 77 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.3% | 41.8% | 2.6% | **0** | $0.054 |
|
| 78 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 5.2% | 3.0% | 2.2% | **0** | Free tier |
|
|
|
|
| 92 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 34.6% | 23.6% | **11.0%** | **0** | $0.507 |
|
| 93 |
| [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | **0** | $0.566 |
|
| 94 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | **0** | $1.469 |
|
| 95 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 27.1% | 17.8% | 9.3% | **0** | **$0.131** |
|
| 96 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 55.6% | 46.8% | 8.8% | **0** | Free tier |
|
| 97 |
+
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | **0** | $0.208 |
|
| 98 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.9% | 38.2% | 5.6% | **0** | $0.455 |
|
| 99 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | **0** | $0.251 |
|
| 100 |
| [CodeQL](https://codeql.github.com/)* | 4.8% | 1.5% | 3.3% | — | — |
|
| 101 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.1% | **1.6%** | 0.5% | 6 | $0.434 |
|
| 102 |
+
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | **100.0%** | 99.9% | 0.1% | **0** | $0.208 |
|
| 103 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | **0** | ~$1.432 |
|
| 104 |
|
| 105 |
\* CodeQL scored 305 pairs in Python, JavaScript, TypeScript, C and C++; 18 additional pairs could not be scored because source recovery, source verification or analysis failed. [Details](CODEQL.md) · [Method decisions](codeql-comparison/)
|
|
|
|
| 111 |
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 40.5% | 31.5% | **9.0%** | **0** | $0.530 |
|
| 112 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 34.2% | 29.0% | 5.2% | **0** | Free tier |
|
| 113 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.6% | 16.7% | 3.9% | **0** | $0.182 |
|
| 114 |
+
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | **0** | $0.074 |
|
| 115 |
| [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | **0** | $0.203 |
|
| 116 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 11.1% | 9.0% | 2.1% | **0** | **$0.047** |
|
| 117 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 18.1% | 16.7% | 1.4% | **0** | $0.163 |
|
| 118 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.0% | **1.5%** | 0.6% | 1 | $0.142 |
|
| 119 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | **0** | ~$0.528 |
|
| 120 |
+
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | **100.0%** | 100.0% | 0.0% | **0** | $0.074 |
|
| 121 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 8.0% | 8.1% | -0.1% | **0** | $0.091 |
|
| 122 |
|
| 123 |
## Perch Lint Bench
|
|
|
|
| 130 |
|
| 131 |
| Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
|
| 132 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 133 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **81.8%** | 6.5% | **75.2%** | **0** | $0.020 |
|
| 134 |
+
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 76.6% | 4.7% | 72.0% | **0** | $0.093 |
|
| 135 |
| [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | **0** | $0.050 |
|
| 136 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | **0** | $0.048 |
|
| 137 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.1% | 0.9% | 48.1% | **0** | Free tier |
|
| 138 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | **0** | $0.018 |
|
| 139 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 50.0% | 11.2% | 38.8% | **0** | $0.014 |
|
| 140 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 38.3% | 1.9% | 36.4% | **0** | $0.041 |
|
| 141 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 38.8% | 37.4% | 1.4% | **0** | **~$0.010** |
|
| 142 |
| [SemiF](https://github.com/TheoLeeCJ/SemIf) | 32.2% | 31.3% | 0.9% | **0** | $0.018 |
|
| 143 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | **$0.010** |
|
|
|
|
| 146 |
|
| 147 |
| Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
|
| 148 |
| --- | ---: | ---: | ---: | ---: | ---: |
|
| 149 |
+
| [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **87.3%** | 8.5% | **78.9%** | **0** | $0.006 |
|
| 150 |
+
| [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 84.5% | 7.0% | 77.5% | **0** | $0.030 |
|
| 151 |
| [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | **0** | $0.016 |
|
| 152 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | **0** | $0.016 |
|
| 153 |
| [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.3% | 1.4% | 47.9% | **0** | Free tier |
|
| 154 |
| [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | **0** | $0.006 |
|
| 155 |
+
| [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.7% | 1.4% | 42.3% | **0** | $0.013 |
|
| 156 |
| [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.1% | 8.5% | 36.6% | **0** | $0.005 |
|
| 157 |
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.7% | 49.3% | 1.4% | **0** | **~$0.003** |
|
| 158 |
| [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | $0.004 |
|
|
|
|
| 174 |
|
| 175 |
GPT-6 Luna Decisions receives each method's saved context with all applicable checks as two-option choice questions in one request. True and false criteria define the options. Semantic lint scores invert the probability that the rule is satisfied. Costs use API-reported input tokens at [$0.10 per million](https://developers.openai.com/api/docs/guides/decisions#pricing-and-availability); output and cache operations carry no extra charge.
|
| 176 |
|
| 177 |
+
Mercury Decide and Microsoft-Decision-1 receive each method's saved context with the applicable checks through OpenRouter's native SystemOne interface. Their returned probabilities use the same question floors and semantic lint cutoff. Costs come from the API's reported `usage.cost`.
|
| 178 |
+
|
| 179 |
## Files and reproduction
|
| 180 |
|
| 181 |
- [`results-current.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results-current.jsonl): current-pack aggregate results for public and private splits; no private pair data.
|
|
|
|
| 189 |
- [`gliner_decide.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/gliner_decide.py): runs GLiNER-2.5-Decide through its native classification endpoint, saves returned confidences and failed requests, and scores each completed track.
|
| 190 |
- [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
|
| 191 |
- [`openai_decisions.py`](openai_decisions.py) and [`openai-decisions-manifest.json`](openai-decisions-manifest.json): resumable Decisions API scorer and public benchmark file checksums.
|
| 192 |
+
- [`openrouter_decisions.py`](openrouter_decisions.py) and [`openrouter-decisions-manifest.json`](openrouter-decisions-manifest.json): resumable native SystemOne scorer and public benchmark file checksums.
|
| 193 |
- [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
|
| 194 |
|
| 195 |
To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
|
|
|
|
| 230 |
run used 24 workers and a request limiter of 1.5 million estimated input tokens
|
| 231 |
per minute. Recorded method elapsed times include client throttling and rate-limit backoff. The public manifest contains only the three public sets.
|
| 232 |
|
| 233 |
+
To run Mercury Decide or Microsoft-Decision-1, download the three public files into the same directories listed above, install `httpx`, and set `OPENROUTER_API_KEY`:
|
| 234 |
+
|
| 235 |
+
```sh
|
| 236 |
+
python3 -m pip install httpx
|
| 237 |
+
python3 openrouter_decisions.py --model inception/mercury-decide --manifest openrouter-decisions-manifest.json --out mercury-results
|
| 238 |
+
python3 openrouter_decisions.py --model microsoft/microsoft-decision-1 --manifest openrouter-decisions-manifest.json --out microsoft-results
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
The paid endpoints use the full saved context. Mercury’s free endpoint is available with `--model inception/mercury-decide:free`; its daily account quota can pause a run. Rerun the same command to resume saved outcomes.
|
| 242 |
+
|
| 243 |
## License
|
| 244 |
|
| 245 |
Everything here except the scripts is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): the results, predictions, question pack and this card. The scripts (`*.py`, `*.mjs` and `adapters/`) are licensed under MIT. The pair data is in the [bug](https://huggingface.co/datasets/perchscan/bug-pairs-public), [security](https://huggingface.co/datasets/perchscan/security-pairs-public) and [lint](https://huggingface.co/datasets/perchscan/perch-lint-bench-public) datasets, each with its own license. See their cards for the data sources.
|
assets/bug-tradeoff.svg
CHANGED
|
|
|
|
assets/lint-tradeoff.svg
CHANGED
|
|
|
|
assets/security-tradeoff.svg
CHANGED
|
|
|
|
openrouter-decisions-manifest.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"datasets": [
|
| 3 |
+
{
|
| 4 |
+
"split": "public",
|
| 5 |
+
"domain": "lint",
|
| 6 |
+
"path": "public/lint/benchmark.jsonl",
|
| 7 |
+
"sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75"
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"split": "public",
|
| 11 |
+
"domain": "bug",
|
| 12 |
+
"path": "public/bug/benchmark.jsonl",
|
| 13 |
+
"sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"split": "public",
|
| 17 |
+
"domain": "security",
|
| 18 |
+
"path": "public/security/benchmark.jsonl",
|
| 19 |
+
"sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8"
|
| 20 |
+
}
|
| 21 |
+
]
|
| 22 |
+
}
|
openrouter_decisions.py
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Benchmark decision models through OpenRouter's native SystemOne endpoint.
|
| 3 |
+
|
| 4 |
+
Run every before/after method independently with the frozen Perch questions.
|
| 5 |
+
Resume saved outcomes; timeouts and invalid answers are failed methods.
|
| 6 |
+
"""
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import argparse
|
| 10 |
+
from concurrent.futures import FIRST_COMPLETED, ThreadPoolExecutor, wait
|
| 11 |
+
import hashlib
|
| 12 |
+
from itertools import zip_longest
|
| 13 |
+
import json
|
| 14 |
+
import math
|
| 15 |
+
import os
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
import threading
|
| 18 |
+
import time
|
| 19 |
+
|
| 20 |
+
import httpx
|
| 21 |
+
import openai_decisions as shared
|
| 22 |
+
|
| 23 |
+
ROOT = Path(__file__).resolve().parent
|
| 24 |
+
API = 'https://openrouter.ai/api/v1/systemone'
|
| 25 |
+
CATALOG = {
|
| 26 |
+
'inception/mercury-decide:free': ('mercury-decide', 'inception/mercury-decide-20260930',
|
| 27 |
+
'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, 0),
|
| 28 |
+
'inception/mercury-decide': ('mercury-decide', 'inception/mercury-decide-20260930',
|
| 29 |
+
'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, .02),
|
| 30 |
+
'microsoft/microsoft-decision-1': ('microsoft-decision-1', 'microsoft/microsoft-decision-1-20261009',
|
| 31 |
+
'microsoft-decision-1-perch-systemone-v1', 'microsoft-decision-1-20261012', 'Azure', 32768, .042),
|
| 32 |
+
}
|
| 33 |
+
MODELS = tuple(CATALOG)
|
| 34 |
+
MODEL_ID, REVISION, PROTOCOL, RUN_ID, HOST, CONTEXT_LIMIT, PRICE = CATALOG[MODELS[0]]
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def select_model(model):
|
| 38 |
+
global MODEL_ID, REVISION, PROTOCOL, RUN_ID, HOST, CONTEXT_LIMIT, PRICE
|
| 39 |
+
MODEL_ID, REVISION, PROTOCOL, RUN_ID, HOST, CONTEXT_LIMIT, PRICE = CATALOG[model]
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
core = shared.core
|
| 43 |
+
AccountError = shared.AccountError
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
class AnswerError(RuntimeError):
|
| 47 |
+
def __init__(self, message, response, elapsed):
|
| 48 |
+
super().__init__(message)
|
| 49 |
+
self.usage = response.get('usage', {})
|
| 50 |
+
self.answers = response.get('answers', {})
|
| 51 |
+
self.request_id = response.get('id')
|
| 52 |
+
self.elapsed = elapsed
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
class RequestLimiter:
|
| 56 |
+
def __init__(self, requests_per_second):
|
| 57 |
+
self.lock = threading.Lock()
|
| 58 |
+
self.next_at = 0.
|
| 59 |
+
self.interval = 1 / requests_per_second
|
| 60 |
+
|
| 61 |
+
def wait(self):
|
| 62 |
+
with self.lock:
|
| 63 |
+
at = max(time.monotonic(), self.next_at)
|
| 64 |
+
self.next_at = at + self.interval
|
| 65 |
+
time.sleep(max(0, at - time.monotonic()))
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def questions_for(pair, domain, pack):
|
| 69 |
+
if domain == 'lint':
|
| 70 |
+
rule = ' '.join(pair['rule']['ensure'].split())
|
| 71 |
+
return [{'name': 'semantic', 'question': {'type': 'noul',
|
| 72 |
+
'instructions': 'Is `rule` true of the code below?',
|
| 73 |
+
'criteria': {'true': rule, 'false': 'Not so: ' + rule}},
|
| 74 |
+
'issue': {'on': False}, 'min': 70}]
|
| 75 |
+
return core.detection_questions(core.scan_questions(pack, domain, pair['language']), domain)
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
def payload_for(pair, role, domain, pack, model):
|
| 79 |
+
checks = questions_for(pair, domain, pack)
|
| 80 |
+
if not checks:
|
| 81 |
+
raise ValueError('No applicable detection questions')
|
| 82 |
+
return {'model': model, 'state': pair[role]['state'],
|
| 83 |
+
'questions': {c['name']: c['question'] for c in checks}}
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def prediction(pair, role, domain, pack, response, elapsed, model):
|
| 87 |
+
if response.get('model') != REVISION:
|
| 88 |
+
raise AccountError('OpenRouter returned a different checkpoint: ' + str(response.get('model')))
|
| 89 |
+
checks = questions_for(pair, domain, pack)
|
| 90 |
+
answers = response.get('answers', {})
|
| 91 |
+
if not isinstance(answers, dict) or set(answers) != {c['name'] for c in checks}:
|
| 92 |
+
raise AnswerError('Missing or unexpected answers', response, elapsed)
|
| 93 |
+
probabilities = {}
|
| 94 |
+
try:
|
| 95 |
+
for name, answer in answers.items():
|
| 96 |
+
if not isinstance(answer, dict):
|
| 97 |
+
raise ValueError('Invalid answer for ' + name)
|
| 98 |
+
if answer.get('type') != 'noul':
|
| 99 |
+
raise ValueError('Unexpected answer type for ' + name + ': ' + str(answer.get('type')))
|
| 100 |
+
probabilities[name] = core.probability(answer['noul'])
|
| 101 |
+
except (KeyError, TypeError, ValueError) as exc:
|
| 102 |
+
raise AnswerError(str(exc), response, elapsed) from exc
|
| 103 |
+
scores = {c['name']: core.raised_score(c, probabilities[c['name']]) for c in checks}
|
| 104 |
+
score, alert = (scores['semantic'], scores['semantic'] > .7) if domain == 'lint' else core.scan_result(scores, checks, domain, .5)
|
| 105 |
+
usage = response.get('usage') or {}
|
| 106 |
+
if not isinstance(usage.get('input_tokens'), int) or usage['input_tokens'] < 0:
|
| 107 |
+
raise AnswerError('Missing input-token usage', response, elapsed)
|
| 108 |
+
cost = usage.get('cost')
|
| 109 |
+
if isinstance(cost, bool) or not isinstance(cost, (float, int)) or not math.isfinite(cost) or cost < 0:
|
| 110 |
+
raise AnswerError('Missing inference cost', response, elapsed)
|
| 111 |
+
return {'pair_id': pair['pair_id'], 'role': role, 'domain': domain,
|
| 112 |
+
'model_id': MODEL_ID, 'model_revision': REVISION, 'requested_model': model,
|
| 113 |
+
'protocol_id': PROTOCOL, 'pack_sha256': pack['pack_sha256'] if domain != 'lint' else None,
|
| 114 |
+
'score': score, 'alert': alert, 'question_scores': scores,
|
| 115 |
+
'true_probabilities': probabilities, 'answers': answers, 'usage': usage,
|
| 116 |
+
'latency_seconds': elapsed, 'request_id': response.get('id'),
|
| 117 |
+
'provider': response.get('provider')}
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
_local = threading.local()
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
def predict(key, pair, role, domain, pack, timeout, limiter, model):
|
| 124 |
+
payload = payload_for(pair, role, domain, pack, model)
|
| 125 |
+
if not hasattr(_local, 'client'):
|
| 126 |
+
_local.client = httpx.Client(headers={'Authorization': 'Bearer ' + key,
|
| 127 |
+
'Content-Type': 'application/json'})
|
| 128 |
+
started = time.monotonic()
|
| 129 |
+
for attempt in range(3):
|
| 130 |
+
limiter.wait()
|
| 131 |
+
response = _local.client.post(API, json=payload, timeout=timeout)
|
| 132 |
+
if response.status_code >= 400:
|
| 133 |
+
try:
|
| 134 |
+
detail = response.json().get('error', {})
|
| 135 |
+
except ValueError:
|
| 136 |
+
detail = {}
|
| 137 |
+
metadata = detail.get('metadata') or {}
|
| 138 |
+
code = metadata.get('error_type') or detail.get('code') or response.status_code
|
| 139 |
+
if response.status_code in (401, 402, 403, 404):
|
| 140 |
+
raise AccountError(f'OpenRouter HTTP {response.status_code}: {code}')
|
| 141 |
+
if response.status_code == 429:
|
| 142 |
+
# A daily quota cannot be fixed by retrying this method.
|
| 143 |
+
remaining = response.headers.get('x-ratelimit-remaining')
|
| 144 |
+
reset = response.headers.get('x-ratelimit-reset')
|
| 145 |
+
if remaining == '0' and reset:
|
| 146 |
+
try:
|
| 147 |
+
if float(reset) - time.time() > 60:
|
| 148 |
+
raise AccountError('OpenRouter daily request quota exhausted')
|
| 149 |
+
except ValueError:
|
| 150 |
+
pass
|
| 151 |
+
if attempt < 2:
|
| 152 |
+
try:
|
| 153 |
+
delay = float(response.headers.get('retry-after', 2 ** (attempt + 1)))
|
| 154 |
+
except ValueError:
|
| 155 |
+
delay = 2 ** (attempt + 1)
|
| 156 |
+
time.sleep(min(30, max(1, delay)))
|
| 157 |
+
continue
|
| 158 |
+
raise RuntimeError(f'OpenRouter HTTP {response.status_code}: {code}')
|
| 159 |
+
return prediction(pair, role, domain, pack, response.json(),
|
| 160 |
+
time.monotonic() - started, model)
|
| 161 |
+
raise AssertionError('unreachable')
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def report(group, pack, model):
|
| 165 |
+
normalized = dict(group, failures={identity: dict(row, answers=[dict(answer, name=name)
|
| 166 |
+
for name, answer in (row.get('answers', {}) or {}).items() if isinstance(answer, dict)]
|
| 167 |
+
if isinstance(row.get('answers', {}), dict) else [])
|
| 168 |
+
for identity, row in group['failures'].items()})
|
| 169 |
+
result = shared.report(normalized, pack)
|
| 170 |
+
rows = [*group['predictions'].values(), *group['failures'].values()]
|
| 171 |
+
result.update(model_id=MODEL_ID, model_revision=REVISION, requested_model=model,
|
| 172 |
+
protocol_id=PROTOCOL, run_id=RUN_ID,
|
| 173 |
+
inference_cost_usd=sum(r.get('usage', {}).get('cost', 0) for r in rows),
|
| 174 |
+
inference_cost_basis='OpenRouter API-reported usage.cost',
|
| 175 |
+
inference_endpoint=API, inference_host='OpenRouter / ' + HOST,
|
| 176 |
+
context_limit_tokens=CONTEXT_LIMIT)
|
| 177 |
+
return result
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
def maximum_charge(model, question_count):
|
| 181 |
+
# Reserve the maximum input charge before scheduling a paid request.
|
| 182 |
+
# Native decisions may charge repeated context for each question.
|
| 183 |
+
config = CATALOG[model]
|
| 184 |
+
return config[5] * question_count * config[6] / 1_000_000
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
def main():
|
| 188 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 189 |
+
parser.add_argument('--manifest', type=Path, required=True)
|
| 190 |
+
parser.add_argument('--out', type=Path, required=True)
|
| 191 |
+
parser.add_argument('--model', choices=MODELS, default=MODELS[0])
|
| 192 |
+
parser.add_argument('--question-pack', type=Path, default=ROOT / 'question-pack.json')
|
| 193 |
+
parser.add_argument('--workers', type=int, default=8)
|
| 194 |
+
parser.add_argument('--requests-per-second', type=float, default=None)
|
| 195 |
+
parser.add_argument('--timeout', type=float, default=30)
|
| 196 |
+
parser.add_argument('--budget', type=float, help='Optional spending cap in USD')
|
| 197 |
+
parser.add_argument('--limit', type=int, default=0, help='Optional maximum new method requests')
|
| 198 |
+
parser.add_argument('--score-saved', action='store_true')
|
| 199 |
+
args = parser.parse_args()
|
| 200 |
+
select_model(args.model)
|
| 201 |
+
if args.requests_per_second is None:
|
| 202 |
+
args.requests_per_second = .3 if args.model.endswith(':free') else 4
|
| 203 |
+
if min(args.workers, args.requests_per_second, args.timeout) <= 0 or (args.budget is not None and args.budget <= 0) or args.limit < 0:
|
| 204 |
+
parser.error('Workers, rate, timeout and budget must be positive; limit must be nonnegative')
|
| 205 |
+
pack = core.load_pack(args.question_pack)
|
| 206 |
+
groups, pending_groups = [], []
|
| 207 |
+
for dataset in json.loads(args.manifest.read_text())['datasets']:
|
| 208 |
+
raw = Path(dataset['path']).read_bytes()
|
| 209 |
+
digest = hashlib.sha256(raw).hexdigest()
|
| 210 |
+
if digest != dataset['sha256']:
|
| 211 |
+
raise ValueError('Dataset checksum changed')
|
| 212 |
+
pairs = [json.loads(line) for line in raw.splitlines() if line]
|
| 213 |
+
if len({p['pair_id'] for p in pairs}) != len(pairs):
|
| 214 |
+
raise ValueError('Duplicate benchmark pair')
|
| 215 |
+
directory = args.out / dataset['split'] / dataset['domain']
|
| 216 |
+
directory.mkdir(parents=True, exist_ok=True)
|
| 217 |
+
preds, fails = {}, {}
|
| 218 |
+
expected = {(p['pair_id'], role) for p in pairs for role in ('before', 'after')}
|
| 219 |
+
for file, target in [('predictions.jsonl', preds), ('failures.jsonl', fails)]:
|
| 220 |
+
for r in shared.read_rows(directory / file):
|
| 221 |
+
identity = r['pair_id'], r['role']
|
| 222 |
+
if identity not in expected or identity in preds or identity in fails:
|
| 223 |
+
raise ValueError('Invalid or duplicate saved outcome')
|
| 224 |
+
if r['dataset_sha256'] != digest or r['protocol_id'] != PROTOCOL or r['model_revision'] != REVISION or r['requested_model'] != args.model:
|
| 225 |
+
raise ValueError('Saved outcome uses a different dataset, model or protocol')
|
| 226 |
+
if r.get('pack_sha256') != (pack['pack_sha256'] if dataset['domain'] != 'lint' else None):
|
| 227 |
+
raise ValueError('Saved outcome uses a different question pack')
|
| 228 |
+
target[identity] = r
|
| 229 |
+
group = dict(pairs=pairs, predictions=preds, failures=fails, directory=directory,
|
| 230 |
+
domain=dataset['domain'], split=dataset['split'], digest=digest)
|
| 231 |
+
groups.append(group)
|
| 232 |
+
pending_groups.append([(group, pair, role) for pair in pairs for role in ('before', 'after')
|
| 233 |
+
if (pair['pair_id'], role) not in preds and (pair['pair_id'], role) not in fails])
|
| 234 |
+
pending = [job for row in zip_longest(*pending_groups) for job in row if job is not None]
|
| 235 |
+
if args.limit:
|
| 236 |
+
pending = pending[:args.limit]
|
| 237 |
+
|
| 238 |
+
def save_reports():
|
| 239 |
+
reports = [report(g, pack, args.model) for g in groups]
|
| 240 |
+
for g, result in zip(groups, reports):
|
| 241 |
+
(g['directory'] / 'report.json').write_text(json.dumps(result, indent=2) + '\n')
|
| 242 |
+
status = {'model': args.model, 'reports': reports,
|
| 243 |
+
'reported_cost_usd': sum(r['inference_cost_usd'] for r in reports),
|
| 244 |
+
'complete': all(r['complete'] for r in reports)}
|
| 245 |
+
temp = args.out / 'status.tmp'
|
| 246 |
+
temp.write_text(json.dumps(status, indent=2) + '\n')
|
| 247 |
+
temp.replace(args.out / 'status.json')
|
| 248 |
+
return status['reported_cost_usd']
|
| 249 |
+
|
| 250 |
+
spent = save_reports()
|
| 251 |
+
if args.score_saved or not pending:
|
| 252 |
+
return
|
| 253 |
+
key = os.environ.get('OPENROUTER_API_KEY')
|
| 254 |
+
if not key:
|
| 255 |
+
raise AccountError('Set OPENROUTER_API_KEY')
|
| 256 |
+
if args.model.endswith(':free'):
|
| 257 |
+
limits = httpx.get('https://openrouter.ai/api/v1/key',
|
| 258 |
+
headers={'Authorization': 'Bearer ' + key}, timeout=args.timeout)
|
| 259 |
+
if limits.status_code != 200:
|
| 260 |
+
raise AccountError('Could not check OpenRouter free request allowance')
|
| 261 |
+
quota = limits.json().get('data', {}).get('free_model_daily_requests', {})
|
| 262 |
+
remaining = quota.get('remaining')
|
| 263 |
+
if not isinstance(remaining, int) or remaining < 0:
|
| 264 |
+
raise AccountError('OpenRouter did not return a free request allowance')
|
| 265 |
+
if remaining == 0:
|
| 266 |
+
raise AccountError('OpenRouter daily free request allowance exhausted')
|
| 267 |
+
pending = pending[:remaining]
|
| 268 |
+
print(f'Free allowance: scheduling at most {len(pending)} requests today.', flush=True)
|
| 269 |
+
limiter = RequestLimiter(args.requests_per_second)
|
| 270 |
+
iterator, attempted = iter(pending), 0
|
| 271 |
+
reserved = 0.
|
| 272 |
+
budget_paused = False
|
| 273 |
+
with ThreadPoolExecutor(max_workers=args.workers) as pool:
|
| 274 |
+
active = {}
|
| 275 |
+
|
| 276 |
+
def submit():
|
| 277 |
+
nonlocal reserved, budget_paused
|
| 278 |
+
if (args.budget is not None and spent >= args.budget) or budget_paused:
|
| 279 |
+
return
|
| 280 |
+
job = next(iterator, None)
|
| 281 |
+
if job:
|
| 282 |
+
group, pair, role = job
|
| 283 |
+
bound = maximum_charge(args.model, len(questions_for(pair, group['domain'], pack)))
|
| 284 |
+
if args.budget is not None and spent + reserved + bound > args.budget:
|
| 285 |
+
budget_paused = True
|
| 286 |
+
return
|
| 287 |
+
reserved += bound
|
| 288 |
+
active[pool.submit(predict, key, pair, role, group['domain'], pack,
|
| 289 |
+
args.timeout, limiter, args.model)] = (job, bound)
|
| 290 |
+
|
| 291 |
+
for _ in range(args.workers):
|
| 292 |
+
submit()
|
| 293 |
+
try:
|
| 294 |
+
while active:
|
| 295 |
+
done, _ = wait(active, return_when=FIRST_COMPLETED)
|
| 296 |
+
for future in done:
|
| 297 |
+
(group, pair, role), bound = active.pop(future)
|
| 298 |
+
reserved -= bound
|
| 299 |
+
identity = pair['pair_id'], role
|
| 300 |
+
try:
|
| 301 |
+
row = future.result()
|
| 302 |
+
except AccountError:
|
| 303 |
+
for f in active:
|
| 304 |
+
f.cancel()
|
| 305 |
+
raise
|
| 306 |
+
except Exception as exc:
|
| 307 |
+
row = {'pair_id': pair['pair_id'], 'role': role, 'domain': group['domain'],
|
| 308 |
+
'model_revision': REVISION, 'requested_model': args.model, 'protocol_id': PROTOCOL,
|
| 309 |
+
'pack_sha256': pack['pack_sha256'] if group['domain'] != 'lint' else None,
|
| 310 |
+
'status': 'failed', 'error': str(exc),
|
| 311 |
+
'usage': getattr(exc, 'usage', {}), 'answers': getattr(exc, 'answers', {}),
|
| 312 |
+
'request_id': getattr(exc, 'request_id', None),
|
| 313 |
+
'latency_seconds': getattr(exc, 'elapsed', None)}
|
| 314 |
+
group['failures'][identity] = row
|
| 315 |
+
file = 'failures.jsonl'
|
| 316 |
+
else:
|
| 317 |
+
group['predictions'][identity] = row
|
| 318 |
+
file = 'predictions.jsonl'
|
| 319 |
+
spent += row['usage'].get('cost', 0)
|
| 320 |
+
row['dataset_sha256'] = group['digest']
|
| 321 |
+
with (group['directory'] / file).open('a') as stream:
|
| 322 |
+
stream.write(json.dumps(row, sort_keys=True) + '\n')
|
| 323 |
+
attempted += 1
|
| 324 |
+
if attempted % 100 == 0:
|
| 325 |
+
save_reports()
|
| 326 |
+
print(f'Completed {attempted}/{len(pending)} new methods; cost ${spent:.4f}', flush=True)
|
| 327 |
+
submit()
|
| 328 |
+
finally:
|
| 329 |
+
save_reports()
|
| 330 |
+
print('Budget guard paused pending methods.' if budget_paused else 'Finished scheduled methods.', flush=True)
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
if __name__ == '__main__':
|
| 334 |
+
main()
|
predictions/current/bug/mercury-decide.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
predictions/current/bug/microsoft-decision-1.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
predictions/current/lint/mercury-decide.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
predictions/current/lint/microsoft-decision-1.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
predictions/current/security/mercury-decide.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
predictions/current/security/microsoft-decision-1.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results-current.jsonl
CHANGED
|
@@ -52,3 +52,15 @@
|
|
| 52 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision_answered_methods": 0.5038335285710763, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 202, "fp": 236, "tn": 336, "tp": 222}, "domain": "bug", "f1": 0.5034013605442177, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.4125874125874126, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.2474223, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 2474223, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.7011702089803293, "latency_p95_seconds": 5.054382875008741, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "precision": 0.4847161572052402, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5235849056603774, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 29}}
|
| 53 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision_answered_methods": 0.5143518871191308, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 237, "fp": 151, "tn": 329, "tp": 161}, "domain": "security", "f1": 0.4535211267605634, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3145833333333333, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.5297818000000001, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 5297818, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.751356124994345, "latency_p95_seconds": 5.058746583003085, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.5301507537688442, "pair_order_correct": 211, "pair_order_eligible": 398, "precision": 0.5160256410256411, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.4045226130653266, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 211, "eligible": 398, "ties": 21}}
|
| 54 |
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision_answered_methods": 0.9427382409373941, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 11, "fp": 5, "tn": 66, "tp": 60}, "domain": "lint", "f1": 0.8823529411764706, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.07042253521126761, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.0297267, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 297267, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.594590458989842, "latency_p95_seconds": 4.666571665991796, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.9295774647887324, "pair_order_correct": 66, "pair_order_eligible": 71, "precision": 0.9230769230769231, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": null, "recall": 0.8450704225352113, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 66, "eligible": 71, "ties": 1}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision_answered_methods": 0.5038335285710763, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 202, "fp": 236, "tn": 336, "tp": 222}, "domain": "bug", "f1": 0.5034013605442177, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.4125874125874126, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.2474223, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 2474223, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.7011702089803293, "latency_p95_seconds": 5.054382875008741, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "precision": 0.4847161572052402, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5235849056603774, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 29}}
|
| 53 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision_answered_methods": 0.5143518871191308, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 237, "fp": 151, "tn": 329, "tp": 161}, "domain": "security", "f1": 0.4535211267605634, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3145833333333333, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.5297818000000001, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 5297818, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.751356124994345, "latency_p95_seconds": 5.058746583003085, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.5301507537688442, "pair_order_correct": 211, "pair_order_eligible": 398, "precision": 0.5160256410256411, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.4045226130653266, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 211, "eligible": 398, "ties": 21}}
|
| 54 |
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision_answered_methods": 0.9427382409373941, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 11, "fp": 5, "tn": 66, "tp": 60}, "domain": "lint", "f1": 0.8823529411764706, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.07042253521126761, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.0297267, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 297267, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.594590458989842, "latency_p95_seconds": 4.666571665991796, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.9295774647887324, "pair_order_correct": 66, "pair_order_eligible": 71, "precision": 0.9230769230769231, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": null, "recall": 0.8450704225352113, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 66, "eligible": 71, "ties": 1}}
|
| 55 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.9518194603357725, "average_precision_answered_methods": 0.9518194603357725, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 39, "fp": 14, "tn": 200, "tp": 175}, "domain": "lint", "f1": 0.8684863523573201, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.06542056074766354, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01987254, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 993627, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.5686667499830946, "latency_p95_seconds": 2.3908627499477006, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.9532710280373832, "pair_order_correct": 204, "pair_order_eligible": 214, "precision": 0.9259259259259259, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.8177570093457944, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 204, "eligible": 214, "ties": 0}}
|
| 56 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9614588211664985, "average_precision_answered_methods": 0.9614588211664985, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 9, "fp": 6, "tn": 65, "tp": 62}, "domain": "lint", "f1": 0.8920863309352518, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08450704225352113, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.0063837, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 319185, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.5517385830171406, "latency_p95_seconds": 2.2690559169859625, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.9436619718309859, "pair_order_correct": 67, "pair_order_eligible": 71, "precision": 0.9117647058823529, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.8732394366197183, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 67, "eligible": 71, "ties": 0}}
|
| 57 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4439, "average_precision": 0.4723810858789133, "average_precision_answered_methods": 0.4723810858789133, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1698, "fp": 144, "tn": 2435, "tp": 163}, "domain": "bug", "f1": 0.1503690036900369, "failed_methods": 1, "failure_counts": {"OpenRouter HTTP 503: 503": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.05583559519193486, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.22377724, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 11188862, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8313424999942072, "latency_p95_seconds": 2.9064963330165483, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.4898989898989899, "pair_order_correct": 873, "pair_order_eligible": 1782, "precision": 0.5309446254071661, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.08758731864588931, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 873, "eligible": 1782, "ties": 9}}
|
| 58 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.5002149752946331, "average_precision_answered_methods": 0.5002149752946331, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 384, "fp": 29, "tn": 543, "tp": 40}, "domain": "bug", "f1": 0.16227180527383367, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.050699300699300696, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.0501477, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 2507385, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.788464125012979, "latency_p95_seconds": 2.8335835830075666, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.49625935162094764, "pair_order_correct": 199, "pair_order_eligible": 401, "precision": 0.5797101449275363, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.09433962264150944, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 199, "eligible": 401, "ties": 3}}
|
| 59 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.5163168455625919, "average_precision_answered_methods": 0.5163168455625919, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 833, "fp": 263, "tn": 1217, "tp": 309}, "domain": "security", "f1": 0.3605600933488915, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.1777027027027027, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.130593, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 6529650, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.172804332978558, "latency_p95_seconds": 3.3231663340120576, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.556049822064057, "pair_order_correct": 625, "pair_order_eligible": 1124, "precision": 0.5402097902097902, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.27057793345008757, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 625, "eligible": 1124, "ties": 8}}
|
| 60 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4857164564832539, "average_precision_answered_methods": 0.4857164564832539, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 354, "fp": 43, "tn": 437, "tp": 44}, "domain": "security", "f1": 0.18144329896907216, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08958333333333333, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.04652576, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 2326288, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.271004832990002, "latency_p95_seconds": 3.3779191250214353, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.5, "pair_order_correct": 199, "pair_order_eligible": 398, "precision": 0.5057471264367817, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.11055276381909548, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 199, "eligible": 398, "ties": 3}}
|
| 61 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.8720076589894619, "average_precision_answered_methods": 0.8720076589894619, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 132, "fp": 4, "tn": 210, "tp": 82}, "context_limit_tokens": 32768, "domain": "lint", "f1": 0.5466666666666666, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.018691588785046728, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.041335266, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 984173, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8859448339790106, "latency_p95_seconds": 2.672933332971297, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.8925233644859814, "pair_order_correct": 191, "pair_order_eligible": 214, "precision": 0.9534883720930233, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.38317757009345793, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 191, "eligible": 214, "ties": 0}}
|
| 62 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9040988767803835, "average_precision_answered_methods": 0.9040988767803835, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 40, "fp": 1, "tn": 70, "tp": 31}, "context_limit_tokens": 32768, "domain": "lint", "f1": 0.6019417475728155, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.014084507042253521, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01323672, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 315160, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8709032089682296, "latency_p95_seconds": 2.2196638750610873, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.9436619718309859, "pair_order_correct": 67, "pair_order_eligible": 71, "precision": 0.96875, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.43661971830985913, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 67, "eligible": 71, "ties": 0}}
|
| 63 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4440, "average_precision": 0.46001512567571157, "average_precision_answered_methods": 0.46001512567571157, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1415, "fp": 486, "tn": 2093, "tp": 446}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.31936985320443967, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.18844513377278016, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.48072339, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 11445795, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.9263057500356808, "latency_p95_seconds": 2.17802645789925, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4696969696969697, "pair_order_correct": 837, "pair_order_eligible": 1782, "precision": 0.47854077253218885, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.23965609887157444, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 837, "eligible": 1782, "ties": 0}}
|
| 64 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
|
| 65 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
|
| 66 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
|
results.jsonl
CHANGED
|
@@ -98,3 +98,15 @@
|
|
| 98 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision_answered_methods": 0.5038335285710763, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 202, "fp": 236, "tn": 336, "tp": 222}, "domain": "bug", "f1": 0.5034013605442177, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.4125874125874126, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.2474223, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 2474223, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.7011702089803293, "latency_p95_seconds": 5.054382875008741, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "precision": 0.4847161572052402, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5235849056603774, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 29}}
|
| 99 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision_answered_methods": 0.5143518871191308, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 237, "fp": 151, "tn": 329, "tp": 161}, "domain": "security", "f1": 0.4535211267605634, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3145833333333333, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.5297818000000001, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 5297818, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.751356124994345, "latency_p95_seconds": 5.058746583003085, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.5301507537688442, "pair_order_correct": 211, "pair_order_eligible": 398, "precision": 0.5160256410256411, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.4045226130653266, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 211, "eligible": 398, "ties": 21}}
|
| 100 |
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision_answered_methods": 0.9427382409373941, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 11, "fp": 5, "tn": 66, "tp": 60}, "domain": "lint", "f1": 0.8823529411764706, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.07042253521126761, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.0297267, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 297267, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.594590458989842, "latency_p95_seconds": 4.666571665991796, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.9295774647887324, "pair_order_correct": 66, "pair_order_eligible": 71, "precision": 0.9230769230769231, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": null, "recall": 0.8450704225352113, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 66, "eligible": 71, "ties": 1}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision_answered_methods": 0.5038335285710763, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 202, "fp": 236, "tn": 336, "tp": 222}, "domain": "bug", "f1": 0.5034013605442177, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.4125874125874126, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.2474223, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 2474223, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.7011702089803293, "latency_p95_seconds": 5.054382875008741, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "precision": 0.4847161572052402, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5235849056603774, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 29}}
|
| 99 |
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision_answered_methods": 0.5143518871191308, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 237, "fp": 151, "tn": 329, "tp": 161}, "domain": "security", "f1": 0.4535211267605634, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3145833333333333, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.5297818000000001, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 5297818, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.751356124994345, "latency_p95_seconds": 5.058746583003085, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.5301507537688442, "pair_order_correct": 211, "pair_order_eligible": 398, "precision": 0.5160256410256411, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.4045226130653266, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 211, "eligible": 398, "ties": 21}}
|
| 100 |
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision_answered_methods": 0.9427382409373941, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 11, "fp": 5, "tn": 66, "tp": 60}, "domain": "lint", "f1": 0.8823529411764706, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.07042253521126761, "inference_cost_basis": "Decisions API-reported input tokens at $0.10/M; no output or cache charges; transport failures without returned usage excluded", "inference_cost_usd": 0.0297267, "inference_endpoint": "https://api.openai.com/v1/decisions", "inference_host": "OpenAI Decisions API", "input_tokens": 297267, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 3.594590458989842, "latency_p95_seconds": 4.666571665991796, "model_id": "openai-decisions", "model_revision": "gpt-6-luna", "pair_order": 0.9295774647887324, "pair_order_correct": 66, "pair_order_eligible": 71, "precision": 0.9230769230769231, "protocol_id": "openai-decisions-perch-choice-v1", "question_pack_sha256": null, "recall": 0.8450704225352113, "refused_methods": 0, "run_id": "openai-decisions-choice-20261006", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 66, "eligible": 71, "ties": 1}}
|
| 101 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.9518194603357725, "average_precision_answered_methods": 0.9518194603357725, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 39, "fp": 14, "tn": 200, "tp": 175}, "domain": "lint", "f1": 0.8684863523573201, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.06542056074766354, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01987254, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 993627, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.5686667499830946, "latency_p95_seconds": 2.3908627499477006, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.9532710280373832, "pair_order_correct": 204, "pair_order_eligible": 214, "precision": 0.9259259259259259, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.8177570093457944, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 204, "eligible": 214, "ties": 0}}
|
| 102 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9614588211664985, "average_precision_answered_methods": 0.9614588211664985, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 9, "fp": 6, "tn": 65, "tp": 62}, "domain": "lint", "f1": 0.8920863309352518, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08450704225352113, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.0063837, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 319185, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.5517385830171406, "latency_p95_seconds": 2.2690559169859625, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.9436619718309859, "pair_order_correct": 67, "pair_order_eligible": 71, "precision": 0.9117647058823529, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.8732394366197183, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 67, "eligible": 71, "ties": 0}}
|
| 103 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4439, "average_precision": 0.4723810858789133, "average_precision_answered_methods": 0.4723810858789133, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1698, "fp": 144, "tn": 2435, "tp": 163}, "domain": "bug", "f1": 0.1503690036900369, "failed_methods": 1, "failure_counts": {"OpenRouter HTTP 503: 503": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.05583559519193486, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.22377724, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 11188862, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8313424999942072, "latency_p95_seconds": 2.9064963330165483, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.4898989898989899, "pair_order_correct": 873, "pair_order_eligible": 1782, "precision": 0.5309446254071661, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.08758731864588931, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 873, "eligible": 1782, "ties": 9}}
|
| 104 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.5002149752946331, "average_precision_answered_methods": 0.5002149752946331, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 384, "fp": 29, "tn": 543, "tp": 40}, "domain": "bug", "f1": 0.16227180527383367, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.050699300699300696, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.0501477, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 2507385, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.788464125012979, "latency_p95_seconds": 2.8335835830075666, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.49625935162094764, "pair_order_correct": 199, "pair_order_eligible": 401, "precision": 0.5797101449275363, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.09433962264150944, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 199, "eligible": 401, "ties": 3}}
|
| 105 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.5163168455625919, "average_precision_answered_methods": 0.5163168455625919, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 833, "fp": 263, "tn": 1217, "tp": 309}, "domain": "security", "f1": 0.3605600933488915, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.1777027027027027, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.130593, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 6529650, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.172804332978558, "latency_p95_seconds": 3.3231663340120576, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.556049822064057, "pair_order_correct": 625, "pair_order_eligible": 1124, "precision": 0.5402097902097902, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.27057793345008757, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 625, "eligible": 1124, "ties": 8}}
|
| 106 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4857164564832539, "average_precision_answered_methods": 0.4857164564832539, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 354, "fp": 43, "tn": 437, "tp": 44}, "domain": "security", "f1": 0.18144329896907216, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08958333333333333, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.04652576, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Inception", "input_tokens": 2326288, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.271004832990002, "latency_p95_seconds": 3.3779191250214353, "model_id": "mercury-decide", "model_revision": "inception/mercury-decide-20260930", "pair_order": 0.5, "pair_order_correct": 199, "pair_order_eligible": 398, "precision": 0.5057471264367817, "protocol_id": "mercury-decide-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.11055276381909548, "refused_methods": 0, "requested_model": "inception/mercury-decide", "run_id": "mercury-decide-20261009", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 199, "eligible": 398, "ties": 3}}
|
| 107 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.8720076589894619, "average_precision_answered_methods": 0.8720076589894619, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 132, "fp": 4, "tn": 210, "tp": 82}, "context_limit_tokens": 32768, "domain": "lint", "f1": 0.5466666666666666, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.018691588785046728, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.041335266, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 984173, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8859448339790106, "latency_p95_seconds": 2.672933332971297, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.8925233644859814, "pair_order_correct": 191, "pair_order_eligible": 214, "precision": 0.9534883720930233, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.38317757009345793, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 191, "eligible": 214, "ties": 0}}
|
| 108 |
+
{"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9040988767803835, "average_precision_answered_methods": 0.9040988767803835, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 40, "fp": 1, "tn": 70, "tp": 31}, "context_limit_tokens": 32768, "domain": "lint", "f1": 0.6019417475728155, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.014084507042253521, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01323672, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 315160, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8709032089682296, "latency_p95_seconds": 2.2196638750610873, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.9436619718309859, "pair_order_correct": 67, "pair_order_eligible": 71, "precision": 0.96875, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.43661971830985913, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 67, "eligible": 71, "ties": 0}}
|
| 109 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4440, "average_precision": 0.46001512567571157, "average_precision_answered_methods": 0.46001512567571157, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1415, "fp": 486, "tn": 2093, "tp": 446}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.31936985320443967, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.18844513377278016, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.48072339, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 11445795, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.9263057500356808, "latency_p95_seconds": 2.17802645789925, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4696969696969697, "pair_order_correct": 837, "pair_order_eligible": 1782, "precision": 0.47854077253218885, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.23965609887157444, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 837, "eligible": 1782, "ties": 0}}
|
| 110 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
|
| 111 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
|
| 112 |
+
{"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
|
test_openrouter_decisions.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import unittest
|
| 2 |
+
import openrouter_decisions as runner
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class OpenRouterTests(unittest.TestCase):
|
| 6 |
+
def setUp(self):
|
| 7 |
+
runner.select_model(runner.MODELS[0])
|
| 8 |
+
self.pair = {'pair_id': 'repair', 'domain': 'bug', 'language': 'python',
|
| 9 |
+
'rule': {'ensure': 'Reject a zero divisor before dividing.'},
|
| 10 |
+
'before': {'labels': {'bug': 1}, 'state': {'method': {'source': 'before'}}},
|
| 11 |
+
'after': {'labels': {'bug': 0}, 'state': {'method': {'source': 'after'}}}}
|
| 12 |
+
self.pack = runner.core.load_pack(runner.ROOT / 'question-pack.json')
|
| 13 |
+
self.model = runner.MODELS[0]
|
| 14 |
+
|
| 15 |
+
def response(self, answers):
|
| 16 |
+
return {'model': runner.REVISION, 'answers': answers,
|
| 17 |
+
'usage': {'input_tokens': 100, 'cost': 0}, 'id': 'request', 'provider': 'Inception'}
|
| 18 |
+
|
| 19 |
+
def test_microsoft_model_configuration_and_native_answers(self):
|
| 20 |
+
model = 'microsoft/microsoft-decision-1'
|
| 21 |
+
runner.select_model(model)
|
| 22 |
+
try:
|
| 23 |
+
payload = runner.payload_for(self.pair, 'before', 'lint', self.pack, model)
|
| 24 |
+
self.assertEqual(payload['model'], model)
|
| 25 |
+
response = self.response({'semantic': {'type': 'noul', 'noul': .1}})
|
| 26 |
+
row = runner.prediction(self.pair, 'before', 'lint', self.pack, response, .2, model)
|
| 27 |
+
self.assertEqual(row['model_id'], 'microsoft-decision-1')
|
| 28 |
+
self.assertEqual(row['model_revision'], 'microsoft/microsoft-decision-1-20261009')
|
| 29 |
+
self.assertAlmostEqual(row['score'], .9)
|
| 30 |
+
self.assertTrue(row['alert'])
|
| 31 |
+
self.assertEqual(runner.CONTEXT_LIMIT, 32768)
|
| 32 |
+
self.assertAlmostEqual(runner.maximum_charge(model, 2), 32768 * 2 * .042 / 1_000_000)
|
| 33 |
+
finally:
|
| 34 |
+
runner.select_model(runner.MODELS[0])
|
| 35 |
+
|
| 36 |
+
def test_native_schema_and_semantic_polarity(self):
|
| 37 |
+
payload = runner.payload_for(self.pair, 'before', 'lint', self.pack, self.model)
|
| 38 |
+
self.assertEqual(payload['state'], self.pair['before']['state'])
|
| 39 |
+
self.assertNotIn('labels', str(payload))
|
| 40 |
+
self.assertNotIn('after', str(payload))
|
| 41 |
+
q = payload['questions']['semantic']
|
| 42 |
+
self.assertEqual(q['type'], 'noul')
|
| 43 |
+
self.assertEqual(q['criteria']['false'], 'Not so: ' + self.pair['rule']['ensure'])
|
| 44 |
+
row = runner.prediction(self.pair, 'before', 'lint', self.pack,
|
| 45 |
+
self.response({'semantic': {'type': 'noul', 'noul': .1}}), .2, self.model)
|
| 46 |
+
self.assertAlmostEqual(row['score'], .9)
|
| 47 |
+
self.assertTrue(row['alert'])
|
| 48 |
+
self.assertEqual(row['usage']['cost'], 0)
|
| 49 |
+
|
| 50 |
+
def test_floors_and_invalid_answers(self):
|
| 51 |
+
checks = runner.questions_for(self.pair, 'bug', self.pack)
|
| 52 |
+
response = self.response({c['name']: {'type': 'noul', 'noul': .5} for c in checks})
|
| 53 |
+
row = runner.prediction(self.pair, 'before', 'bug', self.pack, response, .2, self.model)
|
| 54 |
+
self.assertFalse(row['alert'])
|
| 55 |
+
response['answers'][checks[0]['name']]['noul'] = .51
|
| 56 |
+
self.assertTrue(runner.prediction(self.pair, 'before', 'bug', self.pack, response, .2, self.model)['alert'])
|
| 57 |
+
response['answers'][checks[0]['name']]['noul'] = 99
|
| 58 |
+
with self.assertRaises(runner.AnswerError):
|
| 59 |
+
runner.prediction(self.pair, 'before', 'bug', self.pack, response, .2, self.model)
|
| 60 |
+
response['model'] = 'other-checkpoint'
|
| 61 |
+
with self.assertRaises(runner.AccountError):
|
| 62 |
+
runner.prediction(self.pair, 'before', 'bug', self.pack, response, .2, self.model)
|
| 63 |
+
|
| 64 |
+
def test_malformed_answers_remain_failed_without_crashing_report(self):
|
| 65 |
+
response = self.response([])
|
| 66 |
+
with self.assertRaises(runner.AnswerError) as raised:
|
| 67 |
+
runner.prediction(self.pair, 'before', 'lint', self.pack, response, .2, self.model)
|
| 68 |
+
group = {'pairs': [self.pair], 'predictions': {}, 'failures': {
|
| 69 |
+
('repair', 'before'): {'error': str(raised.exception), 'usage': raised.exception.usage,
|
| 70 |
+
'answers': raised.exception.answers},
|
| 71 |
+
('repair', 'after'): {'error': 'timeout'}},
|
| 72 |
+
'domain': 'lint', 'split': 'public', 'digest': 'test'}
|
| 73 |
+
result = runner.report(group, self.pack, self.model)
|
| 74 |
+
self.assertEqual(result['confusion'], {'tp': 0, 'fp': 1, 'fn': 1, 'tn': 0})
|
| 75 |
+
self.assertEqual(result['failure_counts_per_question'], {})
|
| 76 |
+
|
| 77 |
+
def test_failure_penalty_refusals_and_reported_cost(self):
|
| 78 |
+
group = {'pairs': [self.pair], 'predictions': {}, 'failures': {
|
| 79 |
+
('repair', 'before'): {'error': 'refusal', 'usage': {'input_tokens': 100, 'cost': .00002},
|
| 80 |
+
'answers': {'has_bug': {'type': 'refusal'}}},
|
| 81 |
+
('repair', 'after'): {'error': 'timeout'}}, 'domain': 'bug', 'split': 'public', 'digest': 'test'}
|
| 82 |
+
report = runner.report(group, self.pack, self.model)
|
| 83 |
+
self.assertEqual(report['confusion'], {'tp': 0, 'fp': 1, 'fn': 1, 'tn': 0})
|
| 84 |
+
self.assertEqual(report['pair_order'], 0)
|
| 85 |
+
self.assertEqual(report['failure_counts_per_question'], {'has_bug': 1})
|
| 86 |
+
self.assertEqual(report['refused_methods'], 1)
|
| 87 |
+
self.assertEqual(report['inference_cost_usd'], .00002)
|
| 88 |
+
self.assertTrue(report['complete'])
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
if __name__ == '__main__':
|
| 92 |
+
unittest.main()
|
tradeoff.py
CHANGED
|
@@ -32,9 +32,13 @@ NAMES = {
|
|
| 32 |
"clm": ("CLM-v0.1-8B", "https://huggingface.co/Contrastive-LM/CLM-v0.1-8B"),
|
| 33 |
"semif": ("SemiF", "https://github.com/TheoLeeCJ/SemIf"),
|
| 34 |
"gliner25-decide": ("GLiNER-2.5-Decide", "https://huggingface.co/fastino/GLiNER2.5-Decide"),
|
|
|
|
|
|
|
| 35 |
"openai-decisions": ("GPT-6 Luna Decisions", "https://developers.openai.com/api/docs/guides/decisions"),
|
| 36 |
}
|
| 37 |
COLORS = {
|
|
|
|
|
|
|
| 38 |
"openai-decisions": "#36b894",
|
| 39 |
"jev": "#1976d2", "typellm": "#c64f81", "liquid-d1": "#7638d6",
|
| 40 |
"diffusiongemma": "#e08a22", "span01": "#168d80", "clm": "#677586",
|
|
|
|
| 32 |
"clm": ("CLM-v0.1-8B", "https://huggingface.co/Contrastive-LM/CLM-v0.1-8B"),
|
| 33 |
"semif": ("SemiF", "https://github.com/TheoLeeCJ/SemIf"),
|
| 34 |
"gliner25-decide": ("GLiNER-2.5-Decide", "https://huggingface.co/fastino/GLiNER2.5-Decide"),
|
| 35 |
+
"microsoft-decision-1": ("Microsoft-Decision-1", "https://openrouter.ai/microsoft/microsoft-decision-1"),
|
| 36 |
+
"mercury-decide": ("Mercury Decide", "https://openrouter.ai/inception/mercury-decide"),
|
| 37 |
"openai-decisions": ("GPT-6 Luna Decisions", "https://developers.openai.com/api/docs/guides/decisions"),
|
| 38 |
}
|
| 39 |
COLORS = {
|
| 40 |
+
"microsoft-decision-1": "#4aa4ef",
|
| 41 |
+
"mercury-decide": "#b2bf3c",
|
| 42 |
"openai-decisions": "#36b894",
|
| 43 |
"jev": "#1976d2", "typellm": "#c64f81", "liquid-d1": "#7638d6",
|
| 44 |
"diffusiongemma": "#e08a22", "span01": "#168d80", "clm": "#677586",
|