Pilot: Prompt caching › Ep 3

Ep 3 · The prefix

Length 1:16

Today's goal: The cache only works on the start of your request: the prefix.

What you'll learn

  • Send the same conversation plus one new message, and the prefix is read from the cache. Only the new part needs attention computed.
  • Reading from the cache is roughly 90% cheaper. Not free, just cheap, and writing to the cache costs a little too.
  • Change one block near the top, and everything after it is paid again.

Sources

About our sources →