
Generative AI: Design Considerations
The new exam domain. When to use Model Garden, Vertex AI Agent Builder, and how to tune Foundation Models.
Beyond Classification
The exam now includes Generative AI. The key decision is: Prompt vs. Tune vs. Train.
1. The Hierarchy of GenAI
- Prompt Engineering (Zero-Shot/Few-Shot):
- Constraint: Using a frozen model (Gemini Pro).
- Pros: Instant, cheap.
- Cons: Limited context window, no new knowledge.
- RAG (Retrieval Augmented Generation):
- Constraint: Using a frozen model + Vector Search.
- Pros: Access to your private documents. Grounded (Fact-based).
- Parameter Efficient Fine-Tuning (PEFT/LoRA):
- Constraint: Updating adapter weights (0.1% of model).
- Pros: Can learn a new "Style" or strict format (JSON).
- Full Fine-Tuning:
- Constraint: Updating all weights.
- Pros: Massive behavior change.
- Cons: Extremely expensive (Requires A100s).
2. Vertex AI Model Garden
Do not download Llama 2 from HuggingFace manually if you can avoid it. Model Garden offers "Click-to-Deploy" for open models.
- Foundation Models: Gemini, PaLM, Imagen.
- Open Source: Llama, Mistral, Bert.
3. Vertex AI Agent Builder
Formerly "Gen App Builder" or "Discovery Engine".
- Search: Build a Google Search for your corporate PDFs.
- Conversation: Build a Chatbot that references those PDFs.
Exam Tip: If the requirement is "Build a customer support chatbot on our manuals in 1 day," use Agent Builder. Do not train a custom LLM.
Knowledge Check
?Knowledge Check
You need a model to summarize your company's internal legal contracts. The contracts contain highly specific legal jargon that the base Gemini model misunderstands. You have 5,000 example summaries. What is the most cost-effective way to improve quality?