Commit bb7babe
Add evaluate-prompt-portability template, protocol, and format (#239)
* Add evaluate-prompt-portability template, protocol, and format
Adds three new PromptKit components for cross-LLM prompt portability
evaluation (addresses #127 Phase 1):
- Protocol: prompt-portability-evaluation — 7-phase claim-level
consensus analysis methodology (output collection, claim extraction,
semantic matching, consensus classification, divergence analysis,
scoring, and hardening recommendations)
- Format: portability-report — 9-section structured report covering
evaluation context, per-model summaries, consensus core, majority
claims, divergent claims (singular + contradictory), scorecard,
hardening recommendations, and model notes
- Template: evaluate-prompt-portability — interactive template that
orchestrates fan-out execution across multiple LLM models, collects
outputs, decomposes them into atomic semantic claims, performs
cross-model consensus analysis, and produces a portability report
Key design: comparison is semantic (claim-level), not textual. Two
models producing the same assertions in different words score as
Consensus. Contradictory claims (mutually exclusive assertions) are
the highest-priority signal, traced to specific ambiguous prompt
language with concrete rewrite recommendations.
Complements the existing lint-prompt template — lint statically first,
then evaluate empirically.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR review feedback: scoring, thresholds, error handling
- Fix Majority threshold from >=50% to >50% to avoid ties with even
model counts
- Normalize portability score from [-1,1] to [0,1] via
(raw_weighted_mean + 1.0) / 2.0 so contradictory claims cannot
produce negative scores
- Define explicit Manual Review bucket for uncertain claim matches:
excluded from scoring, reported in new Uncertain / Needs Review
section in the portability-report format
- Add fail-stop behavior when <2 models succeed: produce abbreviated
report documenting failures instead of misleading partial analysis
- Add UR- claim ID prefix to formatting rules
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add reference model sufficiency analysis for model selection
Extends the portability evaluation with a new mode: when a reference
model is designated, its claims become the ground-truth baseline and
each cheaper model is scored on how well it reproduces that baseline.
Protocol (Phase 8 - Model Sufficiency Analysis):
- Per-model sufficiency rate = reproduced / total baseline claims
- Missing claims classified as critical miss vs minor miss
- Extra claims classified as valid addition / hallucination / noise
- Three-tier sufficiency status: sufficient, conditionally sufficient,
insufficient (based on threshold, critical misses, contradictions)
- Identifies the minimum sufficient model (cheapest that meets
threshold with zero critical misses)
Format (Section 10 - Model Sufficiency Matrix):
- Reference model + threshold display
- Per-model sufficiency table with tier, rates, and status
- Missing and extra claim detail tables
- Cost-efficiency recommendation
Template:
- New params: reference_model (optional), sufficiency_threshold
(default 90%)
- Input validation ensures reference model is in the model list
- Step 7 conditionally applies Phase 8 when reference model is set
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix template Steps 4-5 for Manual Review bucket consistency
Steps 4 and 5 were inconsistent with the protocol's Manual Review
bucket rules for uncertain matches. Step 4 only flagged uncertain
matches instead of placing them in a Manual Review bucket. Step 5
classified all clusters without excluding Manual Review clusters
from scoring.
Fixed:
- Step 4: uncertain matches now placed in Manual Review bucket,
excluded from scored classification, reported under Uncertain /
Needs Review section
- Step 5: classifies only non-Manual-Review clusters, includes
Manual Review count in the summary presented to user
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix heading nesting, section omission rule, and cluster type ambiguity
- Fix 6c heading from ## to ### to match 6a/6b nesting under
section 6 (Divergent Claims)
- Section 10 (Model Sufficiency Matrix) now always included per
the format's 'do not omit any section' rule, with a placeholder
when no reference model is designated
- Add canonical cluster type rule for scoring: when models assign
different types to semantically matched claims, use the
highest-weight type, break ties by majority, then arbiter decides.
Original per-model types preserved for transparency.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8363a14 commit bb7babe
4 files changed
Lines changed: 771 additions & 0 deletions
File tree
- formats
- protocols/reasoning
- templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
634 | 642 | | |
635 | 643 | | |
636 | 644 | | |
| |||
845 | 853 | | |
846 | 854 | | |
847 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
848 | 864 | | |
849 | 865 | | |
850 | 866 | | |
| |||
1195 | 1211 | | |
1196 | 1212 | | |
1197 | 1213 | | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1198 | 1226 | | |
1199 | 1227 | | |
1200 | 1228 | | |
| |||
0 commit comments