What Is Prompt Engineering?From Prompt Engineering to Context EngineeringAnatomy of the Context WindowSystem promptUser messageFew-shot examplesRetrieved contextTool definitionsConversation historyOutput schemaFundamentals of Effective PromptingElements of an effective promptControlling Output VariabilityHandling edge casesPrompting TechniquesIn-Context LearningZero-shot promptingFew-shot promptingRole, style, and emotion promptingRephrase and RespondThought GenerationChain-of-thought promptingStep-Back promptingProgram-of-ThoughtsAutomatic Chain-of-ThoughtDecompositionLeast-to-Most promptingSkeleton-of-ThoughtPrompt chainingEnsemblingSelf-consistencyTree-of-thoughtGenerated knowledgeSelf-Criticism and VerificationSelf-refinementChain-of-VerificationSelf-CalibrationPrompting with External SystemsRAG as context engineeringFrom prompts to agents: ReAct and beyondChallenges and Best PracticesPrompt sensitivityPrompt injection and jailbreakingTesting and iterationAutomated prompt optimizationSummaryInterview Questions and AnswersThread: Foundations and Context EngineeringThread: In-Context Learning TechniquesThread: Reasoning and Thought GenerationThread: Decomposition and Self-CriticismThread: Building Context and Multi-Step PipelinesThread: Production, Security, and Best Practices