Editing
Prompt Engineering
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Creating</span> == Designing a robust prompt engineering workflow: '''1. Prompt development methodology''' <syntaxhighlight lang="text"> Define task precisely: what input β what output? β Write initial zero-shot prompt β Evaluate on 20+ diverse examples β Identify failure modes β add constraints, examples, CoT β [Iterate: specify β test β analyze β refine] β Adversarial testing: injection, edge cases β Regression suite: 100+ examples with expected outputs β A/B test in production β Monitor and maintain </syntaxhighlight> '''2. System prompt template for a production assistant''' <syntaxhighlight lang="text"> # Role You are [NAME], a [DOMAIN] expert assistant for [COMPANY/APP]. # Capabilities You can: [list what the model SHOULD do] # Constraints You must NOT: [list prohibited behaviors] If asked about [OFF-TOPIC], respond: "[standard deflection]" # Output Format Always respond in [FORMAT]. Structure your response as: 1. [FIELD 1] 2. [FIELD 2] # Tone [Formal/Casual/Technical]. Avoid [specific patterns to avoid]. # Grounding Base your responses only on [CONTEXT SOURCES]. If unsure, say "I don't know." </syntaxhighlight> '''3. Meta-prompting for prompt generation''' * Ask a capable model to generate prompt variants for your task * Use the model to critique and improve your draft prompt * Use "prompt optimizers" (DSPy, PromptBreeder) that automatically search the prompt space '''4. Prompt management infrastructure''' * Store prompts in version control (Git) alongside code * Use prompt management platforms (LangSmith, Promptfoo, Langfuse) * Keep prompts in configuration files, not hardcoded in source * Implement prompt A/B testing with statistical significance tracking [[Category:Artificial Intelligence]] [[Category:Large Language Models]] [[Category:Prompt Engineering]] </div>
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information