{
 "what": "Reference texts the provider ratios are measured on. o200k_base counts are exact.",
 "measured_at": "2026-10-23T20:17:51Z",
 "texts": {
  "prose_en": {
   "label": "English prose",
   "characters": 2090,
   "o200k_base": 430,
   "text": "The small bakery on the corner opens at six, and by half past the line already reaches the door. Most people come for the same thing: a loaf of rye that is still warm, a coffee in a paper cup, and a few words with the owner, who remembers every regular by name. She started the shop eleven years ago with one oven and a borrowed mixer. Today there are three ovens, four employees and a delivery bicycle that is older than the youngest baker.\n\nRunning a bakery is mostly arithmetic. Flour prices change twice a year, butter almost every month, and electricity whenever the contract is renewed. A loaf that sells for four dollars has to cover the ingredients, the rent, the wages and the slow afternoons when nobody comes in. The owner keeps a notebook with the cost of every recipe, written in pencil so that the numbers can be corrected. When the price of butter rose by a third last winter, she did not raise every price at once. She changed the croissants first, waited two weeks to see whether people would still buy them, and only then adjusted the pastries.\n\nWhat surprised her most was how much time disappeared into small decisions. Should the shop stay open on Sunday afternoons? Is it cheaper to buy a second mixer or to repair the old one again? Would a smaller loaf at a lower price sell better than the large one? She tried to answer each question with a short experiment instead of a guess: one month of Sunday hours, one month without, and a careful count of what was sold.\n\nThe experiments did not always give clear answers. Sunday sales were good in spring and poor in summer, when families left the city. The smaller loaf sold well to students but annoyed older customers, who felt they were paying more for less. In the end she kept both sizes, opened on Sundays only from October to May, and wrote the reasons next to the numbers so that she would remember them a year later.\n\nAsked what advice she would give to someone opening a shop, she said: keep the receipts, write down why you changed a price, and never trust a number you cannot trace back to where it came from."
  },
  "code": {
   "label": "Source code",
   "characters": 2220,
   "o200k_base": 557,
   "text": "import csv\nimport json\nfrom dataclasses import dataclass, field\nfrom pathlib import Path\n\n\n@dataclass\nclass Order:\n    order_id: str\n    customer: str\n    items: list = field(default_factory=list)\n    discount: float = 0.0\n\n    def subtotal(self) -> float:\n        return sum(item['price'] * item['quantity'] for item in self.items)\n\n    def total(self) -> float:\n        value = self.subtotal() * (1.0 - self.discount)\n        return round(value, 2)\n\n\ndef load_orders(path: Path) -> list[Order]:\n    orders: dict[str, Order] = {}\n    with path.open(newline='', encoding='utf-8') as handle:\n        for row in csv.DictReader(handle):\n            order = orders.setdefault(row['order_id'], Order(row['order_id'], row['customer']))\n            order.items.append({'sku': row['sku'], 'price': float(row['price']), 'quantity': int(row['quantity'])})\n            if row.get('discount'):\n                order.discount = max(order.discount, float(row['discount']))\n    return list(orders.values())\n\n\ndef summary(orders: list[Order]) -> dict:\n    by_customer: dict[str, float] = {}\n    for order in orders:\n        by_customer[order.customer] = by_customer.get(order.customer, 0.0) + order.total()\n    top = sorted(by_customer.items(), key=lambda pair: pair[1], reverse=True)[:5]\n    return {'orders': len(orders), 'revenue': round(sum(by_customer.values()), 2), 'top_customers': top}\n\n\nif __name__ == '__main__':\n    result = summary(load_orders(Path('orders.csv')))\n    print(json.dumps(result, indent=2))\n\n// The same report in JavaScript, for the browser\nfunction totals(rows) {\n  const orders = new Map();\n  for (const row of rows) {\n    if (!orders.has(row.orderId)) orders.set(row.orderId, { customer: row.customer, sum: 0 });\n    const order = orders.get(row.orderId);\n    order.sum += Number(row.price) * Number(row.quantity);\n  }\n  return [...orders.values()].sort((a, b) => b.sum - a.sum).slice(0, 5);\n}\n\nexport async function render(url, element) {\n  const response = await fetch(url);\n  if (!response.ok) throw new Error(`HTTP ${response.status}`);\n  const rows = await response.json();\n  element.innerHTML = totals(rows)\n    .map((order) => `<li>${order.customer}: ${order.sum.toFixed(2)}</li>`)\n    .join('');\n}\n"
  },
  "json": {
   "label": "JSON",
   "characters": 1448,
   "o200k_base": 535,
   "text": "{\n  \"id\": \"inv_2026_10_0042\",\n  \"status\": \"paid\",\n  \"currency\": \"USD\",\n  \"issued_at\": \"2026-10-01T09:15:00Z\",\n  \"due_at\": \"2026-10-31T23:59:59Z\",\n  \"customer\": {\n    \"id\": \"cus_8f3k2m\",\n    \"name\": \"Harbor Street Analytics\",\n    \"email\": \"billing@analytics.example\",\n    \"address\": {\"line1\": \"221 Harbor Street\", \"city\": \"Portland\", \"region\": \"OR\", \"postal_code\": \"97209\", \"country\": \"US\"}\n  },\n  \"lines\": [\n    {\"sku\": \"api-standard\", \"description\": \"Standard API usage\", \"quantity\": 18450000, \"unit\": \"token\", \"unit_price\": 0.0000025, \"amount\": 46.13},\n    {\"sku\": \"api-cached\", \"description\": \"Cached input\", \"quantity\": 62100000, \"unit\": \"token\", \"unit_price\": 0.00000025, \"amount\": 15.53},\n    {\"sku\": \"api-output\", \"description\": \"Output\", \"quantity\": 2930000, \"unit\": \"token\", \"unit_price\": 0.00001, \"amount\": 29.3},\n    {\"sku\": \"storage\", \"description\": \"File storage, GB-month\", \"quantity\": 12.5, \"unit\": \"gb_month\", \"unit_price\": 0.1, \"amount\": 1.25},\n    {\"sku\": \"support\", \"description\": \"Support plan\", \"quantity\": 1, \"unit\": \"month\", \"unit_price\": 49, \"amount\": 49}\n  ],\n  \"subtotal\": 141.21,\n  \"tax\": {\"rate\": 0, \"amount\": 0, \"note\": null},\n  \"total\": 141.21,\n  \"payments\": [\n    {\"id\": \"pay_51x9\", \"method\": \"card\", \"brand\": \"visa\", \"last4\": \"4242\", \"amount\": 141.21, \"paid_at\": \"2026-10-03T14:02:11Z\"}\n  ],\n  \"metadata\": {\"project\": \"search-assistant\", \"cost_center\": \"R&D-7\", \"approved\": true, \"tags\": [\"monthly\", \"api\", \"q4\"]}\n}\n"
  },
  "european": {
   "label": "German, French and Spanish",
   "characters": 1378,
   "o200k_base": 320,
   "text": "Die kleine Bäckerei an der Ecke öffnet um sechs Uhr, und um halb sieben reicht die Schlange schon bis zur Tür. Die meisten Kunden kommen wegen derselben Dinge: ein warmes Roggenbrot, ein Kaffee im Pappbecher und ein paar Worte mit der Inhaberin, die jeden Stammkunden beim Namen kennt. Als der Butterpreis im letzten Winter um ein Drittel stieg, erhöhte sie nicht alle Preise auf einmal, sondern zuerst nur die Croissants, und wartete zwei Wochen ab.\n\nLa petite boulangerie du coin ouvre à six heures, et à six heures et demie la file d'attente atteint déjà la porte. La plupart des clients viennent pour la même chose : un pain de seigle encore chaud, un café dans un gobelet en carton et quelques mots avec la patronne, qui connaît chaque habitué par son prénom. Elle note le coût de chaque recette dans un carnet, au crayon, pour pouvoir corriger les chiffres quand les prix changent.\n\nLa pequeña panadería de la esquina abre a las seis, y a las seis y media la fila ya llega hasta la puerta. La mayoría de los clientes vienen por lo mismo: una hogaza de centeno todavía caliente, un café en vaso de papel y unas palabras con la dueña, que recuerda el nombre de cada cliente habitual. Cuando le preguntan qué consejo daría a alguien que abre una tienda, responde: guarda los recibos, anota por qué cambiaste un precio y no confíes en un número cuyo origen no puedas rastrear."
  },
  "cjk": {
   "label": "Chinese and Japanese",
   "characters": 394,
   "o200k_base": 306,
   "text": "街角的小面包店早上六点开门，六点半的时候排队的人已经到了门口。大多数顾客来买的都是同样的东西：一条还热着的黑麦面包、一杯纸杯咖啡，再和店主聊几句。她记得每一位老顾客的名字。去年冬天黄油涨价三分之一的时候，她没有一次性提高所有价格，而是先调整了牛角面包的价格，等了两个星期，看看大家是否还会继续购买，然后才调整其他点心的价格。她把每个配方的成本用铅笔写在一个小本子上，这样价格变化时就可以随时修改。\n\n角にある小さなパン屋は朝六時に開店し、六時半にはもう行列が入り口まで届いています。ほとんどのお客さんが買うものは同じです。まだ温かいライ麦パン、紙コップのコーヒー、そして常連客全員の名前を覚えている店主との短い会話です。店を開く人へのアドバイスを聞かれると、彼女はこう答えます。「領収書は取っておくこと、値段を変えた理由を書き留めること、そして出どころをたどれない数字は信用しないこと。」"
  }
 }
}