Here's a comprehensive template prompt designed to elicit a production-grade ML workflow from an LLM, structured for technical precision and completeness:
Template Prompt for ML Development Workflow Generation
You are a machine learning engineering expert tasked with creating a comprehensive, production-ready ML development workflow. Given a specific machine learning task described in [TASK_DESCRIPTION], generate an end-to-end workflow following industry best practices and referencing verified technical sources published after 2022.
Structure your response using the following mandatory sections and formatting guidelines:
1. Problem Definition & Scope
- Business objective vs. technical objective alignment
- Success metrics (both ML and business KPIs)
- Constraints: latency requirements, computational budget, data privacy regulations
- Reference: [Relevant Google AI Blog on problem formulation]
2. Data Strategy
2.1 Data Collection & Curation
- Data sources selection criteria (internal/external APIs, open datasets)
- Schema design and validation process
- Data versioning strategy (DVC/MLflow implementation)
- Reference: [TensorFlow Data Validation documentation]
2.2 Data Preprocessing
- Missing values handling (interpolation vs. imputation)
- Feature encoding strategies (target encoding caveats)
- Temporal data handling (if applicable)
- Reference: [Scikit-learn preprocessing best practices]
3. Model Development Framework
3.1 Algorithm Selection
- Candidate algorithms matrix (include classical ML and DL options)
- Selection criteria: interpretability vs. accuracy tradeoff
- Reference: [Provenance analysis from arXiv:23XX papers]
3.2 Feature Engineering Pipeline
- Automated feature generation tools (Featuretools implementation)
- Dimensionality reduction strategy (PCA vs. autoencoders)
- Feature store implementation pattern
- Reference: [Uber's feature store architecture]
4. Training Protocol
- Hardware configuration (GPU/TPU strategy)
- Hyperparameter search methodology (Bayesian vs. grid search)
- Early stopping criteria and patience parameters
- Reproducibility measures (random seeds, containerization)
- Reference: [Weights & Biases experiment tracking]
5. Evaluation & Validation
- Cross-validation strategy (time-aware splits if applicable)
- Metric selection rationale (precision-recall vs. ROC-AUC)
- Error analysis framework (confusion matrix thresholds)
- Reference: [MLCommons evaluation standards]
6. Deployment Architecture
- Inference serving pattern (REST/gRPC API design)
- Model packaging (Docker container specification)
- Canary deployment strategy
- Reference: [TensorFlow Serving production patterns]
7. Monitoring & Maintenance
- Data drift detection (K-L divergence thresholds)
- Model performance decay monitoring
- Automated retraining triggers
- Reference: [AWS SageMaker Model Monitor]
8. Documentation & Collaboration
- API documentation standard (Swagger/OpenAPI)
- Experiment tracking (MLflow tracking server)
- CI/CD pipeline for ML (GitHub Actions + Great Expectations)
- Reference: [MLOps maturity framework]
9. Ethical Considerations
- Bias detection pipeline (Fairlearn implementation)
- Model explainability (SHAP/LIME integration)
- Compliance checklist (GDPR/CCPA)
FORMAT SPECIFICATIONS:
- Use markdown headers with numbered sections
- Indicate implementation priority with [P0/P1/P2] tags
- Include code snippet placeholders where applicable
- Add version control markers (git branch naming)
- Specify tool versions (Python 3.10, PyTorch 2.0+)
REFERENCE REQUIREMENTS:
- Cite at least 3 academic sources (arXiv IDs)
- Include 2+ industry technical blogs (Google AI, Meta AI)
- Link to relevant framework documentation pages
- Add 1+ MLOps platform references (Vertex AI, Sagemaker)
Provide this workflow structure within 1500-2000 words, ensuring each technical decision point includes:
- Implementation steps
- Tooling recommendation
- Validation method
- Risk mitigation strategy
</WORKFLOW_TEMPLATE>
Usage Instructions:
When providing a specific ML task (e.g., "build a time-series anomaly detection system for industrial sensors"), insert it into [TASK_DESCRIPTION] and execute this template. The LLM will generate a fully actionable workflow with technical depth suitable for immediate implementation by engineering teams.
Key Features:
- Forces citation of recent (2022+) technical sources
- Mandates production-grade tooling at each stage
- Enforces structured documentation patterns
- Requires explicit risk mitigation strategies
- Incorporates modern MLOps practices
- Distinguishes implementation priorities
This template ensures no stage is omitted while maintaining strict adherence to current industry standards and verifiable technical knowledge.