-
Notifications
You must be signed in to change notification settings - Fork 0
002_Context_Engineering
Definition
Context engineering is the practice of managing all information that enters an LLM's context.
Retrieval Context
Information fetched from knowledge sources.
Conversation Memory
Previous user interactions.
Application State
Current workflow information.
Prompt Design
Instructions guiding the model.
Storage Layer
- Vector databases
- Traditional databases
- Hybrid storage systems
The workshop positions context engineering as the next evolution beyond prompt engineering.
Imagine a shopkeeper asks:
"How much should I charge customer Amit?"
AI needs:
Customer name = Amit
Products in cart
Discount rules
GST rules
Wallet balance
Without this information:
AI = Guessing
With this information:
AI = Accurate
Providing all this information is Context Engineering.
Now we provide much more than a prompt.
Prompt
+
Company Documents
+
Customer Data
+
Previous Chats
+
Current Order
+
Database Information
↓
LLM
This is Context Engineering.
Suppose you say through voice:
"Add 2 kg sugar for customer Ram."
AI needs context:
Current Voice Command
Add 2 kg sugar
Customer Information
Customer: Ram
Wallet: ₹500
Product Information
Sugar Price = ₹45/kg
Stock = 100 kg
Business Rules
Apply GST
Apply Loyalty Points
All together:
Voice Command
+
Customer Data
+
Product Data
+
Business Rules
↓
LLM
↓
Generate Bill
This is Context Engineering.
Instructions for AI.
You are a billing assistant.
Fetch data from documents.
Question
↓
Search PDF
↓
Relevant Content
↓
LLM
Remember previous conversation.
Customer selected:
- Rice
- Sugar
- Oil
Current business information.
- Wallet Balance
- Stock
- Orders
- Invoices
Allow AI to perform actions.
- Create Bill
- Send SMS
- Generate PDF
- Save Order
Why Context Engineering Matters
Without context:
User: What's my balance?
AI:
I don't know.
With context:
Database:
Balance = ₹1250
AI:
Your balance is ₹1250.
Context Engineering in Your Voice Billing App
Headphone Mic
↓
Whisper
↓
Speech Text
↓
Context Builder
↓
Ollama (Llama 3)
↓
Billing Service
↓
Invoice
- Current Customer
- Current Cart
- Product Prices
- Stock
- GST Rules
- Wallet Balance
- Previous Commands
Then sends everything to the LLM.
That Context Builder is doing Context Engineering.