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.

Example Answer

I would keep a simple shopping-list prompt explicit about goal, constraints, and output format. For example:

You are a helpful meal-planning assistant. Create a shopping list for 3 dinners for 2 adults. Group items by category such as produce, protein, dairy, pantry, and spices. Avoid duplicates and show quantities when possible.

This works because it gives the model enough structure to avoid a rambling answer. The category grouping and duplicate-removal instruction are especially useful because they turn a generic completion into something a user could actually take to the store.

What I always try to avoid is giving a process answer that sounds clean in theory but falls apart once the data, users, or production constraints get messy.

Common Poor Answer

A weak answer is "make me a shopping list." That leaves out quantity, purpose, grouping, and any signal about what a useful output should look like.

Related Questions