Context Engineering Part 1
Lessons from Context Engineering For AI Agents Design around the KV Cache Prompt Cache hits means more less cost and faster response. To maximize this, we make the initial context we provide the LLM fixed and make the context append only. Also using cache breakpoints for better control over the cache. Mask, Don’t Remove Related to KV Cache, as context of tools is typically stored put at the start. Making the tools the same across calls is essential in ensure more cache hits. When previous actions and observations still refer to tools that are no longer defined in the current context, the model gets confused and may lead to schema violations and hallucinations. They recommend using response pre-fill to control the action space of the agent. This can be achieved using things like tool_choice=<specified> when interfacing with models. ...