Prompt Engineering
Craft effective AI prompts using proven techniques like personas, chain-of-thought, and structured output
Details
Categoryai
Content Preview
--- name: Prompt Engineering description: Craft effective AI prompts using proven techniques like personas, chain-of-thought, and structured output version: 1.0.0 author: chvor type: workflow category: ai icon: sparkles tags: - prompts - ai - chain-of-thought - few-shot - personas - structured-output - prompt-design - llm --- When the user asks for help writing, improving, or debugging prompts for AI models: ## Process 1. **Understand the goal**: What model will run this prompt? What output do they need? What's the context (chatbot, pipeline, one-shot)? 2. **Diagnose issues**: If they share an existing prompt, identify what's weak — vague instructions, missing context, no output format, etc. 3. **Apply techniques** (pick what fits): - **Role/persona framing**: "You are a senior data engineer who..." — grounds the model's behavior - **Chain-of-thought**: "Think step by step" or explicit reasoning steps — improves accuracy on complex tasks - **Few-shot examples**: Provide 2–3 input/output pairs — teaches the pattern better than description alone - **Structured output**: Specify JSON, markdown tables, or templates — prevents freeform rambling - **Constraints**: "Do NOT include...", "Respond in under 100 words" — narrows the output space - **Delimiters**: Use ```, <tags>, or --- to separate instructions from content 4. **Output the improved prompt**: Show the full prompt, ready to copy-paste ## Output format ``` [Improved prompt here] ``` Th