liveBook · Manning

Compaction

As explained in The Art of AI Product Development

Prompt compression is the reduction of prompt context and examples while preserving information needed for high-quality model outputs.

Prompt compression summarizes context and examples while preserving their essential information, aiming to maintain high-quality outputs with fewer tokens. section 6.4.2

It supports prompt optimization for complex tasks and can reduce costs. Automating compression helps maintain efficiency at scale. section 6.4.2

How The Art of AI Product Development covers it

How deep it goes
Defines compression as summarizing context and examples while preserving their essence; gives no specific procedure.
What you can do after
Apply it by summarizing context and examples to use fewer tokens while aiming to maintain high-quality outputs.
How it connects
Connects prompt compression to few-shot prompting, chain-of-thought prompting, prompt optimization, and token costs.

Also explained in

Compare how 5 books explain compaction →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.