Buckets:
| """Curated gold reference answers for the frozen evaluation suite. | |
| The frozen suite (``data/eval/linvest21_frozen_eval_v0.jsonl``) ships prompts and | |
| rubric points but no answers, which forced the preference pipeline to fall back | |
| to the baseline model's answer for ``chosen`` and capped the trained model at | |
| parity. These archetype-aware reference answers give the preference pipeline a | |
| better-than-baseline ``chosen`` target. | |
| Each prompt in the suite is one of eight analyst archetypes parameterised with | |
| numbers. We author one expert reference answer per archetype and fill in the | |
| prompt's actual figures. Every answer separates reported facts from inference, | |
| names the key risk or tradeoff, uses neutral language, shows the calculation | |
| when numbers are involved, and avoids investment advice and unsupported | |
| certainty so it satisfies the frozen-suite rubric. | |
| """ | |
| from __future__ import annotations | |
| import re | |
| from typing import Any | |
| def _ints(prompt: str) -> list[int]: | |
| return [int(value) for value in re.findall(r"\d+", prompt)] | |
| def _archetype(item: dict[str, Any]) -> str: | |
| raw = str(item.get("id", "")) | |
| return re.sub(r"_\d+$", "", raw) | |
| def _revenue_risk(nums: list[int]) -> str: | |
| growth, backlog = (nums + [0, 0])[:2] | |
| return ( | |
| f"Reported facts: revenue grew {growth}% year over year while backlog declined {backlog}% " | |
| "and management cited slower enterprise purchasing. The revenue growth is a reported result, " | |
| "but the backlog decline is a forward-looking warning, because backlog typically leads revenue. " | |
| f"The {backlog}% backlog drop therefore suggests the trailing {growth}% growth may not persist. " | |
| "The key risk is that slowing enterprise demand could pressure future revenue even while the " | |
| "headline growth still looks healthy. An analyst should separate the reported growth from the " | |
| "inference about future quarters and monitor whether bookings stabilize before extrapolating the trend." | |
| ) | |
| def _margin_analysis(nums: list[int]) -> str: | |
| before, after = (nums + [0, 0])[:2] | |
| return ( | |
| f"Reported facts: gross margin improved from {before}% to {after}% while operating margin fell " | |
| "because operating expenses increased. The reported signal is mixed: stronger gross margin " | |
| "indicates better unit economics, but the lower operating margin suggests the savings were " | |
| "offset by higher overhead. It would be an unsupported inference to read the gross-margin gain " | |
| "as improving profitability on its own. The key risk is that rising operating expenses could " | |
| "pressure overall margins and cash flow. An analyst should monitor whether the operating-expense " | |
| "growth is one-time investment or a structural cost increase before concluding the margin trend is favorable." | |
| ) | |
| def _cash_flow(nums: list[int]) -> str: | |
| capex = (nums + [0])[0] | |
| return ( | |
| "Reported facts: operating cash flow was positive, but free cash flow was negative because " | |
| f"capex rose {capex}%. The positive operating cash flow is a reported fact, while the negative " | |
| "free cash flow suggests that investment spending is currently outrunning cash generation. " | |
| "Whether this is a concern depends on the inference, not yet supported, that the capex will earn " | |
| "an adequate return. The key tradeoff is between near-term cash flow pressure and potential future " | |
| "capacity or growth. An analyst should separate the reported cash flows from the judgment about " | |
| "return on the capex and monitor whether free cash flow turns positive as the spending normalizes." | |
| ) | |
| def _leverage(nums: list[int]) -> str: | |
| debt_before, debt_after, ebitda = (nums + [0, 0, 1])[:3] | |
| ebitda = ebitda or 1 | |
| before = debt_before / ebitda | |
| after = debt_after / ebitda | |
| delta = after - before | |
| return ( | |
| f"Reported facts: debt changed from ${debt_before} million to ${debt_after} million while EBITDA " | |
| f"stayed flat at ${ebitda} million. Calculation: debt-to-EBITDA moved from {debt_before}/{ebitda} = " | |
| f"{before:.2f}x to {debt_after}/{ebitda} = {after:.2f}x, a change of {delta:+.2f}x. This is a reported " | |
| "leverage change, not by itself a solvency event, but a higher ratio suggests reduced financial " | |
| "flexibility. The key risk is that rising leverage with flat EBITDA could pressure interest coverage " | |
| "and refinancing terms if earnings or rates move adversely. An analyst should monitor coverage ratios " | |
| "and the debt maturity schedule rather than the absolute debt figure alone." | |
| ) | |
| def _inventory_risk(nums: list[int]) -> str: | |
| inventory, revenue = (nums + [0, 0])[:2] | |
| return ( | |
| f"Reported facts: inventory rose {inventory}% while revenue rose {revenue}%. Comparing the two " | |
| f"reported growth rates is the key step: inventory growth of {inventory}% versus revenue growth of " | |
| f"{revenue}% shows whether stock is building faster than sales. If inventory outpaces revenue it " | |
| "suggests a risk of slowing demand, obsolescence, or future markdowns; if it lags revenue the " | |
| "build may simply support growth. It would be an unsupported inference to assume the build is " | |
| "either benign or alarming without more detail. An analyst should investigate inventory turnover " | |
| "and days-on-hand and monitor whether the gap between the two rates widens." | |
| ) | |
| def _saas_metrics(nums: list[int]) -> str: | |
| arr, nrr_from, nrr_to = (nums + [0, 0, 0])[:3] | |
| return ( | |
| f"Reported facts: ARR grew {arr}% while net revenue retention moved from {nrr_from}% to {nrr_to}%. " | |
| "Headline ARR growth is a reported result, but the change in net revenue retention is the quality " | |
| "signal, because retention separates expansion within the existing base from growth bought through " | |
| "new logos. A deteriorating retention trend suggests that reported ARR growth is increasingly " | |
| "dependent on new-customer acquisition rather than durable expansion. The key risk is that growth " | |
| "quality could weaken even while the top-line ARR rate looks strong. An analyst should separate the " | |
| "reported ARR growth from the retention-driven inference and monitor gross retention and churn." | |
| ) | |
| def _eps_quality(nums: list[int]) -> str: | |
| eps = (nums + [0])[0] | |
| return ( | |
| f"Reported facts: EPS rose {eps}% while revenue was flat, helped by buybacks and a lower tax rate. " | |
| "What should be separated is operating performance from financial engineering: the reported EPS " | |
| "growth was driven by a lower share count and a lower tax rate rather than by revenue, so it does " | |
| "not by itself indicate improving underlying earnings. It would be an unsupported inference to treat " | |
| f"the {eps}% EPS increase as organic growth. The key risk is that buyback- and tax-driven EPS gains " | |
| "may not repeat. An analyst should monitor revenue and operating-income trends and the sustainability " | |
| "of the tax rate before concluding earnings quality has improved." | |
| ) | |
| def _customer_concentration(nums: list[int]) -> str: | |
| share = (nums + [0])[0] | |
| return ( | |
| f"Reported facts: the largest customer represents {share}% of revenue. This is a reported " | |
| f"concentration figure, and the inference is about dependence: a {share}% share means the loss or " | |
| "renegotiation of that one relationship could pressure revenue and bargaining power. The risk scales " | |
| "with the percentage, so the higher the share the more a single customer's decision drives results. " | |
| "It would be unsupported to assume either that the relationship is permanent or that it is about to " | |
| "end. An analyst should monitor contract terms, renewal timing, and the trend in concentration " | |
| "rather than treating the current level as static." | |
| ) | |
| _BUILDERS = { | |
| "eval_revenue_risk": _revenue_risk, | |
| "eval_margin_analysis": _margin_analysis, | |
| "eval_cash_flow": _cash_flow, | |
| "eval_leverage": _leverage, | |
| "eval_inventory_risk": _inventory_risk, | |
| "eval_saas_metrics": _saas_metrics, | |
| "eval_eps_quality": _eps_quality, | |
| "eval_customer_concentration": _customer_concentration, | |
| } | |
| def gold_answer_for(item: dict[str, Any]) -> str | None: | |
| """Return a curated reference answer for a frozen-suite item, or None.""" | |
| builder = _BUILDERS.get(_archetype(item)) | |
| if builder is None: | |
| return None | |
| return builder(_ints(str(item.get("prompt", "")))) | |
Xet Storage Details
- Size:
- 8.62 kB
- Xet hash:
- 1305f127a50ad2634c3fe85980be9307ecb76df3537dd76386cb4201db850e9a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.