Explainer video 6: prompting and using Markdown
Summary: How to create effective prompts in Twin AI using Markdown
Effective prompts are the foundation of successful interactions with AI. By providing clear and structured instructions, you enable the AI to generate precise and valuable responses. This guide covers how to create and refine prompts in Twin AI using Markdown, ensuring your workflows produce the best possible outcomes.
Understanding Prompts and Markdown
What is a Prompt?
A prompt is an instruction or question you provide to an AI to elicit a specific response. Just as clear instructions help humans perform tasks better, well-crafted prompts lead to more accurate and relevant AI outputs.
The Role of Markdown
Markdown is a lightweight markup language used to format text. It helps structure your prompts, making them easier for AI to interpret. Twin AI leverages Markdown to understand the hierarchy and organization of your instructions, enhancing the quality of the generated responses.
Creating Structured Prompts in Twin AI
Step 1: Open the Twin AI Platform
- Log in to your Twin AI account.
- Navigate to the workflow section where you want to create or edit a prompt.
Step 2: Start Building Your Prompt
- Select the workflow you want to work on or create a new one.
- Locate the prompt section within the workflow where you’ll input your instructions.
Step 3: Utilize Markdown for Structure
- Add a Title:
- Type your desired title.
- Prefix it with a hashtag and a space (# ) to denote it as a main title:
- # Project Proposal Instructions
- Create Sections with Subtitles:
- Use additional hashtags for subsections.
- ## Instructions
- ## Input
- Write Clear Instructions:
- Under the Instructions section, detail what you want the AI to do.
- ## Instructions: Write a comprehensive project proposal based on the provided input.
- Define the Input:
- Under the Input section, specify the data the AI will use.## Input Project details including summary, objectives, scope, timeline, and budget.
- Add Examples (Optional):
- Provide examples to guide the AI.
- ## Example **Summary:** Implement an automated order processing system. **Objectives:** Increase efficiency, reduce errors.

Or check this Markdown guide here.
Step 4: Save and Publish the Prompt
- Click on "Save" to store your prompt.
- Publish the workflow to apply the changes.
Editing and Refining Your Prompts
Step 1: Review the Initial Output
- Run the workflow with sample data.
- Navigate to the "Block Results" section to view the AI’s output.
Step 2: Identify Areas for Improvement
- Look for inconsistencies or sections where the AI did not follow instructions precisely.
Step 3: Refine the Prompt
- Edit the prompt by adding more specific instructions.
- ## Instructions Write a comprehensive project proposal based on the provided input. Follow the exact format with clear sections.
- Add an Instruction Reminder:
- Emphasize the importance of format adherence.## Instruction Reminder Follow the exact format provided. Do not add any additional sections.
- Save and Publish the updated prompt.
Testing Your Prompts
Step 1: Run the Updated Workflow
- Click on "Run" to execute the workflow with the refined prompt.
- Monitor the process to ensure it completes successfully.
Step 2: Verify the Output
- Check your email or the designated output location for the generated project proposal.
- Review the structure and content to ensure it aligns with your instructions.
Step 3: Make Further Adjustments if Needed
- If the output still lacks desired precision, revisit the prompt and add more detailed instructions or examples.
Best Practices for Effective Prompts
- Be clear and concise: Avoid ambiguity in your instructions to ensure the AI understands your requirements.
- Use proper markdown syntax: Structuring your prompt with titles, subtitles, lists, and examples enhances readability and comprehension.
- Provide examples: Demonstrating the desired output format guides the AI to produce consistent results.
- Specify the output format: Clearly state how you want the information organized, such as using headings, bullet points, or numbered lists.
- Iterate and refine: Continuously test and adjust your prompts based on the AI’s output to achieve optimal results.
Conclusion
Creating effective prompts in Twin AI involves understanding the role of Markdown in structuring your instructions and refining them through iterative testing. By following this guide, you can enhance the quality and consistency of the AI-generated outputs, making your workflows more efficient and reliable. Clear, well-structured prompts lead to better results, empowering you to leverage Twin AI’s capabilities to their fullest.
Full transcript
Introduction to Prompts and Markdown
Hey, for today, I'll be explaining what makes a good prompt. For those of you who don't know, prompts are the instructions that you give to AI. When you open your ChatGPT area and type something, it's called a prompt. As you can imagine, just like with humans, if you provide better instructions, you get better results. It works the same with AI - better instructions means better results. But how do we provide better instructions to AI?
To understand what's needed, we first need to do a little deep dive into the core language of AI, which is called Markdown. I'll explain what Markdown is with a quick preview example. Once we understand the markdown core concept, we can go back to the Twin platform and see what makes a good prompt.
Understanding Markdown
What you see here is the dillinger.io platform. There are many Markdown platforms out there, but I will only be using this one to explain how Markdown works. Once we understand how it works, we can go back to the Twin platform and use it there.
On the left side of the screen, there's the Markdown area, and on the right, there's the preview area. When we type something on the left in the Markdown language, it will show up on the right. The left side looks very similar to the right side, but there's no structure yet.
Adding Structure with Headers
To add structure, we start by adding a title. However, simply typing "A title" doesn't make it look like a title. To make it a title, we need to put a hashtag and a space in front of it. This allows us to structure our prompts the way we want in the AI language.
AI has been trained on the stuff you see on the left. With the title, it knows that there's a new section incoming, and the text below is probably a paragraph. The number of hashes in front of the text indicates the level of the title, allowing us to structure our prompt in an organized way.
Providing Instructions and Examples
We can write down instructions and give examples. By dividing the prompt into subsections, AI knows that everything we write in a specific section is an example. This way, we can provide the right inputs to AI at the right moment.
Creating Lists
You can create a list by typing "list item one", "list item two", "list item three". If you want the AI to output a list, you can ask for it and specify the format. The AI will respond in this format, allowing you to structure your output the way you'd like.
Key Takeaways for Markdown
What we need to remember is that AI has been trained on markdown. If you want to talk to AI on a somewhat lower level, you can use markdown language. By ensuring the markdown structure is correct, you can get better quality results.
Building a Prompt in the Twin Platform
Now, let's go back to the Twin platform and see how to build a better prompt. For this example, our business case is writing a project proposal for a client. A project proposal typically contains a project summary, the work that's being done, a timeline, and a budget. We'll try to see if AI can write the entire proposal for us.
Setting Up the Workflow
In the Twin platform, I've already set up a workflow called "Writing a Project Proposal". This workflow will execute a prompt and then write a Word document based on the executed prompt. We are going to edit the prompt here.
Structuring the Prompt with Markdown
We'll start off with our markdown and specifically say "These are your instructions". Since we've learned about markdown, we'll also specify "This is the input that you are working on". By separating the title, instructions, and input, the AI will better understand what the input is and what the instructions are.
We'll save this, publish, and run it. I've already put together some example data. In this case, we are working on a project that shows automated order processes with AI. The idea is that you receive an order via email, process the order automatically, and the project budget is 5K with an estimated timeline of about 2 months.
Evaluating the Initial Output
The AI generated a document with an executive summary, project objectives, project scope, project plan, budget and resources, expected outcomes, and a conclusion. It's decent, but not good enough for a top-notch AI consultancy company. We want to improve our prompt.
Improving the Prompt Structure
To improve the prompt, we'll go back and specify the expected structure to the AI. By defining the structure, the AI will better understand what we are looking for. After saving, publishing, and running the updated prompt, we can see that the AI listens to the instructions we gave it. It includes a summary of the project, deliverables, timeline, cost, and conclusion, following the structure we provided.
Examining the Raw Prompt Output
To see the raw data of the prompt, we can click on the prompt block, go to the output page, and look at the block results. In the text output, we can see that the AI is following our structure, using hashtags for the summary, deliverables, timeline, cost, and conclusion sections. The result is more consistent and aligned with what we want.
Fine-tuning the Prompt
To further fine-tune the prompt, we'll add an instruction reminder at the bottom of the prompt to draw more attention to it. The reminder states: "Follow the exact format that has been given. Do not output anything else. This is the format." We'll save, publish, and run the prompt again.
Evaluating the Fine-tuned Output
Looking at the output of the fine-tuned prompt, we can see that there's no longer a rogue title on top and no hallucination. The AI specifies the summary, deliverables, timeline, cost, and conclusion as instructed. By making sure our instructions are clear, providing the right examples, specifying the desired output format, and emphasizing what's important, the AI will understand us better and provide better, more consistent results.
Conclusion
In conclusion, writing a better prompt involves providing clear instructions, using markdown to structure the prompt, giving examples, specifying the desired output format, and emphasizing what's important. By following these guidelines, you can get better and more consistent results from AI.