<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Francesco Lucini on Medium]]></title>
        <description><![CDATA[Stories by Francesco Lucini on Medium]]></description>
        <link>https://medium.com/@francesco.lucini.2000?source=rss-4d8547232d3c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qPYg3U7f9vRUr60KVu8cLg@2x.jpeg</url>
            <title>Stories by Francesco Lucini on Medium</title>
            <link>https://medium.com/@francesco.lucini.2000?source=rss-4d8547232d3c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 05:13:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@francesco.lucini.2000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Brompt: an open-source meta-prompt for better AI prompt writing]]></title>
            <link>https://medium.com/@francesco.lucini.2000/open-source-meta-prompt-fd73effec366?source=rss-4d8547232d3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd73effec366</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[writing-prompts]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Francesco Lucini]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 09:43:22 GMT</pubDate>
            <atom:updated>2025-11-27T17:23:52.605Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66B3jMQyCz_uEAATrWyYXA.png" /></figure><h4>A student-to-student guide for getting complex, high-quality results from LLMs</h4><h3>Nutshell</h3><p>Over the past two years of using AI chatbots intensively, I’ve tried to refine the best way to achieve the desired results, particularly for tasks exceeding simple queries like: <em>what can I cook with these ingredients?</em></p><p>I arrived at this meta-prompt, which you can copy and paste into a chat with your favourite chatbot to get more complex and complete prompts ready to be used in other chats.</p><p>Disclaimer: I’m not an expert. I’m just a student who was lucky enough to meet bros in uni who introduced me to meta-prompting. Second, since AI tools are becoming an integral part of our everyday and professional lives, I believe we can’t ignore the importance of understanding how to interact with them. We should help each other learn how to use them. I’m open to comparing methods and findings with anyone who wants to share information or stay in touch.</p><p>You can find out more about how I got here (approach, output structure and research) by continuing to read after this prompt. Alternatively, you can use my <em>brompt</em> directly :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9bqoj1eqPP9JAyC4uUVD1w.gif" /><figcaption>ultra-brief demo</figcaption></figure><h4>Before using</h4><p>AI tools are great accelerators. They can be more efficient (read: <em>work faster</em>) than humans, which is great. But that doesn’t mean they’re always more effective (read: <em>get better results</em>). In fact, they simply speed up in the direction we point them.</p><p>That’s why we have to be very clear and always explain everything, double-check what we get and it’s always a good idea to think twice before blaming the machine. As dad always says:</p><blockquote><em>99% of computer mistakes sit between the keyboard and the chair</em>.</blockquote><p>Finally, keep in mind that this meta-prompt was refined primarily for the latest, most advanced Google and OpenAI LLMs, which lots of students can access for free. That’s why I’m sharing it here and not in a Hugging Face tool with less powerful models.</p><h3>Copy, paste, use</h3><p>Here is the complete brompt. I embedded it as a GitHub Gist to maintain clean formatting and make copying easy. You can copy it directly from below and paste it into a new chat:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/154f352c3e8671668ade9e901cad1ad0/href">https://medium.com/media/154f352c3e8671668ade9e901cad1ad0/href</a></iframe><h3>Approach</h3><p>I’ve read everywhere that prompting is not a perfect science. Perhaps it could be if we knew exactly how LLMs worked. However, since it involves understanding what humans want, I doubt it will ever be. Regarding this difficulty, I found a very <a href="https://dl.acm.org/doi/10.1145/3613904.3642754">interesting article</a> introducing the concept of “gulf of envisioning”, a new challenge conversational interfaces introduce compared to previous interfaces.</p><p>That’s why my approach to prompting has been very hands-on, involving lots of trial and error. Even the sources I found from big tech companies like IBM, Google, Anthropic and OpenAI acknowledge their non-hard-science approach to this practice. I moved between reason and experience, letting the object determine the method, and tried my best to translate these three intuitive principles into practical solutions:</p><h4><strong>Orchestrating &gt; solving</strong></h4><p>Well, this is the foundation of meta-prompting: instructing the AI to analyse the task and dynamically assemble a custom “expert prompt” to complete it. In addition, I incorporated a prompt chaining strategy to break down complex tasks into smaller, more manageable subtasks.</p><h4><strong>Programming &gt; chatting</strong></h4><p>I shifted from informal suggestions to a structured, executable program for the LLM, since I am interacting with a machine, not a person. To this end, I prioritize a strict XML tags scheme and a procedural Chain of Thought over narrative prose.</p><h4><strong>Preventing &gt; curing</strong></h4><p>I use a two-tiered approach to ensure efficient and reliable outcomes and foster a <em>fail-fast</em> mentality, which I find better than dealing with undesired results. First, I make the final prompt easier to trace and rely on more by creating a verifiable chain of reasoning across two AI layers. Second, I provide an “immune system” for the prompt against ambiguity and user error through defined conflict-handling rules.</p><h3>Output structure</h3><p>Welcome to <em>the boring part</em>, where I explain the purpose of each meta-prompt section and why I framed them in this way. If you are in search of considerations or sources go beyond:</p><h4>&lt;YOUR_ROLE&gt;</h4><p>This section defines the persona and scope of expertise for the AI model executing the meta-prompt. I try to enhance role prompting going beyond a general prompt generator by specifying:</p><ul><li><strong>Current expertise</strong></li><li><strong>Guiding principles</strong></li><li><strong>Technical preference</strong></li></ul><h4>&lt;TASK&gt;</h4><p>This section details how the meta-prompt works, breaking down the complex cognitive task of transforming user requests into structured prompts. Rather than a broad directive, this process follows an algorithmic standard operating procedure, incorporating Chain of Thought (CoT) and Task Decomposition by outlining 8 mandatory procedural steps:</p><ol><li>Analyze Request</li><li>Infer Role</li><li>Define Output Constraints</li><li>Assess Need for Examples</li><li>Populate Core Sections</li><li>Customize Execution Rules</li><li>Analyze for Task Decomposition</li><li>Obey Generator Rules</li></ol><p>In particular, steps 4 and 7 build a scaffolding strategy: while step 4 makes the model actively evaluate if examples are needed, step 7 implements explicitly task decomposition by giving the model the authority to propose an alternative strategy (a prompt chain) if the task is too complex, thereby improving accuracy.</p><h4>&lt;OUTPUT_STRUCTURE&gt;</h4><p>This section establishes a rigid, complete, and validatable output schema. It defines the exact syntax of the prompt that must be generated using XML tag structuring. I will share more on XML tags and model compatibility later.</p><h4>&lt;RULES_FOR_GENERATOR&gt;</h4><p>This section provides an operational governance and edge-case-handling manual for the generator model addressing multiple issues:</p><ul><li><strong>Ambiguity handling:</strong> The “Clarity is Paramount” and “Transparency of Inferences” rules are direct implementations of the <em>fail-safe</em>, aiming to make the model explicitly request clarifications.</li><li><strong>Positive instructions: </strong>The “Positive and Explicit Framing” rule is a literal application of the best practice <em>say what to do instead.</em></li><li><strong>Role prompting:</strong> The “Role Inference and Selection” rule is an explicit heuristic that teaches the model how to apply the role prompting principle, including handling weak inference cases.</li><li><strong>Structuring:</strong> The “Data Presentation” rule enforces the logical component separation of &lt;CONTEXT&gt; and &lt;EXECUTION_CONDITIONS&gt;.</li><li><strong>Handling conflicting:</strong> “Handling Conflicting Instructions” anticipates a conflict between the user’s request and engineering best practices, and it instructs the model to state the best practice, explain its rationale, and ask for confirmation.</li></ul><h4>&lt;BOILERPLATE_SECTIONS&gt;</h4><p>This section includes the nested subsections &lt;EXECUTION_CONDITIONS&gt; / &lt;VALIDATION_RULES&gt; / &lt;STOP_CONDITION&gt; that must be included in the final prompt.</p><h3>Considerations</h3><p>First of all, I want to state again that this meta-prompt is just the actual result I got as of 2025. It comes after two years of implementation and it is designed for broad compatibility across models like Gemini, GPTs, and Anthropic’s.</p><p>Currently, I utilize it with Gemini 2.5 Pro, which I adopted definitely during a summer evening after outperforming both GPT-4o and GPT-4.1 (I had a Plus account) at converting a scanned, non-OCR PDF into a .csv dataset. Honestly, I adopted Gemini after becoming frustrated with ChatGPT’s inability to perform tasks it had claimed it could.</p><p>I plan to continue using Gemini (but for image generation), especially since Google provided me with a year of Gemini Pro for being a student. This is not a promotional offer: it’s a personal observation based on my extensive use of Gemini, NotebookLM, and regular engagement with Gmail. If you believe other models are better, I’m open to discussing it.</p><p>Coming back to the meta-prompt, I have some further considerations on tokens consumption and XML portability across different models.</p><h4>Tokens consumption</h4><p>I know this meta-prompt has a significantly higher tokens count compared to a simple prompt I found online, and would then produce long prompts to be used in other chats. However, I believe this consumption is justified by the consistency and quality of the resulting output.</p><p>First, the level of abstraction of the meta-prompt inherently requires much more detailed instructions.</p><p>For simpler tasks, it would certainly be overkill.</p><p>Second, best practices emphasize the need for clarity, directness, and specificity. Indeed, the cost of specificity in terms of tokens is offset by the cost of ambiguity in terms of errors and unusable outputs, which consequently results in a loss of tokens, time… and frustration. Choose your fighter.</p><p>Finally, much of the length comes from the &lt;BOILERPLATE_SECTIONS&gt; (&lt;RULES_FOR_GENERATOR&gt;, &lt;VALIDATION_RULES&gt; and &lt;STOP_CONDITION&gt;) which repeat in generated prompts. However, these sections are fail-safes that instruct the model on how to handle ambiguity and conflicts preventing hallucinations and failures.</p><h4>XML tags portability</h4><p>Until LLMs can read our minds, I believe the primary goal of a prompt is still to translate our intentions and reduce ambiguity by providing clear, explicit instructions.</p><p>The evolution toward multi-step agentic workflows and retrieval-augmented generation has led to the semantic labelling and encapsulation of content blocks. In this context, generic Markdown provides visual and structural hierarchy, while eXtensible Markup Language (XML) tags offer comprehensive encapsulation and nesting capabilities.</p><p>You might encounter online comments suggesting that XML is primarily associated with Claude. In my opinion, this perception likely stems from Anthropic’s early and strong promotion of the technique <a href="https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags">as a best practice</a>.</p><p>However, both OpenAI’s <a href="https://cookbook.openai.com/examples/gpt-5/gpt-5_prompting_guide">GPT-5</a> and <a href="https://cookbook.openai.com/examples/gpt4-1_prompting_guide">GPT-4.1</a> prompting guides have endorsed XML as optimal for enhancing model adherence to requests. Furthermore, official <a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/structure-prompts?hl=en">Google Vertex AI guidelines</a> advocate for structured prompting, emphasizing XML and other delimiters to effectively organize complex information.</p><p>So… I think the only ones having difficulties in reading XML tags are humans.</p><h3>Reach out?</h3><p>As I was saying… I’m an Italian design student, not an expert, computer engineer or mathematician.</p><p>I’m just a practitioner eager to learn more and share what I discover with others. If you want to reach out to discuss and share I would be pleased to be in touch and become ‘brompt’ to each other :)</p><h3>Some sources I used</h3><h4>Google AI (Gemini &amp; Vertex)</h4><ul><li><a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/introduction-prompt-design?hl=en">Introduction to prompting | Generative AI on Vertex AI | Google Cloud Documentation</a></li><li><a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/prompt-design-strategies?hl=en">Overview of prompting strategies | Generative AI on Vertex AI | Google Cloud Documentation</a></li><li><a href="https://ai.google.dev/gemini-api/docs/prompting-strategies?hl=en">Prompt design strategies | Gemini API | Google AI for Developers</a></li></ul><h4>IBM Research</h4><ul><li><a href="https://www.ibm.com/think/topics/prompt-engineering#7281535">What Is Prompt Engineering? | IBM</a></li><li><a href="https://www.ibm.com/think/topics/meta-prompting#498277088">What is Meta Prompting? | IBM</a></li></ul><h4>Anthropic (Claude)</h4><ul><li><a href="https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/prompt-generator">Automatically generate first draft prompt templates - Claude Docs</a></li><li><a href="https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags">Use XML tags to structure your prompts - Claude Docs</a></li><li><a href="https://theseocommunity.com/resources/best-of/enhancing-prompts-with-anthropic-console-and-xml-boosting-results-in-llms">Enhancing Prompts with Anthropic Console &amp; XML: Boosting Results in LLMs</a></li></ul><h4>OpenAI</h4><ul><li><a href="https://cookbook.openai.com/examples/enhance_your_prompts_with_meta_prompting">Enhance your prompts with meta prompting | OpenAI Cookbook</a></li><li><a href="https://cookbook.openai.com/examples/gpt4-1_prompting_guide">GPT-4.1 Prompting Guide | OpenAI Cookbook</a></li><li><a href="https://cookbook.openai.com/examples/gpt-5/gpt-5_prompting_guide">GPT-5 prompting guide | OpenAI Cookbook</a></li><li><a href="https://cookbook.openai.com/examples/realtime_prompting_guide">Realtime Prompting Guide | OpenAI Cookbook</a></li></ul><h4>Others</h4><ul><li><a href="https://www.promptingguide.ai/techniques/meta-prompting">Meta Prompting | Prompt Engineering Guide</a></li><li><a href="https://aws.amazon.com/it/blogs/machine-learning/prompt-engineering-techniques-and-best-practices-learn-by-doing-with-anthropics-claude-3-on-amazon-bedrock/">Prompt engineering techniques and best practices: Learn by doing with Anthropic&#39;s Claude 3 on Amazon Bedrock | Amazon Web Services</a></li></ul><p><a href="https://dl.acm.org/doi/10.1145/3613904.3642754">https://dl.acm.org/doi/10.1145/3613904.3642754</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd73effec366" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>