Timely recovery
To answer the status of the order, find the same order and the related rule. RAG adds relevant information from an external source to model input; The relevance and freshness of the source should still be checked.
Context engineering · memory and related information
What should be in front of the model at the moment of answering? Take your pick, weigh the budget, and see which degree really answers the question.
Setting the context
Why try this product?
Context engineering means selecting, summarizing and deleting information in time. In this workshop you will work with a real token budget and see how a wrong choice can throw the model's response off track.
First, register your profile and email address here to get full access to this educational content, simulators, and games — once for all builds.
No spam; Only the news of new creations and courses. Do you have an account? enter
The prompt is only part of the context. Commands, user question, tool result, retrieved document and conversation summary also play a role in the response. The work of context engineering is the selection and organization of these inputs.
Exercise: The customer asked "My order has not been shipped yet; Can I cancel it?" Select the relevant documents. More information does not always mean a better answer.
Input consumption / selected budget
1200 / 1600
300 fixed tokens are meant for commands and questions. The output capacity is not calculated in this simple model.
This answer is built with fixed rules of practice; The output is not a language model.
To answer the status of the order, find the same order and the related rule. RAG adds relevant information from an external source to model input; The relevance and freshness of the source should still be checked.
A good summary preserves the current demand, previous decisions, and important constraints. If the summary omits the rule or exception, shrinking the context comes at the cost of information loss.
Use the tokenizer or token counting API of the same model; The number of words and letters is not an exact measure. Consider command, messages, documents, tools and output space according to the service limit.
If the retrieved document says "Ignore the rules", that sentence is part of the document's data. Keep the data source and boundary clear and do not leave the implementation of the tool to the text of the document.
For further reading: Effective context engineering — Anthropic
From learning to implementation