Cache promptu (wspólny początek zapytań)

Prompt (prefix) caching · id promptcaching

Ponowne użycie już przetworzonego stałego początku promptu — instrukcji systemowych, definicji narzędzi, długich dokumentów — za ułamek ceny i z krótszym czasem do pierwszego tokenu.

Reusing an already processed fixed prompt prefix — system instructions, tool definitions, long documents — at a fraction of the price and with a shorter time to first token.

In one sentence

To ponowne używanie obliczeń dla identycznego początku kolejnych zapytań do modelu.

This reuses calculations for the identical beginning of successive model requests.

Problem it solves

Długie instrukcje i dokumenty są przetwarzane wielokrotnie, choć zmienia się dopiero pytanie na końcu.

Long instructions and documents are processed repeatedly even when only the final question changes.

What it does

Zachowuje obliczenia wspólnego początku, a przy kolejnym zapytaniu wykorzystuje je i przetwarza nową część oraz generuje nową odpowiedź.

It stores calculations for the shared beginning, then reuses them while processing the new part and generating a new answer.

Everyday example

Zadajesz różne pytania o ten sam długi regulamin; model może wykorzystać zapisane obliczenia jego treści przy każdym kolejnym pytaniu.

You ask different questions about the same long policy; the model can reuse stored calculations of that text for each subsequent question.

This concerns you if you…

Examples

Related topics

Sources