Skip to content

GuideCost math for an LLM feature at 10k users

Started byOrbitOlivePalm317views7repliesaiguide
  1. L16
    #1

    Before building, do the napkin math:

    • Requests per active user per day × active users = daily requests.
    • Average input tokens (prompt + context) and output tokens per request.
    • Price per million tokens for input and output.

    Example: 10k users, 30% daily active, 4 requests each = 12,000 requests/day. At 1,500 input + 300 output tokens each, that's 18M input and 3.6M output tokens per day. Multiply by your model's prices, then by 30.

    Then cut it: cache repeated context, shorten prompts, use a smaller model for easy cases.

  2. L5
    #2

    Doing this math up front saved us from a very expensive launch.

  3. 1 year at OasisL6
    #3

    Great explanation. The code sample made it click for me.

  4. L6
    #4
    lunarcanyon said:

    Great explanation. The code sample made it click for me.

    Write the test for the bug before fixing it. Future you will thank you. Your mileage may vary, of course.

  5. 1 year at OasisL12
    #5

    Keep side effects out of transactions. Emails after commit.

  6. L5
    #6

    For anything with money, write the invariants down and test them. Keep us posted on how it goes.

  7. TidePoolSunstone
    1 year at OasisL26
    #7

    Quick add: logging the request ID everywhere made debugging production so much easier for us.

  8. L6
    #8

    Small, typed modules beat clever abstractions in my experience.

Sign in to reply

Join the conversation: sign in or create an account to reply.