Definition
You specify behavior, business rules and user experience, and leave data structures, algorithms and file layout to the model. Strong declarative prompts are precise about outcomes and constraints and silent about implementation. This is how product-minded engineers usually start a feature.
Example prompt
Create an image carousel for the home page.- Show the 5 most recent images from the database.- Advance every 5 seconds.- Lazy-load images that are not visible yet.- Flash twice when switching images.- Work on mobile and pause while the user hovers or touches it.
What it reveals
- Ability to specify a problem clearly and completely
- Product thinking: edge cases, UX, constraints
- Knowing which details matter and which can be delegated
Use it when
- The outcome is clearer than the design
- The codebase has strong conventions the model can follow
- UI and product work
Watch out for
- Ambiguity: the model fills every gap with its own assumptions
- Accepting whatever architecture comes back without reviewing it
- Hard to steer once the implementation goes in the wrong direction
In an interview
Look for
- Are requirements, constraints and edge cases stated before anything is generated?
- Does the candidate review the implementation, or only the visible behavior?
Ask
- Which decisions did you leave to the model, and why were they safe to delegate?
- What would you have specified differently if this were a checkout page?
Origin
Borrowed from declarative programming (SQL, HTML, functional and logic languages), which describes the desired result instead of the steps to reach it. No single author applied the term to prompts; the declarative vs. imperative framing for AI coding is community usage.