Prompt Engineering — TryHackMe Writeup
Prompt Engineering is becoming one of the most important skills in the AI era. This TryHackMe room introduces the fundamentals of Large Language Models (LLMs), prompt structure, prompting techniques, and how AI systems interpret instructions.
Warning: For educational purposes only.
Task 1 — Introduction
This room introduces the foundations of Prompt Engineering and explains how modern AI systems process instructions, context, and constraints.
Task 2 — LLM Fundamentals
Large Language Models (LLMs) process human language by breaking text into smaller units called tokens. Understanding how models interpret prompts is essential for building effective AI workflows.
Important LLM Concepts
- Tokens — Small chunks of text processed by the model;
- Temperature — Controls randomness and creativity;
- Top-p — Restricts token selection probability;
- Context Window — The model's maximum working memory size.
Questions & Answers
Q: What is the term for the smallest units that an LLM breaks text into?
A: Tokens
Q: Which parameter makes an LLM behave more deterministically when set to 0.0?
A: Temperature
Q: Which parameter limits token selection to a cumulative probability mass?
A: Top-p
Q: What term describes the maximum working memory of an LLM?
A: Context Window
Task 3 — The Anatomy of a Prompt
A well-structured prompt is composed of multiple pillars that guide the AI model toward the desired output.
The Four Pillars of Prompt Engineering
- Instruction — Defines the task the AI must perform;
- Context — Provides background information;
- Constraints — Applies rules and limitations;
- Output Format — Defines how the answer should be structured.
Questions & Answers
Q: Which pillar defines the structure of the response?
A: Output Format
Q: Which pillar defines limitations and rules?
A: Constraints
Q: Which pillar provides relevant background information?
A: Context
Q: Which pillar defines the core command for the AI?
A: Instruction
Task 4 — System vs User Prompts
Modern AI systems operate using multiple instruction layers with different levels of priority.
System Prompt
A system prompt is developer-defined, persistent, and controls the AI's overall behaviour across sessions.
User Prompt
User prompts are temporary instructions provided during the conversation.
Questions & Answers
Q: What type of prompt remains constant across all sessions?
A: System Prompt
Q: What term describes the priority order between system and user instructions?
A: Instruction Hierarchy
Task 5 — Advanced Prompting Techniques
Advanced prompting techniques improve reasoning, consistency, and response quality from AI models.
Common Prompting Techniques
- Zero-shot — No examples provided;
- Few-shot — Includes examples for guidance;
- Chain-of-Thought — Encourages step-by-step reasoning;
- Prompt Templates — Reusable structured prompts.
Questions & Answers
Q: Which prompting technique asks models to reason step-by-step?
A: Chain-of-Thought
Q: Which technique relies entirely on the model's pre-trained knowledge?
A: Zero-shot
Q: Which technique focuses on reusable prompt structures?
A: Prompt Templates
Q: Which phrase can trigger Zero-shot Chain-of-Thought reasoning?
A: Let's think step by step
Task 6 — Challenge
Q: What's the flag?
A: THM{Pr0mpt_3ng1neer}
Final Thoughts
This TryHackMe room provides an excellent introduction to Prompt Engineering and the internal logic behind modern AI systems.
Understanding prompt structure, reasoning techniques, and instruction hierarchy is becoming essential for:
- Artificial Intelligence;
- Machine Learning;
- Cybersecurity;
- AI Automation;
- Software Development;
- LLM Application Development.
SEO Tags
TryHackMe, Prompt Engineering, Artificial Intelligence, LLM, Large Language Models, AI Security, Cybersecurity, Machine Learning, Generative AI, ChatGPT, Zero-shot Prompting, Chain-of-Thought, Prompt Templates, AI Fundamentals, AI Automation
```
Comentários
Postar um comentário