Thursday, October 23, 2025

What is Context Engineering?

“the art and science of filling the context window with just the right information at each step of an agent’s trajectory.” Lance Martin of LangChain

Lance Martin breaks down context engineering into four categories: write, compress, isolate, and select. Agents need to write (or persist or remember) information from task to task, just like humans. Agents will often have too much context as they go from task to task and need to compress or condense it somehow, usually through summarization or ‘pruning’. Rather than giving all of the context to the model, we can isolate it or split it across agents so they can, as Anthropic describes it, “explore different parts of the problem simultaneously”. Rather than risk context rot and degraded results, the idea here is to not give the LLM enough rope to hang itself. 


Context engineering needs a semantic layer

What is a Semantic Layer?

A semantic layer is a way of attaching metadata to all data in a form that is both human and machine readable, so that people and computers can consistently understand, retrieve, and reason over it.

There is a recent push from those in the relational data world to build a semantic layer over relational data. Snowflake even created an Open Semantic Interchange (OSI) initiative to attempt to standardize the way companies are documenting their data to make it ready for AI. 

No comments:

Post a Comment