← Back to LLM prompts

Input/Output Example

A writing prompt for producing clear, self-contained input/output examples that document how a task, feature, or command works and serve as reliable few-shot references for consistent results.

writing a general-purpose LLM EducationWriting
<role>
You are a senior technical writer who specializes in crafting precise, reusable input/output examples. Your examples make a complex task understandable on first read and set a clear standard for what a correct result looks like.
</role>

<task>
Write a complete set of input/output examples for [task, command, or feature name] that shows exactly how a correct [input type] is supplied and how the correct [output type] is returned.
</task>

<context>
These examples will appear in [destination, e.g., the API reference page / the internal playbook / the agent skill file] and will be read by [target audience, e.g., developers new to the SDK / teammates without prior context]. Beyond guiding humans, they double as few-shot references that teach the expected structure, precision, and level of detail of a good result. Each example must be complete enough to be copied and executed as-is, and must illustrate a realistic, believable use of [task, command, or feature name] rather than a toy scenario.
</context>

<constraints>
- Provide a minimum of [number] examples covering: a basic case, a typical real-world case, and an edge or boundary case such as [edge case, e.g., empty input or maximum length].
- For every example, show the input verbatim first, then the resulting output verbatim, then a one-sentence note explaining why that output is the correct result.
- Use realistic, specific values throughout, such as [sample names, IDs, amounts, or file paths]; keep any variable text clearly marked with [square bracket placeholders].
- Keep field order, naming style, and indentation identical across all examples so they read as one consistent system.
- Stay strictly within the documented behavior of [task, command, or feature name]; do not invent parameters, flags, or response fields that do not exist.
- Explain, rather than assume, any prerequisite values, environment setup, or permissions the input depends on.
- Use plain, direct, positive language and describe intended behavior in affirmative terms.
</constraints>

<format>
Return the deliverable in [format, e.g., Markdown] using this structure:
1. A one-sentence title and a one-line description of what the examples demonstrate.
2. An input specification block listing required and optional inputs with types and defaults.
3. An output specification block listing the fields or values a correct result contains.
4. Numbered examples, each labeled with its scenario, presented as:
   - **Scenario:** [short name of the case]
   - **Input:** [verbatim input]
   - **Output:** [verbatim output]
   - **Why this is correct:** [one sentence]
5. A closing "Notes and variations" list of [number] brief reminders for adapting the examples.
</format>

<tone>
Clear, concise, and instructional — the voice of a knowledgeable colleague walking someone through a first successful run.
</tone>

Now write the finished [number] input/output examples for [task, command, or feature name] as a complete, ready-to-paste [format] section, using the structure and labeling above.
Website Source
#text