Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we add the %prompt-generator% built-in role? #832

Closed
sigoden opened this issue Sep 4, 2024 · 8 comments · Fixed by #843
Closed

Should we add the %prompt-generator% built-in role? #832

sigoden opened this issue Sep 4, 2024 · 8 comments · Fixed by #843
Labels
enhancement New feature or request

Comments

@sigoden
Copy link
Owner

sigoden commented Sep 4, 2024

A %prompt-generator% role helps us easily create a prompt/role.

Here’s the candidate prompt content for the role.

As a professional Prompt Engineer, your role is to create effective and innovative prompts for interacting with AI models. Your core skills include:

1. **CO-STAR Framework Application**: Utilize the CO-STAR framework to build efficient prompts, ensuring effective communication with large language models.
2. **Contextual Awareness**: Construct prompts that adapt to complex conversation contexts, ensuring relevant and coherent responses.
3. **Chain-of-Thought Prompting**: Create prompts that elicit AI models to demonstrate their reasoning process, enhancing the transparency and accuracy of answers.
4. **Zero-shot Learning**: Design prompts that enable AI models to perform specific tasks without requiring examples, reducing dependence on training data.
5. **Few-shot Learning**: Guide AI models to quickly learn and execute new tasks through a few examples.

Your output format should include:
- **Context**: Provide comprehensive background information for the task to ensure the AI understands the specific scenario and offers relevant feedback.
- **Objective**: Clearly define the task objective, guiding the AI to focus on achieving specific goals.
- **Style**: Specify writing styles according to requirements, such as imitating a particular person or industry expert.
- **Tone**: Set an appropriate emotional tone to ensure the AI's response aligns with the expected emotional context.
- **Audience**: Tailor AI responses for a specific audience, ensuring content appropriateness and ease of understanding.
- **Response**: Specify output formats for easy execution of downstream tasks, such as lists, JSON, or professional reports.
- **Workflow**: Instruct the AI on how to step-by-step complete tasks, clarifying inputs, outputs, and specific actions for each step.
- **Examples**: Show a case of input and output that fits the scenario.

Your workflow should be:
1. **Analyze User Input**: Extract key information from user requests to determine design objectives.
2. **Conceive New Prompts**: Based on user needs, create prompts that meet requirements, with each part being professional and detailed.
3. **Markdown Syntax Output**: Use Markdown syntax and code block format to output the newly generated and optimized prompts.

Questions:

  • Is it necessary to add this built-in role?
  • Is there a better name than %prompt-generator%?
  • How can the prompt be optimized further?

Any suggestions or feedback is helpful.

@sigoden sigoden added the enhancement New feature or request label Sep 4, 2024
@milanglacier
Copy link

I feel this is definitely helpful, but the name can be more succinct. For example %prompter% should be sufficient, this is consistent with other succinct Builtin names, like %shell% %code%

@fn5
Copy link

fn5 commented Sep 4, 2024

I really like the candidate prompt. A final workflow item could make it clear whether further user inputs are considered refinements. By default, no context would be given back (as they would not be in a session)

Wrote this comment out a few times as a draft - .prompt generate could be an option.
If it is a builtin I assume the user process would be:

1. .role prompt_generator
2. User Input eg "Help me learn Spanish"
3. Output would be the generated prompt
4. User would need to copy the output?
5. .role teach_spanish
6. .prompt *paste from clipboard*
7. .save role

I feel like this could be optimised by something like .prompt generate which appears to follow logic of REPL

  1. .prompt generate
  2. User Input eg "Help me learn Spanish"
  3. Output would be the generated prompt
  4. Interactive "Use in temporary session (Enter) / Discard(n) / Respond to Prompt to refine(input+Enter)
  5. .save role

@sigoden
Copy link
Owner Author

sigoden commented Sep 4, 2024

@milanglacier

%prompter% looks good, If there are no better options, then We will choose it.

@fn5

The minimal steps to create a role are as follows:

> .role %prompter% <help me ...>
> .copy
> .prompt *paste from clipboard*
... Test and Improve...
> .save role

It's not as complicated as you think. The .prompt is related to --prompt and cannot be assigned any other meaning.

@justinlovinger
Copy link

Do we need the "er"? What about just %prompt%? That seems more in line with the current built-in roles.

@sigoden
Copy link
Owner Author

sigoden commented Sep 5, 2024

@justinlovinger

The role does not prompt something; it generates prompt, so %prompt% is inappropriate.

@justinlovinger
Copy link

@justinlovinger

The role does not prompt something; it generates prompt, so %prompt% is inappropriate.

I was thinking in terms of, "The %shell% role generates commands for a shell, the %code% role generates code, and the %prompt% role generates prompts".

None of the built-in roles are actually phrased in terms of a role. %shell% and %code% describe what they produce, %explain-code% describes an action, and %functions% describes what it uses.

@sigoden
Copy link
Owner Author

sigoden commented Sep 7, 2024

To settle the dispute regarding the name, we am prepared to use %create-prompt%. we recommend adopting a verb-noun format for role names.

@cboecking
Copy link

Sorry for being late to the game.

+1 for verb-noun

One thing to consider is 'noun-verb'. The reason is that all nouns would appear together if you were to list commands alphabetically.

Example:
prompt-create
prompt-deploy
prompt-remove
role-create
role-deploy
role-remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants