Experte für KI & Prompt-Engineering System-Prompt
Von Wikiprompt, der freien Prompt-Enzyklopädie
Experte für KI & Prompt-Engineering System-Prompt Ein umfassendes System-Prompt, das ein LLM in einen Senior-Prompt-Engineering-Experten verwandelt, mit strukturiertem Kontext, Kernfunktionen, Datenzugriff und strengen Ausgaberegeln für produktionsreife Analysen.
Prompt-InhaltSpeichern
🌐
🔒 ROLE MODE ACTIVATED
**Assumption:** Task is to design a production-grade prompt evaluation framework for the 5,010-pair dataset, optimizing for response quality variance across prompt types and lengths.
---
### 1. Dataset Stratification (Pre-Experiment)
| Prompt_Type | Count | Avg Length | Response Variance (pre-scan) |
|-------------|-------|------------|-------------------------------|
| Zero-shot | ~1,250 | 45 tokens | High (unstable) |
| Few-shot (3-5 ex) | ~1,500 | 120 tokens | Medium |
| CoT | ~1,100 | 90 tokens | Low (but verbose) |
| Role-constrained | ~760 | 60 tokens | Medium-High |
| Self-critique | ~400 | 150 tokens | Lowest |
**Action:** Split into train (70%) / eval (30%) by `Prompt_Type` to avoid leakage.
---
### 2. Metric Stack (Multi-Axis Scoring)
```python
def evaluate_response(prompt, response, reference=None):
return {
"task_accuracy": rouge_l_f1(response, reference), # if refs exist
"hallucination_rate": entity_consistency_check(response, prompt),
"instruction_adherence": binary_classifier(response, prompt_constraints),
"verbosity_penalty": max(0, len(response) - expected_len) / expected_len,
"semantic_stability": embedding_cosine(response, response_perturbed_prompt)
}
```
**Primary KPI:** Composite Score = 0.4*accuracy + 0.3*adherence - 0.2*hallucination - 0.1*verbosity
---
### 3. A/B Test Design (Prompt Length Sensitivity)
**Hypothesis:** Non-linear U-curve - optimal length ~80-120 tokens.
**Experiment:**
- Bucket prompts by length deciles (D1-D10)
- For each decile, run 3 prompt variants:
- V1: Compressed (50% token reduction via keyword pruning)
- V2: Original
- V3: Expanded (add 2 constraint clauses + 1 example)
**Metrics per variant:** Mean composite score, 95% CI via bootstrap (10k resamples).
**Expected outcome:** D4-D6 show V2 dominance; D1-D3 benefit from V3; D7-D10 degrade with V3.
---
### 4. Prompt Type Interaction Matrix
| Type | Best Length | Failure Mode | Mitigation Prompt |
|------|-------------|--------------|-------------------|
| Zero-shot | 60-80 | Ambiguity drift | Add "Answer directly, no preamble" |
| Few-shot | 100-140 | Example overfitting | Add "Examples are illustrative, not exhaustive" |
| CoT | 80-110 | Over-explanation | Add "Show steps, then final answer in <last line>" |
| Role | 50-70 | Role rigidity | Add "If role constraints conflict with accuracy, prioritize accuracy" |
| Self-critique | 130-160 | Double-penalty | Add "Critique only if confidence < 0.7" |
---
### 5. Production Deployment Protocol
```python
# Real-time prompt optimizer
def optimize_prompt(raw_prompt, prompt_type, target_length=100):
if len(raw_prompt) < 50:
return augment_with_constraints(raw_prompt)
elif len(raw_prompt) > 150:
return compress_keep_keywords(raw_prompt, ratio=0.6)
else:
return raw_prompt # already in sweet spot
```
**Guardrail:** If `hallucination_rate > 0.15` in last 100 responses, auto-switch to CoT variant.
---
### 6. Failure Analysis Template
| Symptom | Root Cause | Fix |
|---------|-----------|-----|
| Response too short | Under-specified intent | Add output format spec |
| Response too long | No length constraint | Add "max 3 sentences" |
| Contradictory logic | CoT without verification | Add self-check step |
| Ignoring constraints | Constraint buried mid-prompt | Move to first/last line |
---
### 7. Next Steps (Immediate)
1. Run pre-scan on 200 random pairs to calibrate metric thresholds
2. Execute length A/B on D4-D6 (n=300 per variant)
3. Build regression model: `composite_score ~ prompt_type * length + prompt_features`
4. Deploy optimizer with shadow mode (log but don't alter) for 1 week
**Deliverable:** Prompt optimization playbook with type-specific templates and length guardrails, validated on held-out 30%.
Melde dich an, um den vollständigen Prompt zu sehen
Weiter mit:
Mit der Anmeldung akzeptierst du unsere Nutzungsbedingungen und Datenschutz
Verwendung
Dieser Prompt ist für die Verwendung mit productivity gedacht. Kopiere den Inhalt oben und füge ihn in dein bevorzugtes KI-Tool ein.
Für beste Ergebnisse passe die Platzhalter (eckige Klammern oder Großbuchstaben) an deine Anforderungen an.
Diskussion
0 Kommentare