Skip to main content

Prompt Engineering Workflow

Systematic prompt engineering for LLMs including prompt design, few-shot examples, chain-of-thought prompting, evaluation, and version control.

Complexity: Moderate | Duration: 15-30m | Category: Devops

Tags: ml llm prompt-engineering nlp

Workflow Diagram

Steps

Step 1: Task definition

Agent: ml

engineer - Define clear input/output specification

Step 2: Prompt design

Agent: ml

engineer - Write initial prompt with instructions and constraints

Step 3: Few

Agent: shot examples

ml-engineer - Add 3-5 representative examples

Step 4: Chain

Agent: of

thought - ml-engineer - Add reasoning steps if complex task

Step 5: Prompt testing

Agent: testing

specialist - Test on diverse examples, edge cases

Step 6: Iterative refinement

Agent: ml

engineer - Adjust based on failure modes

Step 7: Prompt versioning

Agent: ml

engineer - Version control in git with metadata

Step 8: Performance evaluation

Agent: testing

specialist - Measure accuracy, cost, latency

Usage

To execute this workflow:

/workflow devops/prompt-engineering-workflow.workflow

See other workflows in this category for related automation patterns.