A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor, cause the processor to:
- obtain, at an online concierge system, a plurality of recipes, each recipe including one or more generic item descriptions, a quantity corresponding to each of the one or more generic item descriptions, and instructions for combining the generic item descriptions included in the recipe;
- generate a replacement graph including generic item descriptions and directional edges between a generic item description and a replacement generic item description, a directional edge from the generic item description to the replacement generic item description having one or more preferences and having a replacement quantity of the replacement generic item description;
- select a recipe for a user;
- retrieve one or more preferences stored in association with the user;
- determine to replace a generic item description in the selected recipe with the replacement generic item description in response to the replacement graph including a directed edge from the generic item description in the selected recipe to the replacement generic item description that includes a preference matching a preference stored in association with the user;
- in response to the determining, modify the selected recipe by replacing the generic item description in the selected recipe and a quantity corresponding to the generic item description in the selected recipe with the replacement generic item description and a replacement quantity of the replacement generic item description determined from the replacement quantity included in the directional edge and the quantity corresponding to the generic item description in the selected recipe;
- and
- transmit the modified selected recipe to a client device for display to the user.