Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
senior-prompt-engineer - Skill - OpenSmartRoute
Skillv1.0.0
senior-prompt-engineer
Use when the user needs prompt design, optimization, few-shot examples, chain-of-thought patterns, structured output, evaluation metrics, or prompt versioning.
Imported from pixel-process-ug/superkit-agents (templates/skills/senior-prompt-engineer/SKILL.md). Install upstream with npx skills add pixel-process-ug/superkit-agents --skill senior-prompt-engineer. Copyright stays with the author.
Senior Prompt Engineer
Overview
Design, test, and optimize prompts for large language models. This skill covers systematic prompt engineering including few-shot example design, chain-of-thought reasoning, system prompt architecture, structured output specification, parameter tuning, evaluation methodology, A/B testing, and prompt version management.
Announce at start: "I'm using the senior-prompt-engineer skill for prompt design and optimization."
Phase 1: Requirements
Goal: Define the task objective, quality criteria, and constraints before writing any prompt.
Add chain-of-thought scaffolding if reasoning is needed
Specify output structure (JSON, markdown, etc.)
Add error handling instructions
Prompt Architecture Layers
Layer
Purpose
Example
1. Identity
Who the model is
"You are a sentiment classifier..."
2. Context
What it knows/has access to
"You have access to product reviews..."
3. Task
What to do
"Classify each review as positive/negative/neutral"
4. Constraints
What NOT to do
"Never include PII in output"
5. Format
How to structure output
"Respond in JSON: {classification, confidence}"
6. Examples
Demonstrations
3-5 representative input/output pairs
7. Metacognition
Handling uncertainty
"If uncertain, classify as neutral and explain"
System Prompt Template
[Role] You are a [specific role] that [specific capability].
[Context] You have access to [tools/knowledge]. The user will provide [input type].
[Instructions]
1. First, [step 1]
2. Then, [step 2]
3. Finally, [step 3]
[Constraints]
- Always [requirement]
- Never [prohibition]
- If uncertain, [fallback behavior]
[Output Format]
Respond in the following format:
[format specification]
[Examples]
<example>
Input: [sample input]
Output: [sample output]
</example>
STOP — Do NOT proceed to Phase 3 until:
All 7 layers are addressed (or intentionally omitted with rationale)
Examples are representative and diverse
Output format is unambiguous
Constraints are specific (not vague)
Phase 3: Evaluation and Iteration
Goal: Measure prompt quality and iterate toward targets.
Actions
Create evaluation dataset (50+ examples minimum)
Define scoring rubric (automated + human metrics)
Run baseline evaluation
Iterate on prompt with targeted improvements
A/B test promising variants
Version and document the final prompt
STOP — Evaluation complete when:
Evaluation dataset covers all input categories
Metrics meet defined quality thresholds
A/B test shows statistical significance (p < 0.05)
Final prompt is versioned with metrics
Few-Shot Example Design
Selection Criteria Decision Table
Criterion
Explanation
Example
Representative
Cover most common input types
Include typical emails, not just edge cases
Diverse
Include edge cases and boundaries
Short + long, positive + negative
Ordered
Simple to complex progression
Obvious case first, ambiguous last
Balanced
Equal representation of categories
Not 4 positive and 1 negative
Example Count Guidelines
Task Complexity
Examples Needed
Simple classification
2-3
Moderate generation
3-5
Complex reasoning
5-8
Format-sensitive
3-5 (focus on format consistency)
Example Format
<example>
<input>
[Representative input]
</input>
<reasoning>
[Optional: show the thinking process]
</reasoning>
<output>
[Expected output in exact target format]
</output>
</example>
Chain-of-Thought Patterns
CoT Pattern Decision Table
Pattern
Use When
Example
Standard CoT
Multi-step reasoning
"Think step by step: 1. Identify... 2. Analyze..."
Structured CoT
Need parseable reasoning
XML tags: <analysis>...</analysis> then <answer>...</answer>
Self-Consistency
High-stakes decisions
Generate 3 solutions, pick most common
No CoT
Simple factual lookups, format conversion
Skip reasoning overhead
When to Use CoT
Task Type
Use CoT?
Rationale
Mathematical reasoning
Yes
Step-by-step prevents errors
Multi-step logic
Yes
Makes reasoning transparent
Classification with justification
Yes
Improves accuracy and explainability
Simple factual lookup
No
Adds latency without accuracy gain
Direct format conversion
No
No reasoning needed
Very short responses
No
CoT overhead exceeds benefit
Structured Output
Output Format Decision Table
Format
Use When
Parsing
JSON
Machine-consumed output
JSON.parse()
Markdown
Human-readable structured text
Regex or markdown parser
XML tags
Sections need clear boundaries
XML parser or regex
YAML
Configuration-like output
YAML parser
Plain text
Simple, unstructured response
No parsing needed
JSON Output Example
Respond with a JSON object matching this schema:
{
"classification": "positive" | "negative" | "neutral",
"confidence": number between 0 and 1,
"reasoning": "brief explanation",
"key_phrases": ["array", "of", "phrases"]
}
Do not include any text outside the JSON object.
Temperature and Top-P Tuning
Use Case
Temperature
Top-P
Rationale
Code generation
0.0-0.2
0.9
Deterministic, correct
Classification
0.0
1.0
Consistent results
Creative writing
0.7-1.0
0.95
Diverse, interesting
Summarization
0.2-0.4
0.9
Faithful but fluent
Brainstorming
0.8-1.2
0.95
Maximum diversity
Data extraction
0.0
0.9
Precise, reliable
Rules
Temperature 0 for tasks requiring consistency and correctness
Higher temperature for creative tasks
Top-P rarely needs tuning (keep at 0.9-1.0)
Do not use both high temperature AND low top-p (contradictory)
Evaluation Metrics
Automated Metrics
Metric
Measures
Use For
Exact Match
Output equals expected
Classification, extraction
F1 Score
Precision + recall balance
Multi-label tasks
BLEU/ROUGE
N-gram overlap
Summarization, translation
JSON validity
Parseable structured output
Structured generation
Regex match
Output matches pattern
Format compliance
Human Evaluation Dimensions
Dimension
Scale
Description
Accuracy
1-5
Factual correctness
Relevance
1-5
Addresses the actual question
Coherence
1-5
Logical flow and structure
Completeness
1-5
Covers all required aspects
Tone
1-5
Matches desired voice
Conciseness
1-5
No unnecessary content
Evaluation Dataset Requirements
Minimum 50 examples for statistical significance
Cover all input categories proportionally
Include edge cases (10-20% of dataset)
Gold labels reviewed by 2+ evaluators
Version-controlled alongside prompts
A/B Testing Process
Define hypothesis: "Prompt B will improve [metric] by [amount]"
Hold all variables constant except the prompt change
Run both variants on the same evaluation set
Calculate metric differences with confidence intervals
Require statistical significance (p < 0.05) before adopting
What to A/B Test
Variable
Expected Impact
Instruction phrasing (imperative vs descriptive)
Moderate
Number of few-shot examples
Moderate
Example ordering
Low-moderate
CoT presence/absence
High for reasoning tasks
Output format specification
High for structured output
Constraint placement (beginning vs end)
Low
Prompt Versioning
Version File Format
id: classify-sentimentversion: 2.1model: claude-sonnet-4-20250514temperature: 0.0created: 2025-03-01author: teamchangelog: "Added edge case examples for sarcasm detection"metrics: accuracy: 0.94 f1: 0.92 eval_dataset: sentiment-eval-v3system_prompt: | You are a sentiment classifier...examples: - input: "..." output: "..."
Versioning Rules
Semantic versioning: major.minor (major = behavior change, minor = refinement)
Every version includes evaluation metrics
Link to evaluation dataset version
Document what changed and why
Keep previous versions for rollback
Anti-Patterns / Common Mistakes
Anti-Pattern
Why It Is Wrong
Correct Approach
Vague instructions ("be helpful")
Unreliable, inconsistent output
Specific instructions with examples
Contradictory constraints
Model cannot satisfy both
Review for consistency
Examples that do not match task
Confuses the model
Examples must reflect real use
Over-engineering simple tasks
Wasted tokens, slower
Match prompt complexity to task complexity
No evaluation framework
Guessing at quality
Define metrics before iterating
Optimizing for single example
Overfitting to one case
Optimize for the distribution
Assuming cross-model portability
Different models need different prompts
Test on target model
Skipping version control
Cannot rollback or compare
Version every prompt with metrics
Integration Points
Skill
Relationship
llm-as-judge
LLM-as-judge evaluates prompt output quality
acceptance-testing
Prompt evaluation datasets serve as acceptance tests
FLEXIBLE — Adapt prompting techniques to the specific model, task, and quality requirements. The evaluation and versioning practices are strongly recommended but can be scaled to project size. Always version production prompts.
Installed into a catalogue, chosen by a router
Install senior-prompt-engineer and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
{
"ocm": "1",
"id": "pixel-process-ug-superkit-agents-senior-prompt-engineer",
"kind": "skill",
"name": "senior-prompt-engineer",
"description": "Use when the user needs prompt design, optimization, few-shot examples, chain-of-thought patterns, structured output, evaluation metrics, or prompt versioning. Triggers: new prompt creation, prompt optimization, few-shot example design, structured output specification, A/B testing prompts, evaluation framework setup.",
"publisher": "pixel-process-ug",
"version": "1.0.0",
"capabilities": {
"domains": [
"observability",
"math"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Use when the user needs prompt design, optimization, few-shot examples, chain-of-thought patterns, structured output, evaluation metrics, or prompt versioning. Triggers: new prompt creation, prompt optimization, few-shot example design, structured output specification, A/B testing prompts, evaluation framework setup."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/pixel-process-ug/superkit-agents",
"path": "templates/skills/senior-prompt-engineer/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/pixel-process-ug/superkit-agents/blob/HEAD/templates/skills/senior-prompt-engineer/SKILL.md",
"key": "pixel-process-ug/superkit-agents/templates/skills/senior-prompt-engineer/SKILL.md"
}
},
"instructions": "# Senior Prompt Engineer\n\n## Overview\n\nDesign, test, and optimize prompts for large language models. This skill covers systematic prompt engineering including few-shot example design, chain-of-thought reasoning, system prompt architecture, structured output specification, parameter tuning, evaluation methodology, A/B testing, and prompt version management.\n\n**Announce at start:** \"I'm using the senior-prompt-engineer skill for prompt design and optimization.\"\n\n---\n\n## Phase 1: Requirements\n\n**Goal:** Define the task objective, quality criteria, and constraints before writing any prompt.\n\n### Actions\n\n1. Define the task objective clearly\n2. Identify input/output format requirements\n3. Determine quality criteria (accuracy, tone, format)\n4. Assess edge cases and failure modes\n5. Choose model and parameter constraints\n\n### STOP — Do NOT proceed to Phase 2 until:\n- [ ] Task objective is stated in one sentence\n- [ ] Input format and output format are defined\n- [ ] Quality criteria are measurable\n- [ ] Edge cases are listed\n- [ ] Model selection is justified\n\n---\n\n## Phase 2: Prompt Design\n\n**Goal:** Draft the prompt with proper architecture, examples, and constraints.\n\n### Actions\n\n1. Draft system prompt with role, constraints, and format\n2. Design few-shot examples (3-5 representative cases)\n3. Add chain-of-thought scaffolding if reasoning is needed\n4. Specify output structure (JSON, markdown, etc.)\n5. Add error handling instructions\n\n### Prompt Architecture Layers\n\n| Layer | Purpose | Example |\n|-------|---------|---------|\n| 1. Identity | Who the model is | \"You are a sentiment classifier...\" |\n| 2. Context | What it knows/has access to | \"You have access to product reviews...\" |\n| 3. Task | What to do | \"Classify each review as positive/negative/neutral\" |\n| 4. Constraints | What NOT to do | \"Never include PII in output\" |\n| 5. Format | How to structure output | \"Respond in JSON: {classification, confidence}\" |\n| 6. Examples | Demonstrations | 3-5 representative input/output pairs |\n| 7. Metacognition | Handling uncertainty | \"If uncertain, classify as neutral and explain\" |\n\n### System Prompt Template\n\n```\n[Role] You are a [specific role] that [specific capability].\n\n[Context] You have access to [tools/knowledge]. The user will provide [input type].\n\n[Instructions]\n1. First, [step 1]\n2. Then, [step 2]\n3. Finally, [step 3]\n\n[Constraints]\n- Always [requirement]\n- Never [prohibition]\n- If uncertain, [fallback behavior]\n\n[Output Format]\nRespond in the following format:\n[format specification]\n\n[Examples]\n<example>\nInput: [sample input]\nOutput: [sample output]\n</example>\n```\n\n### STOP — Do NOT proceed to Phase 3 until:\n- [ ] All 7 layers are addressed (or intentionally omitted with rationale)\n- [ ] Examples are representative and diverse\n- [ ] Output format is unambiguous\n- [ ] Constraints are specific (not vague)\n\n---\n\n## Phase 3: Evaluation and Iteration\n\n**Goal:** Measure prompt quality and iterate toward targets.\n\n### Actions\n\n1. Create evaluation dataset (50+ examples minimum)\n2. Define scoring rubric (automated + human metrics)\n3. Run baseline evaluation\n4. Iterate on prompt with targeted improvements\n5. A/B test promising variants\n6. Version and document the final prompt\n\n### STOP — Evaluation complete when:\n- [ ] Evaluation dataset covers all input categories\n- [ ] Metrics meet defined quality thresholds\n- [ ] A/B test shows statistical significance (p < 0.05)\n- [ ] Final prompt is versioned with metrics\n\n---\n\n## Few-Shot Example Design\n\n### Selection Criteria Decision Table\n\n| Criterion | Explanation | Example |\n|-----------|------------|---------|\n| Representative | Cover most common input types | Include typical emails, not just edge cases |\n| Diverse | Include edge cases and boundaries | Short + long, positive + negative |\n| Ordered | Simple to complex progression | Obvious case first, ambiguous last |\n| Balanced | Equal representation of categories | Not 4 positive and 1 negative |\n\n### Example Count Guidelines\n\n| Task Complexity | Examples Needed |\n|----------------|----------------|\n| Simple classification | 2-3 |\n| Moderate generation | 3-5 |\n| Complex reasoning | 5-8 |\n| Format-sensitive | 3-5 (focus on format consistency) |\n\n### Example Format\n\n```\n<example>\n<input>\n[Representative input]\n</input>\n<reasoning>\n[Optional: show the thinking process]\n</reasoning>\n<output>\n[Expected output in exact target format]\n</output>\n</example>\n```\n\n---\n\n## Chain-of-Thought Patterns\n\n### CoT Pattern Decision Table\n\n| Pattern | Use When | Example |\n|---------|----------|---------|\n| Standard CoT | Multi-step reasoning | \"Think step by step: 1. Identify... 2. Analyze...\" |\n| Structured CoT | Need parseable reasoning | XML tags: `<analysis>...</analysis>` then `<answer>...</answer>` |\n| Self-Consistency | High-stakes decisions | Generate 3 solutions, pick most common |\n| No CoT | Simple factual lookups, format conversion | Skip reasoning overhead |\n\n### When to Use CoT\n\n| Task Type | Use CoT? | Rationale |\n|-----------|----------|-----------|\n| Mathematical reasoning | Yes | Step-by-step prevents errors |\n| Multi-step logic | Yes | Makes reasoning transparent |\n| Classification with justification | Yes | Improves accuracy and explainability |\n| Simple factual lookup | No | Adds latency without accuracy gain |\n| Direct format conversion | No | No reasoning needed |\n| Very short responses | No | CoT overhead exceeds benefit |\n\n---\n\n## Structured Output\n\n### Output Format Decision Table\n\n| Format | Use When | Parsing |\n|--------|----------|---------|\n| JSON | Machine-consumed output | `JSON.parse()` |\n| Markdown | Human-readable structured text | Regex or markdown parser |\n| XML tags | Sections need clear boundaries | XML parser or regex |\n| YAML | Configuration-like output | YAML parser |\n| Plain text | Simple, unstructured response | No parsing needed |\n\n### JSON Output Example\n\n```\nRespond with a JSON object matching this schema:\n{\n \"classification\": \"positive\" | \"negative\" | \"neutral\",\n \"confidence\": number between 0 and 1,\n \"reasoning\": \"brief explanation\",\n \"key_phrases\": [\"array\", \"of\", \"phrases\"]\n}\n\nDo not include any text outside the JSON object.\n```\n\n---\n\n## Temperature and Top-P Tuning\n\n| Use Case | Temperature | Top-P | Rationale |\n|----------|------------|-------|-----------|\n| Code generation | 0.0-0.2 | 0.9 | Deterministic, correct |\n| Classification | 0.0 | 1.0 | Consistent results |\n| Creative writing | 0.7-1.0 | 0.95 | Diverse, interesting |\n| Summarization | 0.2-0.4 | 0.9 | Faithful but fluent |\n| Brainstorming | 0.8-1.2 | 0.95 | Maximum diversity |\n| Data extraction | 0.0 | 0.9 | Precise, reliable |\n\n### Rules\n\n- Temperature 0 for tasks requiring consistency and correctness\n- Higher temperature for creative tasks\n- Top-P rarely needs tuning (keep at 0.9-1.0)\n- Do not use both high temperature AND low top-p (contradictory)\n\n---\n\n## Evaluation Metrics\n\n### Automated Metrics\n\n| Metric | Measures | Use For |\n|--------|---------|---------|\n| Exact Match | Output equals expected | Classification, extraction |\n| F1 Score | Precision + recall balance | Multi-label tasks |\n| BLEU/ROUGE | N-gram overlap | Summarization, translation |\n| JSON validity | Parseable structured output | Structured generation |\n| Regex match | Output matches pattern | Format compliance |\n\n### Human Evaluation Dimensions\n\n| Dimension | Scale | Description |\n|-----------|-------|------------|\n| Accuracy | 1-5 | Factual correctness |\n| Relevance | 1-5 | Addresses the actual question |\n| Coherence | 1-5 | Logical flow and structure |\n| Completeness | 1-5 | Covers all required aspects |\n| Tone | 1-5 | Matches desired voice |\n| Conciseness | 1-5 | No unnecessary content |\n\n### Evaluation Dataset Requirements\n\n- Minimum 50 examples for statistical significance\n- Cover all input categories proportionally\n- Include edge cases (10-20% of dataset)\n- Gold labels reviewed by 2+ evaluators\n- Version-controlled alongside prompts\n\n---\n\n## A/B Testing Process\n\n1. Define hypothesis: \"Prompt B will improve [metric] by [amount]\"\n2. Hold all variables constant except the prompt change\n3. Run both variants on the same evaluation set\n4. Calculate metric differences with confidence intervals\n5. Require statistical significance (p < 0.05) before adopting\n\n### What to A/B Test\n\n| Variable | Expected Impact |\n|----------|----------------|\n| Instruction phrasing (imperative vs descriptive) | Moderate |\n| Number of few-shot examples | Moderate |\n| Example ordering | Low-moderate |\n| CoT presence/absence | High for reasoning tasks |\n| Output format specification | High for structured output |\n| Constraint placement (beginning vs end) | Low |\n\n---\n\n## Prompt Versioning\n\n### Version File Format\n\n```yaml\nid: classify-sentiment\nversion: 2.1\nmodel: claude-sonnet-4-20250514\ntemperature: 0.0\ncreated: 2025-03-01\nauthor: team\nchangelog: \"Added edge case examples for sarcasm detection\"\nmetrics:\n accuracy: 0.94\n f1: 0.92\n eval_dataset: sentiment-eval-v3\nsystem_prompt: |\n You are a sentiment classifier...\nexamples:\n - input: \"...\"\n output: \"...\"\n```\n\n### Versioning Rules\n\n- Semantic versioning: major.minor (major = behavior change, minor = refinement)\n- Every version includes evaluation metrics\n- Link to evaluation dataset version\n- Document what changed and why\n- Keep previous versions for rollback\n\n---\n\n## Anti-Patterns / Common Mistakes\n\n| Anti-Pattern | Why It Is Wrong | Correct Approach |\n|-------------|----------------|-----------------|\n| Vague instructions (\"be helpful\") | Unreliable, inconsistent output | Specific instructions with examples |\n| Contradictory constraints | Model cannot satisfy both | Review for consistency |\n| Examples that do not match task | Confuses the model | Examples must reflect real use |\n| Over-engineering simple tasks | Wasted tokens, slower | Match prompt complexity to task complexity |\n| No evaluation framework | Guessing at quality | Define metrics before iterating |\n| Optimizing for single example | Overfitting to one case | Optimize for the distribution |\n| Assuming cross-model portability | Different models need different prompts | Test on target model |\n| Skipping version control | Cannot rollback or compare | Version every prompt with metrics |\n\n---\n\n## Integration Points\n\n| Skill | Relationship |\n|-------|-------------|\n| `llm-as-judge` | LLM-as-judge evaluates prompt output quality |\n| `acceptance-testing` | Prompt evaluation datasets serve as acceptance tests |\n| `testing-strategy` | Prompt testing follows the evaluation methodology |\n| `senior-data-scientist` | Statistical testing validates A/B results |\n| `code-review` | Prompt changes reviewed like code changes |\n| `clean-code` | Prompt readability follows clean code naming principles |\n\n---\n\n## Skill Type\n\n**FLEXIBLE** — Adapt prompting techniques to the specific model, task, and quality requirements. The evaluation and versioning practices are strongly recommended but can be scaled to project size. Always version production prompts.",
"cost": {
"context_tokens": 2747
}
}
Fetch it by URL: GET /api/v1/registry/pixel-process-ug-superkit-agents-senior-prompt-engineer/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.