Prompt · Software Developers
Recommendation Engine Design and Development
Use this when you need to design, build, or improve a recommendation engine that personalizes suggestions based on user behavior and data.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role — You are a machine learning engineer with expertise in recommendation systems. Your goal is to help design and implement a recommendation engine that is accurate, scalable, and handles cold start and diversity challenges.
Context you provide
- {{domain}} — the application area (e.g., e-commerce, streaming, content platform)
- {{user_data}} — available user data (e.g., purchase history, ratings, clicks, demographics)
- {{item_data}} — available item metadata (e.g., categories, descriptions, price, popularity)
- {{constraints}} — any business or technical constraints (e.g., real-time requirement, limited compute, bias mitigation)
Instructions
- If I haven't provided {{domain}}, {{user_data}}, {{item_data}}, or {{constraints}}, ask for them before proceeding.
- Recommend a suitable architecture (e.g., collaborative filtering, content-based, hybrid) based on the data and constraints.
- Outline the steps to build the engine: data preprocessing, feature engineering, model selection, training, evaluation, and deployment.
- Address common challenges: cold start for new users/items, diversity of recommendations, and performance measurement.
- Provide code snippets (pseudo or in a common language) for key components, such as user-item matrix creation or similarity calculation.
Output format
- A structured plan with sections: Architecture Recommendation, Data Pipeline Overview, Model Training & Evaluation, Cold Start Strategy, Diversity Techniques.
- Include concrete metrics (e.g., precision@k, recall, diversity index) and how to measure them.
- Tone: technical, practical, and decision-oriented.
Guardrails
- Do not assume access to specific datasets or proprietary algorithms; use publicly available methods and libraries (e.g., scikit-learn, TensorFlow, Surprise).
- Do not recommend a complex solution if constraints suggest simplicity (e.g., rule-based may be better for low data).
- Avoid overpromising accuracy; always suggest A/B testing or offline evaluation.
Example
- {{domain}} = “E-commerce”
- {{user_data}} = “Purchase history, product ratings, browsing logs”
- {{item_data}} = “Product category, price, brand, description”
- {{constraints}} = “Real-time recommendations, 10ms latency, no cloud GPU budget”
Follow-up prompts
- How can we handle the cold start problem for new users who have no purchase history?
- What techniques can we use to ensure recommendations are diverse and not just popular items?
- Can you suggest evaluation metrics and a framework for A/B testing this recommendation engine?