Context Engineering & Memory
8 concepts · The Library in the gameContext Engineering & Memory in 8 concepts: Context Engineering, Long Context, Retrieval-Augmented Generation, Embeddings, Agent Memory, Prompt Engineering, Prompt Caching, Knowledge Graphs.
In the gameThe Library. Shelves, a small desk (the context window) and librarians who decide what goes on the desk. See every room.
Context Engineering
Deciding what goes into a model's limited context window, when, and in what form.
Context engineering is deciding what goes into a model's limited window on each turn: which instructions, files, tool results and memories, and in what form. With too little the model lacks what it needs; with too much it loses the thread and costs more. Long tasks depend on what is kept, fetched and trimmed.
Context Engineering is cooling this week (×0.46 against the eight weeks before).
Long Context
Models that read very long inputs (hundreds of thousands to millions of tokens).
Long context means a model can read very long inputs in one go, from hundreds of thousands to millions of tokens. Whole codebases or stacks of documents fit in a single prompt. Reading that much costs more and takes longer, and filling the window does not mean every part of it is used well.
Long Context is cooling this week (×0.46 against the eight weeks before).
Retrieval-Augmented Generation
Fetching relevant documents at question time and putting them in the prompt.
Retrieval-augmented generation looks up relevant documents when a question arrives and places them in the prompt. The model then answers from that text and not from memory alone. It gives a model current and private facts without retraining, and the answer is only as good as what was fetched.
Retrieval-Augmented Generation is cooling this week (×0.14 against the eight weeks before).
Embeddings
Vectors that place similar meanings near each other, used for search and clustering.
An embedding turns a piece of text or an image into a list of numbers, placed so that things with similar meaning land close together. Search then becomes finding the nearest neighbours of a question. It is the usual way to find relevant material by meaning instead of by exact words.
Embeddings is cooling this week (×0.37 against the eight weeks before).
Agent Memory
Letting agents keep and recall information across sessions.
Agent memory lets an agent keep information between sessions. Notes are written to a store outside the model, and the relevant ones are brought back into context when a later task needs them. The agent stops starting from zero each time, and stale or wrong notes become a new way to fail.
Agent Memory is cooling this week (×0.4 against the eight weeks before).
Prompt Engineering
Writing instructions and examples that steer a model's behavior.
Prompt engineering is writing the instructions and examples that steer a model. The wording, the order and the examples shown all change what comes back, so prompts are tested and revised like code. It is the cheapest lever on a model's behaviour, and the first one to try.
Prompt Engineering is cooling this week (×0.36 against the eight weeks before).
Prompt Caching
Reusing computation for repeated prompt prefixes to cut cost and latency.
Prompt caching saves the work a model did on the start of a prompt so it can be reused when the next request begins the same way. Long instructions and documents are then processed once and not on every call. Repeated requests get cheaper and faster, as long as the shared start does not change.
Prompt Caching is cooling this week (×0.26 against the eight weeks before).
Knowledge Graphs
Storing facts as linked entities so agents can traverse relationships.
A knowledge graph stores facts as things and the links between them: this person works at that company, which makes this product. An agent can follow the links to answer questions that need several hops. It gives structure that a pile of documents lacks, and it has to be built and kept current.