Problems / Every Message Costs More

Every Message Costs More Stop paying again for the chat so far

How This Page Works

  1. Title block: sheet number, difficulty, format, mode and sub-topics
  2. The statement, in sections you can open and close
  3. Need a Hint?: each hint states its cost before you take it
  4. The config editor, with errors marked as you type
  5. A drawing of your config, updated as you edit
  6. Run: runs your answer, then the server checks it
  7. The results: what your config did, turn by turn
  8. Your result, against the pass and full-points lines
  9. Flag a Problem: report anything wrong

On the tutorials, these numbers appear beside the real parts of the page.

Sheet
C-04
Difficulty
Easy 3
Format
Config
Mode
Simulated

Open this on a computer to solve it. Config problems need a wider screen.

Go to the Editor Need a Hint?

A support chat resends the whole conversation at full price on every message. Cache it, without losing an answer.

The Situation

Bramblegate Games' support assistant helps players of Starforge Arena through long troubleshooting chats. Models read and bill text in tokens, which are small pieces of words. Each message resends the whole chat so far, so each costs more than the last. Your day of 8 chats cost $12.26.

Your job: cut that cost without a single wrong answer. Messages in a chat come less than 5 minutes apart.

Starting system: what every request looks like (sizes in tokens)
instructions1,900manual7,300historygrowsstatus1,600question30–70cachemodel: largegrows with every message, and is sent at full price each time

Your Move

Change chat.yaml:

  • cache.breakpoints: up to 4 of instructions, manual, history, status and question (R1).
  • history: all, or last_5 to send only the last five exchanges, each a player's message and its reply (R2).

The Rules That Decide

R1. Caching

Each message sends one request with five blocks, in this order: instructions, manual, history, status and question. The player's status is looked up again for every message, so it differs each time. A cache stores the start of a request for later requests to reuse. Each breakpoint stores one part: the request up to the end of its block.

  • Reading: when a request starts with the same tokens as a stored part, those tokens cost 0.1× the input price (R3).
  • Writing: a newly stored token costs 1.25× the input price.
  • Lifetime: a stored part lasts 5 minutes after it was last written or read.

R2. Right Answers

A message that refers back to an earlier exchange is answered right only if that exchange is still in history.

Targets

  • Cost cut, your day's saving: at least 35% to pass, and 43.5% for full points.
  • Accuracy must stay at 100%.

Your fix is also checked on inputs you can't see, so tune for the rule, not the sample.

The Fine Print

R3. Prices

Every request goes to the same model. Prices are in dollars per million tokens:

  • Input, the text sent to the model: 5.
  • Output, the reply it writes: 25.

Input tokens that aren't read from or written to the cache cost the input price.

R4. Blocks

  • instructions: 1,900 tokens.
  • manual: the game's support manual, 7,300 tokens.
  • history, the earlier exchanges, grows with every message.
  • status: the player's live account and server status, 1,600 tokens.
  • question, the player's newest message: 30–70 tokens.

R5. More About the Cache

  • Reading a part also keeps the shorter stored parts at its start alive.
  • When several stored parts match, the longest one is read.
  • A breakpoint writes only when no stored copy of its part exists yet.
  • A part shorter than 1,024 tokens isn't stored, and its breakpoint is ignored.

R6. Your Day

  • The day has 8 chats and 298 messages. Each chat has from 35 to 38 messages.
  • Each chat starts from 33m 58s to 57m 54s after the one before it, so chats often overlap.

Need a Hint?

Hint 1 of 3 caps what you can earn at 28 out of 30 points. Points you’ve already earned stay. How points work

chat.yaml
Runs the simulator in your browser, then the server checks it. Press Tab to move out of the editor; Ctrl+Enter runs.
Your request layout
instructions1,900manual7,300historygrowsstatus1,600question30–70cachemodel: large
Something wrong with this problem?

Flag a Problem

Sign in to flag this problem. Reports help fix wording, checks and pages.

Sign In

Reports go to the site owner. Privacy

Something wrong with this problem?

Flag a Problem

Sign in to flag this problem. Reports help fix wording, checks and pages.

Sign In

Reports go to the site owner. Privacy