All technological notes.
Prompt engineering
prompts) to guide an AI model (like an LLM) to produce accurate, relevant, and structured outputs.Attention Mechanism
Zero-shot Prompting
Example: “Summarize the following text in one sentence: [Insert Text]”
One-shot prompting
Few-shot Prompting
Example: > Translate English to French:
- Hello → Bonjour
- Goodbye → Au revoir
- Thank you →
Role/Instruction Prompting
Example: “You are a senior DevOps engineer. Explain CI/CD pipelines clearly.”
Step-by-step (Chain-of-Thought) Prompting
Example: “Solve the following math problem step by step:”
Specifying the exact structure of the response.
Example: Explain Kubernetes in:
- 1 sentence summary
- 3 bullet points
Providing relevant data to improve accuracy and grounding.
Example: “Based on the following logs, identify the issue:
<logs here>”
Setting specific rules or limitations.
Example: “Answer in less than 50 words. Do not use technical jargon.”
You are a senior DevOps engineer. ← Role
Your task is to analyze a CI/CD failure. ← Task
Context:
<logs / data here> ← Context
Instructions:
- Think step by step
- Identify root cause first ← Reasoning guidance
Available tools:
- log_parser ← (optional)
Output format:
- Root Cause
- Fix ← Structure
Constraints:
- Max 100 words
- Be concise ← Limits
You are a senior DevOps engineer.
Your task is to analyze the following CI/CD pipeline failure, identify the root cause, and suggest a fix.
Context:
ERROR: Docker build failed
Step 3/5 : COPY requirements.txt .
COPY failed: file not found in build context
Instructions:
- Think step by step
- Identify the root cause first
- Then suggest the most likely fix
Available tools:
- None
Output format:
- Root Cause
- Fix
Constraints:
- Keep the explanation under 80 words
- Avoid unnecessary jargon