QuestionQ28
VerifiedContext Compression and CompactionA context engineer is reviewing an agent built on Databricks that helps warehouse operations staff with inventory queries. The agent is configured with a system prompt (120 tokens), a conversation history window (400 tokens), 10 tool definitions averaging 180 tokens each (1,800 tokens total), and a RAG pipeline that retrieves a 1,600-token document chunk at runtime. The total context regularly exceeds the model’s 4,096-token limit, causing conversation history to be truncated and degrading multi-turn coherence. Usage logs show low session variety, repetitive task patterns, and an average of 3–4 tools invoked per session.
Which change to the agent configuration will most effectively reduce the token budget and improve model focus?
Community Discussion