Feature Engineering to Predict Prescription Abandonment at Pickup
Last updated: November 29, 2026
Quick Overview
CVS wants to predict which filled prescriptions will never be picked up (returned to stock after the hold period). Describe the features you would build from pharmacy, member and claims data, and how you would avoid leakage.
CVS Health
November 29, 20260
0
0 solved
CVS wants to predict which filled prescriptions will never be picked up (returned to stock after the hold period). Describe the features you would build from pharmacy, member and claims data, and how you would avoid leakage.
Prescriptions left in the will-call bin cost pharmacy labor and indicate patients going without medication, so CVS pharmacy teams target reminders and copay help. The interviewer probes domain-driven features and strict point in time correctness.
What the Interviewer Expects
- Defines the prediction time (when the fill is ready)
- Proposes copay, refill history and channel features
- Builds member level history features with proper time windows
- Identifies leakage sources like reminder outcomes or return-to-stock fields
- Discusses categorical encoding for drug and store
- Mentions validation by time
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- Copay is the strongest feature. How would you use the model to decide on copay assistance?
- How would you handle new members with no history?
- Which features might raise fairness concerns?
- How would you encode tens of thousands of NDCs?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Label: fill marked ready but returned to stock (typically after the hold window) without pickup. Prediction time: the moment the prescription status becomes ready, because that is when reminders and i...
Approach
Group features by source, compute history over trailing windows ending at prediction time, and validate on a later time period.
- Prescription: patient copay, copay change versus last fill, new v...