tip/22so simple
Cache your long system prompt.
If every API call repeats the same long instructions or document, turn on prompt caching. Repeated input gets much cheaper and faster.
Claude API · Build with LLM APIs22 / 32
Small habits that make AI noticeably better. Read one, use it today. Prompts are highlighted, so copy and go.
32 tips · 8 topics · 0 fluff
If every API call repeats the same long instructions or document, turn on prompt caching. Repeated input gets much cheaper and faster.
Stream responses in your app. Users see text immediately and you avoid HTTP timeouts on long generations.
Before changing a prompt or model in production, rerun a small fixed set of real questions. Vibes are not a test suite.
In RAG, split documents on headings or paragraphs with a little overlap, so an answer that spans a boundary isn't lost.