Rules for organizing, versioning, and testing prompt templates in production applications that use DeepSeek models.
## Prompt Template Management Rules
### Organization
- Store prompt templates in a dedicated directory: /prompts/ or /src/prompts/
- One file per prompt template with a descriptive name
- Use a consistent format: Markdown (.md), Jinja2 (.j2), or Handlebars (.hbs)
- Include metadata in frontmatter: version, model, author, last_tested_date
### Versioning
- Version prompts independently from application code
- Use semantic versioning: major (breaking change), minor (improvement), patch (typo fix)
- Keep a changelog for each prompt template
- A/B test new versions before full rollout
- Maintain a rollback capability to the previous version
### Template Structure
```
---
version: 1.2.0
model: deepseek-chat
temperature: 0.6
max_tokens: 2048
author: team-name
last_tested: 2026-04-01
---
## Role
[Define the AI's role and expertise]
## Context
[Provide relevant background information]
{{context_variable}}
## Task
[Describe exactly what needs to be done]
{{task_description}}
## Output Format
[Specify the exact format expected]
## Constraints
[List any limitations or rules]
```
### Testing
- Create evaluation datasets for each prompt template
- Test with diverse inputs covering edge cases
- Measure quality metrics: accuracy, relevance, format compliance
- Set quality thresholds: template must score >80% on evaluation set
- Run regression tests when updating templates
### Anti-Patterns
- Do not hardcode prompts as string literals in application code
- Do not modify prompts without testing
- Do not use the same prompt for fundamentally different tasks
- Do not include sensitive data in template examplesWorkflows from the Neura Market marketplace related to this DeepSeek resource