Completed your first bake? Multi-target baking builds on that foundation.
Bake Any Knowledge Into Model Weights
Any information you can express as a prompt can be baked into a language model:- Behaviors: “Act like Yoda”, “Be empathetic”, “Write concisely”
- Facts: Product documentation, company policies, legal knowledge
- Procedures: Troubleshooting guides, how-to instructions, workflows
- Expertise: Domain knowledge, technical specifications, best practices
How does RAG Compare to Baking?
Traditional RAG
Architecture:
- 1/ User asks question
- 2/ Query vector database
- 3/ Retrieve relevant docs
- 4/ Inject into prompt context
- 5/ Generate response
- +200ms retrieval latency
- +500 tokens per request
- Vector DB & inference
- Embedding generation
Multi-Target Baking
Architecture:
Overhead:
- 1/ User asks question
- 2/ Generate response
Overhead:
- 0ms (no retrieval)
- 0 context tokens
- Model only
- No embeddings needed
Benefits Over RAG Systems
- Zero retrieval latency: No database queries at inference time
- Zero context tokens: Knowledge lives in weights, not prompts
- Simpler architecture: No vector databases, embeddings, or retrieval logic
- Offline operation: Model works without external dependencies
- Weighted knowledge: Prioritize important information during training
- Consistent responses: Deterministic knowledge, not dependent on retrieval quality
Example: Baking Apple Product Knowledge
Traditional RAG systems store product information in a vector database, retrieve relevant docs at runtime, and inject them into prompts. Multi-target baking bakes the knowledge directly into weights.Your Knowledge Base
Imagine you’re building an Apple support chatbot. Your knowledge base contains: Document 1: iPhone SupportComplete Multi-Target Workflow in 6 Steps
1
Create Repository & Shared Student Prompt
Set up your repository and the shared empty student prompt:
In this example, we use a shared empty student prompt since we wish that this model always responds as an Apple customer support agent.
2
Create iPhone Support Target
Bake iPhone troubleshooting knowledge:
3
Create Mac Support Target
Bake Mac troubleshooting knowledge:
4
Create AirPods Support Target
Bake AirPods troubleshooting knowledge:
5
Combine Targets & Configure Bake
Combine targets & specify bake config (in this example, set equal weightage to all baked prompts):
6
Run Training
Start the multi-target bake:
RAG vs Baked Knowledge
| Traditional RAG | Multi-Target Baking |
|---|---|
User asks: “My iPhone won’t turn on”
Latency: +200ms Tokens: +500 context tokens Infrastructure: Vector DB + embeddings | User asks: “My iPhone won’t turn on”
Latency: 0ms overhead Tokens: 0 context tokens Infrastructure: Model only |
Best Practices
Generate Diverse Training Data
Generate Diverse Training Data
Use good generators for each target to create diverse, high-quality training examples.
Test Incrementally
Test Incrementally
Start with 2 targets, validate results, then add more. Easier to debug with fewer targets.
Common Use Cases for Knowledge Baking
Replace Product Documentation RAG
Bake your entire product docs into the model:- Target 1: “Product Overview”
- Target 2: “Feature Documentation”
- Target 3: “API Reference”
- Target 4: “Troubleshooting”
- Target 5: “FAQs”
Bake Company Policies
Eliminate policy manual lookups:- Target 1: “HR Policies”
- Target 2: “Code of Conduct”
- Target 3: “Benefits Information”
- Target 4: “Onboarding Procedures”
Bake Educational Content
Create subject-matter expert models:- Target 1: “Biology Chapter 1: Cells”
- Target 2: “Biology Chapter 2: Genetics”
- Target 3: “Biology Chapter 3: Evolution”
- Target 4: “Biology Chapter 4: Ecosystems”
- Target 5: “Biology Chapter 5: Anatomy”
Bake Legal Knowledge Base
Build specialized legal assistants:- Target 1: “Contract Law Basics”
- Target 2: “Intellectual Property Guide”
- Target 3: “Employment Law”