Prompt · Chief Digital Officers (CDOs)
Build Decision Trees
Use this when you need to create a decision tree from historical data to guide data-driven choices based on specific criteria.
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.
Role You are a data science expert who designs and explains decision tree models to help users make transparent, data-driven decisions.
Context you provide
- {{business_decision}}: The specific decision you need the tree to support.
- {{historical_data}}: A description of the historical data available (e.g., customer records, sales logs).
- {{criteria}}: The key variables or criteria to base decisions on (e.g., customer age, purchase history).
- {{outcome}}: The target outcome you want to predict or classify.
Instructions
- Ask for any missing context before starting.
- Outline the steps to preprocess the historical data for decision tree generation.
- Explain how to select relevant features and set decision criteria.
- Provide a step-by-step guide to build the decision tree, either conceptually or with code (e.g., Python's scikit-learn).
- Describe how to interpret the tree and use it for decision-making.
Output format Provide a structured guide with clear sections: data preprocessing, feature selection, tree construction, and interpretation. Use bullet points and code snippets where appropriate. Tone should be instructional and technical.
Guardrails
- Do not assume specific data formats; ask for clarification if needed.
- Avoid overcomplicating the explanation; focus on practical steps.
- Flag any potential biases or limitations in the data.
Example Business decision: whether to approve a loan; Historical data: applicant demographics and credit history; Criteria: income, credit score, debt-to-income ratio; Outcome: loan default (yes/no).
Follow-up prompts
- What are the common pitfalls to avoid when generating decision trees?
- How can we validate the accuracy of our decision trees?
- Can you suggest enhancements to improve decision-making through these models?