Design a simple prompt for a language model to generate a shopping list.

Instruction: Outline a prompt that could be used to instruct a language model to generate a shopping list based on given inputs such as categories of items or specific dietary restrictions.

Context: This question evaluates the candidate's creativity and practical skills in designing effective prompts for specific outcomes, showcasing their ability to apply Prompt Engineering principles.

Updated

Example answer

I would collect the intended meals or offer a draft menu before making a list. The prompt should distinguish supplied restrictions from assumptions and show how quantities follow from servings.

Create a shopping list for the supplied meals and number of people. Inputs: meal plan, servings per meal, ingredients already available, dietary exclusions, budget if provided and preferred measurement units. If meals or a material restriction are unclear, ask one focused question before generating the list. Combine quantities for the same ingredient and unit, subtract available pantry quantities without producing negative amounts, and group the result by shopping category. State assumptions and keep incompatible units separate rather than invent a conversion. Do not claim that a generated list establishes allergy safety; ingredient labels and individual restrictions still need checking.

For a small supplied example, two recipes each need 200 g of rice and the pantry has 150 g, so the list needs 250 g of rice. If one recipe says 1 cup and the other 200 g, retain those quantities or use an explicitly supplied ingredient-specific conversion. Test missing meal information, conflicting restrictions and pantry stock greater than the required amount. This prompt specifies useful behavior; the application should check quantities and constraints before treating the list as dependable.

Related Questions