Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

AI Fundamental - Prompt Engineering

Back


Prompt Engineering


Attention Mechanism


Common Techniques

Example: “Summarize the following text in one sentence: [Insert Text]”



Example: > Translate English to French:

  • Hello → Bonjour
  • Goodbye → Au revoir
  • Thank you →

Example: “You are a senior DevOps engineer. Explain CI/CD pipelines clearly.”


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

Example

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