AI Dictionary › Prompting

Prompt Caching

Definition

Prompt caching is a feature offered by several APIs that stores the initial, stable portion of a prompt — system instructions, reference documents, examples — so subsequent calls do not reprocess it from scratch, drastically cutting cost and latency. Example: a support assistant has 5,000 tokens of instructions and knowledge base identical on every request; with caching, that part is processed once and reused, and you pay a reduced rate only for the variable part (the user's question). Savings can exceed 90% on cached tokens.

Use it when many calls share a long, unchanging prefix: chatbots with long instructions, repeated document processing, few-shot with many fixed examples. Structure the prompt with the stable part first and the variable part last to maximise the cacheable portion.

Definizione (italiano)

Il prompt caching è una funzionalità offerta da diverse API che memorizza la porzione iniziale e stabile di un prompt — istruzioni di sistema, documenti di riferimento, esempi — così che nelle chiamate successive non venga rielaborata da zero, riducendo drasticamente costo e latenza. Esempio: un assistente di supporto ha 5.000 token di istruzioni e knowledge base identici a ogni richiesta; con il caching, quella parte viene elaborata una volta e riutilizzata, e paghi a tariffa ridotta solo la parte variabile (la domanda dell'utente). Il risparmio può superare il 90% sui token in cache.

Usalo quando molte chiamate condividono un prefisso lungo e invariato: chatbot con lunghe istruzioni, elaborazione di documenti ripetuta, few-shot con molti esempi fissi. Struttura il prompt mettendo la parte stabile all'inizio e quella variabile alla fine, per massimizzare la porzione cacheabile.

Related terms

More in Prompting

From our network

Kaimaki Web — Websites That Win Customers

Custom websites, web apps and digital marketing for growing businesses.

Visit kaimakiweb.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.