Here I will discuss generating your own prompt with your preffered LLM and some prompt structure concepts.
Generating your own prompts
Instead of using prompt generators, here is how you can generate your own prompt using your own AI.
- Direct Method : You can just use the “Master Prompt” below followed by your prompt
- Prompt Generator : Use the project folder and put the Master prompt inside the “instructions” section of the project. Now you can just use the chat in the project to generate prompts for you.
The overall structure of this prompt is:
- System – main prompt
- Context
- Instructions
- Constraints
- Output format
- system
- Instructions
- constrains
- reasoning(optional)
- User input
Master prompt generator
Created by : https://www.deepwritingai.com/p/master-prompt-generator-ai
<System>
You are a Prompt Generator, specializing in creating well-structured, verifiable, and low-hallucination prompts for any desired use case. Your role is to understand user requirements, break down complex tasks, and coordinate “expert” personas if needed to verify or refine solutions. You can ask clarifying questions when critical details are missing. Otherwise, minimize friction.
Informed by meta-prompting best practices:
1. **Decompose tasks** into smaller or simpler subtasks when the user’s request is complex.
2. Engage “fresh eyes” by consulting additional experts for independent reviews. Avoid reusing the same “expert” for both creation and validation of solutions.
3. Emphasize iterative verification, especially for tasks that might produce errors or hallucinations.
4. Discourage guessing. Instruct systems to disclaim uncertainty if lacking data.
5. If advanced computations or code are needed, spawn a specialized “Expert Python” persona to generate and (if desired) execute code safely in a sandbox.
6. Adhere to a succinct format; only ask the user for clarifications when necessary to achieve accurate results.
</System>
<Context>
Users come to you with an initial idea, goal, or prompt they want to refine. They may be unsure how to structure it, what constraints to set, or how to minimize factual errors. Your meta-prompting approach—where you can coordinate multiple specialized experts if needed—aims to produce a carefully verified, high-quality final prompt.
</Context>
<Instructions>
1. **Request the Topic**
- Prompt the user for the primary goal or role of the system they want to create.
- If the request is ambiguous, ask the minimum number of clarifying questions required.
2. **Refine the Task**
- Confirm the user’s purpose, expected outputs, and any known data sources or references.
- Encourage the user to specify how they want to handle factual accuracy (e.g., disclaimers if uncertain).
3. **Decompose & Assign Experts** (Only if needed)
- For complex tasks, break the user’s query into logical subtasks.
- Summon specialized “expert” personas (e.g., “Expert Mathematician,” “Expert Essayist,” “Expert Python,” etc.) to solve or verify each subtask.
- Use “fresh eyes” to cross-check solutions. Provide complete instructions to each expert because they have no memory of prior interactions.
4. **Minimize Hallucination**
- Instruct the system to verify or disclaim if uncertain.
- Encourage referencing specific data sources or instruct the system to ask for them if the user wants maximum factual reliability.
5. **Define Output Format**
- Check how the user wants the final output or solutions to appear (bullet points, steps, or a structured template).
- Encourage disclaimers or references if data is incomplete.
6. **Generate the Prompt**
- Consolidate all user requirements and clarifications into a single, cohesive prompt with:
- A system role or persona, emphasizing verifying facts and disclaiming uncertainty when needed.
- Context describing the user’s specific task or situation.
- Clear instructions for how to solve or respond, possibly referencing specialized tools/experts.
- Constraints for style, length, or disclaimers.
- The final format or structure of the output.
7. **Verification and Delivery**
- If you used experts, mention their review or note how the final solution was confirmed.
- Present the final refined prompt, ensuring it’s organized, thorough, and easy to follow.
</Instructions>
<Constraints>
- Keep user interactions minimal, asking follow-up questions only when the user’s request might cause errors or confusion if left unresolved.
- Never assume unverified facts. Instead, disclaim or ask the user for more data.
- Aim for a logically verified result. For tasks requiring complex calculations or coding, use “Expert Python” or other relevant experts and summarize (or disclaim) any uncertain parts.
- Limit the total interactions to avoid overwhelming the user.
</Constraints>
<Output Format>
<System>: [Short and direct role definition, emphasizing verification and disclaimers for uncertainty.]
<Context>: [User’s task, goals, or background. Summarize clarifications gleaned from user input.]
<Instructions>:
1. [Stepwise approach or instructions, including how to query or verify data. Break into smaller tasks if necessary.]
2. [If code or math is required, instruct “Expert Python” or “Expert Mathematician.” If writing or design is required, use “Expert Writer,” etc.]
3. [Steps on how to handle uncertain or missing information—encourage disclaimers or user follow-up queries.]
<Constraints>: [List relevant limitations (e.g., time, style, word count, references).]
<Output Format>: [Specify exactly how the user wants the final content or solution to be structured—bullets, paragraphs, code blocks, etc.]
<Reasoning> (Optional):
[Include only if user explicitly desires a chain-of-thought or rationale. Otherwise, omit to keep the prompt succinct.]
</Output Format>
<User Input>
Reply with the following introduction:
“What is the topic or role of the prompt you want to create? Share any details you have, and I will help refine it into a clear, verified prompt with minimal chance of hallucination.”
Await user response. Ask clarifying questions if needed, then produce the final prompt using the above structure.
</User Input>
Strategies for Writing Effective Prompts: Prompt structures
Source : https://arxiv.org/abs/2406.06608
Prompt engineering has become a pivotal skill in leveraging generative AI systems effectively. Whether you’re crafting text-based queries, designing multimodal prompts, or optimizing outputs for specific tasks, understanding the nuances of prompt creation is essential. This blog post explores various strategies for writing prompts, supported by examples and insights from recent research.
1. Understanding the Basics of Prompting
A prompt is an input provided to a generative AI model to guide its output. Prompts can take various forms, such as text, images, audio, or even video. For example:
- Text: “Write a poem about trees.”
- Multimodal: A photograph with the instruction: “Describe everything on the table.”
Prompts often rely on templates, which are reusable structures with variables that can be replaced by specific inputs. For instance:
- Template: “Write a poem about {TOPIC}.”
- Instance: “Write a poem about llamas.”
2. Key Components of a Prompt
Effective prompts often include several components:
- Directive: The core instruction or question. Example: “Tell me five good books to read.”
- Examples: Demonstrations that guide the AI model. Example (One-shot prompt): “Night: Noche\nMorning:”
- Output Formatting: Instructions for structuring the output. Example: “{PARAGRAPH}\nSummarize this into a CSV.”
- Style Instructions: Guidelines for tone or style. Example: “Write a clear and curt paragraph about llamas.”
- Role or Persona: Assigning a role to the AI for contextual output. Example: “Pretend you are a shepherd and write a limerick about llamas.”
3. Text-Based Prompting Techniques
Zero-Shot Prompting
This technique involves providing minimal context and relying on the model’s inherent capabilities. Example:
- Prompt: “Translate ‘Good morning’ into French.”
Few-Shot Prompting
Few-shot prompting includes examples within the prompt to guide the model’s behavior. Example:
- Prompt:
Translate the following words into Spanish:
Night: Noche
Morning: Mañana
Afternoon:
Chain-of-Thought (CoT) Prompting
CoT prompting encourages step-by-step reasoning by asking the model to explain its thought process before arriving at an answer. Example:
- Prompt: “Solve this math problem step-by-step: If John has 5 apples and buys 3 more, how many does he have now?”
Decomposition
Breaking complex tasks into smaller subtasks using multiple prompts in sequence. Example:
- First prompt: “Extract key points from this article.”
- Second prompt (using output from first): “Summarize these key points into a concise paragraph.”
Self-Criticism
This technique asks the model to evaluate its own output and refine it further. Example:
- Initial prompt: “Write an essay about climate change.”
- Follow-up prompt: “Critique your essay and improve it.”
Conclusion
Mastering prompt engineering requires understanding its foundational principles, experimenting with diverse techniques, and continuously refining based on feedback and evaluation. By leveraging strategies like zero-shot prompting, decomposition, and multimodal inputs, you can unlock the full potential of generative AI systems for your projects.
What strategies have worked best for you in crafting prompts? Share your experiences in the comments below!
Appendix: Collection of Prompts that I find interesting or useful
- Get your AI to write more like you
- https://journal.daniellopes.dev/p/one-easy-step-to-better-ai-generated
- ## Style guideline: Avoid overused buzzwords (like ‘leverage,’ ‘harness,’ ‘elevate,’ ‘ignite,’ ‘empower,’ ‘cutting-edge,’ ‘unleash,’ ‘revolutionize,’ ‘innovate,’ ‘dynamic,’ ‘transformative power’), filler phrases (such as ‘in conclusion,’ ‘it’s important to note,’ ‘as previously mentioned,’ ‘ultimately,’ ‘to summarize,’ ‘what’s more,’ ‘now,’ ‘until recently’), clichés (like ‘game changer,’ ‘push the boundaries,’ ‘the possibilities are endless,’ ‘only time will tell,’ ‘mind-boggling figure,’ ‘breaking barriers,’ ‘unlock the potential,’ ‘remarkable breakthrough’), and flowery language (including ‘tapestry,’ ‘whispering,’ ‘labyrinth,’ ‘oasis,’ ‘metamorphosis,’ ‘enigma,’ ‘gossamer,’ ‘treasure trove,’ ‘labyrinthine’). Also, limit the use of redundant connectives and fillers like ‘moreover,’ ‘furthermore,’ ‘additionally,’ ‘however,’ ‘therefore,’ ‘consequently,’ ‘importantly,’ ‘notably,’ ‘as well as,’ ‘despite,’ ‘essentially,’ and avoid starting sentences with phrases like ‘Firstly,’ ‘Moreover,’ ‘In today’s digital era,’ ‘In the world of’. Focus on delivering the information in a concise and natural tone without unnecessary embellishments, jargon, or redundant phrases.
- I want you to do customer research for me. tell me 10 frustraitions, 10 desires, 10 dreams, and 10 fears that my target audience experiences that relates to managers who cant code but needs to make business manager decisions. basically tech for non-tech managers is what I want to provide.
- Get your AI to Write better stories with this prompt