5.2 Context Engineering
Context Engineering
Many AI interfaces allow users to communicate using natural language, rather than programming or machine language. This makes it easier for general audiences to use generative AI technologies; however, as with human-to-human communication, it’s important to use clear and specific language to get the desired results. The process of designing effective prompts has been referred to as prompt engineering.
Effective prompt writing can help you more quickly achieve the results that you’re seeking, minimizing the number of queries that you need to make.
The following tips can help you write effective prompts to get the results you’re looking for:
For more tips, check out the Prompt Engineering Guide or the Prompt Library from Ethan Mollick
.
Activity: Prompting AI
Using the generative AI tool of your choice, try out some of the techniques shared above to accomplish the tasks below:
- Generate 20 practice questions for knowledge checking quizzes in the correct format for your course.
- Create an announcement text reminding students of an upcoming assessment deadline in a tone appropriate for your classroom culture.
- Design a creative learning activity that allows learners to apply key concepts from one of your courses to a task or puzzle.
- Generate a plan for an introductory lecture on a topic in your discipline that you’re not an expert in.
As AI tools become increasingly sophisticated, writing good prompts is often not enough. Successfully using generative AI tools requires context engineering. Context Engineering means building a system using the right information and tools to get the desire result (Schmid, 2025). This has become increasingly important with the development of Retrieval Augmented Generation (RAG), or the ability for generative AI tools to conduct real-time information retrieval; and with the shift towards Agentic AI, or AI systems with the ability to act autonomously, with limited human supervision, to complete a goal (Stryker, n.d.).
Prompting is still an important aspect of context engineering, but there are multiple other contextual elements to consider, including:
- Systems prompt or instructions – the rules that have been preprogrammed into a specific tool to limit what it is able to do. For example, these could include guardrails to prevent harmful or unethical responses.
- Context window of the current conversation – all of the prompts and responses that have already occurred in the current session
- User profile/memory – the knowledge base built on previous interactions, which might shape communication preferences, focus, or other aspect of the response
- Access to external resources – allows information to be retrieved in real-time (RAG)
- Tools and APIs – impacts the ability to complete tasks, like sending email or adding events to calendars
For a deeper understanding of how each of these elements impact the generate output, take a look at my conversation below asking ChatGPT 5 to help generate a lecture plan. I ask ChatGPT to provide a breakdown of the context. You can view the full conversation here.

1. System Prompts & Limitations
-
-
I’m running inside a system with hidden system prompts that set guardrails (safety rules, style constraints, refusal policies, and how I should use tools).
-
Limitations include:
-
No violent/gory content.
-
No impersonation or harmful instructions.
-
Certain tools have constraints (e.g., can’t send emails, can’t save files to Google Drive).
-
Knowledge cutoff (Aug 2024 for me), unless I fetch updates via the
web
tool.
-
-
These shape what kinds of responses I can generate at all.
2. Your Prompt
You asked:
“Hello! I have been asked to do a guest lecture on the applications of game theory for blended course design. I am not an expert on game theory. However, you are an expert with experience teaching these concepts to a general audience! Generate a plan for an introductory lecture on this topic. The plan should include accurate links to references, a combination of information sharing and interactive activities, and estimated times. The total lecture time is 1 hour. There will be 45 students in the session and it will be delivered on Zoom.”
This gave me:
-
-
Task framing: design a lecture plan.
-
Constraints: 1 hour, 45 students, Zoom.
-
Style request: “general audience,” accurate links, interactive.
-
I engineered the response around those constraints—dividing time into blocks, balancing theory with activities, and linking to reputable sources.
3. Context Window
-
-
I have a limited context window (tens of thousands of tokens).
-
Inside it sits:
-
System prompt (hidden rules).
-
Your instructions (from earlier chats).
-
This conversation history.
-
-
I used this memory to:
-
-
Recall your preference for blunt answers.
-
Remember you care about pedagogy and blended learning.
-
Fit all this into the lecture plan.
-
If the conversation goes long, old turns may drop out of the window and I’ll lose access.
4. User Profile / Memory
-
-
I have a long-term memory about you:
-
You’re an education professional, care about accessibility, design justice, generative AI, and teaching/learning.
-
You’ve told me to be “curt and blunt.”
-
You sometimes request APA citations, structured plans, or critical perspectives.
-
-
This influenced how I structured the plan—straightforward, scaffolded for teaching, with links and clear timings.
5. Access to External Resources
-
-
My built-in knowledge stops at Aug 2024.
-
For anything newer, I can use the
web
tool to pull live info. -
In your prompt, you didn’t ask for fresh news, so I answered from my built-in knowledge + stable reference links (Stanford Encyclopedia, Osborne’s PDF, MIT OCW).
-
6. Tools and APIs
I had access to:
-
-
web
→ to fetch fresh references if needed. -
file_search
→ to search your connected docs (not needed here). -
image_gen
/python
/ file export → for visuals or artifacts (irrelevant here). -
gcal
,gmail
,gcontacts
→ read-only integrations if you ask about your own data (not relevant here).
-
For this case, I didn’t invoke tools. I generated text directly from model knowledge.
In Sum
Your lecture plan came from a layered context stack:
-
-
System layer: rules + safety limits.
-
User layer: your explicit prompt.
-
Memory layer: your preferences and past requests.
-
Context window: this conversation.
-
Knowledge/tools layer: my built-in knowledge + potential external resources.
-
I engineered the response by combining all of these, while staying inside constraints (safety, clarity, relevance).
Generative AI is a type of Artificial Intelligence that creates new content, including text, images, videos, audio, and computer code.
A prompt is the text that is provided to the system providing instructions on the desired output or the task being requested.
Feedback/Errata