Update readme
Browse files
EVAL.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
| 1 |
# eval.py: Floor sanity check
|
| 2 |
|
| 3 |
-
A minimal
|
| 4 |
-
right shape.
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
## Usage
|
| 8 |
|
|
@@ -24,13 +28,15 @@ python eval.py --predictions sample_predictions.json
|
|
| 24 |
|
| 25 |
- Whether the recommendation engages with the right evidence.
|
| 26 |
- Whether multi-tier scenarios cite both tiers.
|
| 27 |
-
- Whether named fixtures are referenced.
|
| 28 |
-
- Whether cost or projection numbers are
|
| 29 |
|
| 30 |
-
Those checks
|
|
|
|
|
|
|
| 31 |
|
| 32 |
## Exit codes
|
| 33 |
|
| 34 |
-
- `0`: all predictions passed.
|
| 35 |
- `1`: at least one prediction failed at least one check.
|
| 36 |
- `2`: usage error (missing file, malformed JSON).
|
|
|
|
| 1 |
# eval.py: Floor sanity check
|
| 2 |
|
| 3 |
+
A minimal smoke test. It confirms your predictions parse and have the
|
| 4 |
+
right shape. It does NOT score recommendation quality.
|
| 5 |
+
|
| 6 |
+
For deeper scoring (keyword matching, multi-tier reasoning, fixture
|
| 7 |
+
citations), bring your own evaluator that compares each prediction
|
| 8 |
+
against the `handcrafted_recommendation.json` in the matching scenario
|
| 9 |
+
folder.
|
| 10 |
|
| 11 |
## Usage
|
| 12 |
|
|
|
|
| 28 |
|
| 29 |
- Whether the recommendation engages with the right evidence.
|
| 30 |
- Whether multi-tier scenarios cite both tiers.
|
| 31 |
+
- Whether named fixtures from the metadata are referenced.
|
| 32 |
+
- Whether cost or projection numbers are reasonable.
|
| 33 |
|
| 34 |
+
Those checks are quality assessments. They depend on what you want to
|
| 35 |
+
score for and how strict you want to be. The dataset ships the gold
|
| 36 |
+
answers; the scoring method is up to you.
|
| 37 |
|
| 38 |
## Exit codes
|
| 39 |
|
| 40 |
+
- `0`: all predictions passed the Floor check.
|
| 41 |
- `1`: at least one prediction failed at least one check.
|
| 42 |
- `2`: usage error (missing file, malformed JSON).
|
README.md
CHANGED
|
@@ -37,7 +37,7 @@ recommendation that says what to change and what the impact will be.
|
|
| 37 |
|
| 38 |
The dataset is synthesized. Telemetry was generated procedurally to match
|
| 39 |
each scenario's narrative. Gold recommendations were hand-crafted and
|
| 40 |
-
verified
|
| 41 |
|
| 42 |
The dataset uses AWS vocabulary throughout. Instance types, service names,
|
| 43 |
and field names match AWS. This makes the scenarios concrete instead of
|
|
@@ -46,6 +46,11 @@ vendor-neutral.
|
|
| 46 |
## Folder layout
|
| 47 |
|
| 48 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
scenarios_summary.jsonl # one row per scenario (viewer table)
|
| 50 |
scenarios/
|
| 51 |
01/
|
|
@@ -92,7 +97,10 @@ Columns in the summary table:
|
|
| 92 |
| `savings_monthly_usd` | gold.cost_impact.savings_monthly_usd |
|
| 93 |
| `current_monthly_usd` | gold.cost_impact.current_monthly_usd |
|
| 94 |
| `projected_monthly_usd` | gold.cost_impact.projected_monthly_usd |
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
## Schema
|
| 98 |
|
|
@@ -173,9 +181,8 @@ You can use this dataset two ways.
|
|
| 173 |
**Train or fine-tune.** Treat each scenario's telemetry plus metadata as
|
| 174 |
input. Use the `handcrafted_recommendation.json` as the target output.
|
| 175 |
|
| 176 |
-
**
|
| 177 |
-
|
| 178 |
-
Rich.
|
| 179 |
|
| 180 |
## Quick sanity check
|
| 181 |
|
|
@@ -183,43 +190,37 @@ Rich.
|
|
| 183 |
python eval.py --predictions sample_predictions.json
|
| 184 |
```
|
| 185 |
|
| 186 |
-
This runs the Floor
|
| 187 |
-
have the required fields, and use allowed category values.
|
| 188 |
-
|
| 189 |
|
| 190 |
## Prediction shape
|
| 191 |
|
| 192 |
See `sample_predictions.json` for a worked example. Required fields per
|
| 193 |
prediction: `scenario_id`, `finding_type`, `specific_change`,
|
| 194 |
-
`primary_tier`, `action_category`. Optional but
|
| 195 |
-
`secondary_tier`, `reasoning`, `evidence`, `projected_state`,
|
| 196 |
`cost_impact`, `risk_assessment`.
|
| 197 |
|
| 198 |
-
## How to
|
| 199 |
-
|
| 200 |
-
Use the companion evaluator in the same Hugging Face repository. It scores
|
| 201 |
-
predictions across three tiers.
|
| 202 |
-
|
| 203 |
-
- Floor: structure and category checks. Any reasonable agent passes 18 out
|
| 204 |
-
of 18.
|
| 205 |
-
- Mid: action keywords plus multi-tier reasoning.
|
| 206 |
-
- Rich: fixture citations plus quantified projections.
|
| 207 |
|
| 208 |
-
|
|
|
|
|
|
|
| 209 |
|
| 210 |
-
```
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
|
|
|
| 215 |
|
| 216 |
## Intended uses
|
| 217 |
|
| 218 |
- Train or fine-tune a model that maps cloud telemetry to an optimization
|
| 219 |
recommendation.
|
| 220 |
- Evaluate AI agents on cloud-optimization reasoning.
|
| 221 |
-
- Compare single-shot vs orchestrated agent designs.
|
| 222 |
-
calibrated so that orchestration matters.
|
| 223 |
|
| 224 |
## License
|
| 225 |
|
|
|
|
| 37 |
|
| 38 |
The dataset is synthesized. Telemetry was generated procedurally to match
|
| 39 |
each scenario's narrative. Gold recommendations were hand-crafted and
|
| 40 |
+
verified.
|
| 41 |
|
| 42 |
The dataset uses AWS vocabulary throughout. Instance types, service names,
|
| 43 |
and field names match AWS. This makes the scenarios concrete instead of
|
|
|
|
| 46 |
## Folder layout
|
| 47 |
|
| 48 |
```
|
| 49 |
+
README.md # this file
|
| 50 |
+
LICENSE # MIT
|
| 51 |
+
EVAL.md # what eval.py checks
|
| 52 |
+
eval.py # Floor sanity check (smoke test)
|
| 53 |
+
sample_predictions.json # worked example of submission shape
|
| 54 |
scenarios_summary.jsonl # one row per scenario (viewer table)
|
| 55 |
scenarios/
|
| 56 |
01/
|
|
|
|
| 97 |
| `savings_monthly_usd` | gold.cost_impact.savings_monthly_usd |
|
| 98 |
| `current_monthly_usd` | gold.cost_impact.current_monthly_usd |
|
| 99 |
| `projected_monthly_usd` | gold.cost_impact.projected_monthly_usd |
|
| 100 |
+
|
| 101 |
+
Some scenarios have negative `savings_monthly_usd`. That is expected. For
|
| 102 |
+
those scenarios the right action increases cost to fix a performance or
|
| 103 |
+
reliability problem (for example, adding a read replica).
|
| 104 |
|
| 105 |
## Schema
|
| 106 |
|
|
|
|
| 181 |
**Train or fine-tune.** Treat each scenario's telemetry plus metadata as
|
| 182 |
input. Use the `handcrafted_recommendation.json` as the target output.
|
| 183 |
|
| 184 |
+
**Evaluate AI agents.** Run your agent on the scenario inputs. Compare its
|
| 185 |
+
output to the hand-crafted recommendation in that scenario's folder.
|
|
|
|
| 186 |
|
| 187 |
## Quick sanity check
|
| 188 |
|
|
|
|
| 190 |
python eval.py --predictions sample_predictions.json
|
| 191 |
```
|
| 192 |
|
| 193 |
+
This runs the bundled Floor sanity check. It confirms your predictions
|
| 194 |
+
parse, have the required fields, and use allowed category values. It does
|
| 195 |
+
NOT score recommendation quality. See `EVAL.md` for what is checked.
|
| 196 |
|
| 197 |
## Prediction shape
|
| 198 |
|
| 199 |
See `sample_predictions.json` for a worked example. Required fields per
|
| 200 |
prediction: `scenario_id`, `finding_type`, `specific_change`,
|
| 201 |
+
`primary_tier`, `action_category`. Optional but useful for deeper
|
| 202 |
+
scoring: `secondary_tier`, `reasoning`, `evidence`, `projected_state`,
|
| 203 |
`cost_impact`, `risk_assessment`.
|
| 204 |
|
| 205 |
+
## How to score beyond the Floor check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
|
| 207 |
+
The dataset ships gold answers and a Floor sanity check. It does not ship
|
| 208 |
+
a quality scorer. Beyond the Floor check, the scoring method is up to
|
| 209 |
+
you. Common options:
|
| 210 |
|
| 211 |
+
- Exact match on the enum fields (`finding_type`, `primary_tier`,
|
| 212 |
+
`action_category`).
|
| 213 |
+
- Keyword or substring checks on `specific_change`.
|
| 214 |
+
- Semantic similarity on the prose fields.
|
| 215 |
+
- A custom rubric per scenario, comparing prediction fields against the
|
| 216 |
+
matching `handcrafted_recommendation.json`.
|
| 217 |
|
| 218 |
## Intended uses
|
| 219 |
|
| 220 |
- Train or fine-tune a model that maps cloud telemetry to an optimization
|
| 221 |
recommendation.
|
| 222 |
- Evaluate AI agents on cloud-optimization reasoning.
|
| 223 |
+
- Compare single-shot vs orchestrated agent designs.
|
|
|
|
| 224 |
|
| 225 |
## License
|
| 226 |
|
eval.py
CHANGED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
"""Floor sanity check for the synthesized cloud-optimization recommendations dataset.
|
| 2 |
|
| 3 |
-
This is a minimal
|
| 4 |
1. Each prediction parses as JSON.
|
| 5 |
2. Required fields are present.
|
| 6 |
3. finding_type is one of the three allowed values.
|
| 7 |
4. primary_tier is one of the allowed tier names (or null).
|
| 8 |
-
5.
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
Usage:
|
| 14 |
python eval.py --predictions sample_predictions.json
|
|
@@ -98,7 +102,7 @@ def main():
|
|
| 98 |
print()
|
| 99 |
if total_errors == 0:
|
| 100 |
print(f" All {len(preds)} prediction(s) passed the Floor sanity check.")
|
| 101 |
-
print("
|
| 102 |
sys.exit(0)
|
| 103 |
else:
|
| 104 |
print(f" {total_errors} problem(s) across the predictions file.")
|
|
|
|
| 1 |
"""Floor sanity check for the synthesized cloud-optimization recommendations dataset.
|
| 2 |
|
| 3 |
+
This is a minimal smoke test. It reads your predictions file and confirms:
|
| 4 |
1. Each prediction parses as JSON.
|
| 5 |
2. Required fields are present.
|
| 6 |
3. finding_type is one of the three allowed values.
|
| 7 |
4. primary_tier is one of the allowed tier names (or null).
|
| 8 |
+
5. action_category is one of the allowed values.
|
| 9 |
+
6. specific_change is a non-empty string of reasonable length.
|
| 10 |
|
| 11 |
+
This script does NOT score recommendation quality. It only confirms that
|
| 12 |
+
predictions are well-formed and on-topic. For deeper scoring (keyword
|
| 13 |
+
matching, multi-tier reasoning, fixture citations), bring your own
|
| 14 |
+
evaluator that compares each prediction against the
|
| 15 |
+
handcrafted_recommendation.json in the matching scenario folder.
|
| 16 |
|
| 17 |
Usage:
|
| 18 |
python eval.py --predictions sample_predictions.json
|
|
|
|
| 102 |
print()
|
| 103 |
if total_errors == 0:
|
| 104 |
print(f" All {len(preds)} prediction(s) passed the Floor sanity check.")
|
| 105 |
+
print(" Quality scoring beyond this is up to you.")
|
| 106 |
sys.exit(0)
|
| 107 |
else:
|
| 108 |
print(f" {total_errors} problem(s) across the predictions file.")
|