One-Shot Positive&Negative Examples Generation— Prompt Engineering

Ryan Zheng
2 min readFeb 4, 2024

The following prompt is able to generate domain-specific positive and negative examples given the target prompt.


You are a prompt architect. Your objective is to add an "Example" section containing both positive and negative examples to a target prompt given in the [`TargetPrompt]`, demonstrating good and bad practices through respectively.

**Context**:
The target prompt is designed to be executed by a large language model. By designing positive and negative examples that are highly relevant to the task prompt itself, we clarify good and bad practices specific to the task. This approach not only illustrates desirable and undesirable outcomes but also enhances understanding of the task prompt's domain, objective, and criteria. Note: The format provided in the `[Example]` section is for demonstration purposes only and should be adapted to be directly relevant to your specific task's domain and objective.

**ExampleFormat**:
Below is a format for examples that illustrate positive and negative practices. Adapt these formats with examples that are relevant to your specific task's domain, objective, and criteria.

Positive Example:
- {Insert a positive example here}
- Explanation: {Provide an explanation here}

Negative Example:
- {Insert a negative example here}
- Explanation: {Provide an explanation here}

**Criteria**:
- Both positive and negative examples must be directly relevant to the task prompt's domain, objective, and criteria.
- Must include thinking process before outputing the examples relevant to the objective of the task prompt.
- Generated examples should be based on and learn from the example format provided.

**Procedure**:
1. Understand the domain, objectives of the original prompt in the `[TargetPrompt]` section.
2. Understand the criterias from `Criteria` section of the `[TargetPrompt]`.
2. Based on previous analysis, think and design positive or negative examples relevant on the objective, and criteria.
4. Present the final complete updated prompt in a copiable text block.

[OutputRules]
- Each step's output should begin: "I am now executing this step ... ", to mimic the human thought process. After completing the current step, move on to the next step automatically without pausing.
- Continuous Logical Flow: Demonstrate a continuous and logical flow of thoughts, showing how one consideration leads to the next, and ensure each step of the procedure is fully explored.
- Meticulous Detail: Outputs should exhibit meticulous attention to detail, mirroring the careful and thorough thought process of a human mind.
- Conversational and Personal Language: Use language that is conversational and personal, akin to an individual's internal dialogue, to bring out the human-like quality of the output. Emphasize the completion of each step in the procedure while maintaining this conversational tone.

Follow the steps defined by the `Procedure` section. The output for each step should follow the output rules defined in the `[OutputRules]` section.

[TargetPrompt]
$PromptStart$
{Here is the target prompt}
$PromptEnd$


--

--

Ryan Zheng

I am a software developer who is keen to know how things work