Appearance
Phase 1: Interactive Flashcard Hub β
Active Recall & Spaced Repetition: Master the foundational concepts, parameter mechanics, systematic prompt structures, tracing hierarchy, and security primitives of Phase 1: The Engine & Basic Prompting.
Curriculum Alignment:docs/plan/01_phase1_engine_and_prompting.md
Interaction: Click any card or press Space to flip. Use β Prev and Next β to navigate.
ποΈ Deck 1: The GenAI Mindset β
Master autoregressive mechanics, the spiky intelligence paradox, BPE subword tokenization, and fixed compute budgets:
ποΈ Deck 1: The GenAI Mindset
Card 1 of 5The GenAI MindsetClick or press Space to flip βΊ
What is an LLM fundamentally, and what is its mathematical core equation?
P(x_t | x_<t; ΞΈ)The GenAI Mindset β’ AnswerClick to flip back β»
An LLM is a probabilistic autoregressive next-token predictor. Given a context window of previous tokens x_<t and billions of frozen parameters ΞΈ, it calculates a continuous probability distribution over a discrete vocabulary (32kβ128k tokens) to sample the next token.
π‘ Architect Takeaway: LLMs are statistical sequence generators, not deterministic symbolic knowledge bases.
ποΈ Deck 2: Engine Parameters (The "Knobs") β
Master Temperature scaling, Top-P nucleus sampling, Stop Sequences, Max Length, and Penalties:
ποΈ Deck 2: Engine Parameters (The Knobs)
Card 1 of 7Engine ParametersClick or press Space to flip βΊ
How does Temperature (T) scale logits mathematically, and what is its behavior as T β 0?
P(w_i) = exp(z_i / T) / Ξ£ exp(z_j / T)Engine Parameters β’ AnswerClick to flip back β»
Temperature divides raw logits before the softmax function. As T approaches 0 (greedy decoding), the probability of the maximum logit approaches 1.0 while all other tokens drop to 0.0, resulting in deterministic argmax token selection.
π‘ Architect Takeaway: Use T=0.0 for structured JSON extraction, code generation, and classification where determinism is critical.
ποΈ Deck 3: Systematic Structure & In-Context Learning β
Master the 6 canonical prompt components (Persona, Context, Instruction, Input, Steps, Output Format), Zero/Few-shot learning, and LangChain templates:
ποΈ Deck 3: Systematic Structure
Card 1 of 6Systematic StructureClick or press Space to flip βΊ
What are the 6 canonical components of a systematic prompt?
Systematic Structure β’ AnswerClick to flip back β»
1. Persona: Identity, tone, and operational boundaries. 2. Context: Background scenario, domain rules, and axioms. 3. Instruction: The core directive or transformation task. 4. Input: Untrusted user payload enclosed in explicit delimiters. 5. Steps: Procedural execution logic the model must follow. 6. Output Format: Exact schema, JSON keys, or structure required.
π‘ Architect Takeaway: Organizing prompts into these 6 components eliminates ambiguity and schema drift.
ποΈ Deck 4: Instrumentation & Tracing Hierarchy β
Master LangFuse tracing, The Run as the atomic unit, single-turn trace inspection (TTFT/ITL), and context propagation:
ποΈ Deck 4: Instrumentation & Tracing Hierarchy
Card 1 of 5Instrumentation & TracingClick or press Space to flip βΊ
Why is semantic tracing necessary when monitoring LLM applications?
Instrumentation & Tracing β’ AnswerClick to flip back β»
Traditional APM only checks HTTP status codes. An LLM API call can return HTTP 200 OK while outputting a catastrophic hallucination, violating safety guardrails, or failing schema validation. Semantic tracing inspects the actual prompt, completion, and reasoning quality.
π‘ Architect Takeaway: HTTP 200 OK does not indicate semantic correctness in generative AI systems.
ποΈ Deck 5: Compulsory Security Primitives & Threat Awareness β
Master OWASP LLM01 injection defenses, XML delimiters, Anti-Extraction directives, Canary tokens, and NIST AML Unicode normalization:
ποΈ Deck 5: Compulsory Security Primitives & Threat Awareness
Card 1 of 7Security PrimitivesClick or press Space to flip βΊ
What is the difference between Direct and Indirect Prompt Injection (OWASP LLM01)?
Security Primitives β’ AnswerClick to flip back β»
Direct Injection (Jailbreak) occurs when the end user supplies malicious input overriding system instructions. Indirect Injection occurs when untrusted third-party data (web pages, PDFs, emails, database records) read by the model contains hidden adversarial directives.
π‘ Architect Takeaway: Indirect injection is the #1 vulnerability in RAG pipelines and autonomous tool-using agents.
π― Active Recall Protocol for Trainees β
- Daily Spaced Repetition: Run through 1 deck daily during Phase 1.
- Target Mastery: Aim to mark
of cards in each deck as Mastered before beginning Phase 1 Lab implementations. - Cross-Reference:
- For parameter deep dives: review 02_engine_parameters.md.
- For full conceptual hierarchy: explore the Phase 1 Architecture Mindmap.