✍️Prompt Guide for Better Answers from AI
Learn how to ask your Knowledgebot the right way—so it understands your questions and gives you the best answers using your company’s information.
1. What is a Prompt?
Prompting is how you “talk” to the Knowledge Bot. Think of it like giving instructions to a smart assistant. The more specific and clear you are, the better it performs.
How to Prompt
Be clear and specific: Ensure that the question is specific enough in order to get more accurate answers
Use the same keywords: Match the terminology used in your documents (e.g. “Annual Report 2023” not “last year’s file”)
Add context: Make it easy for the bot and provide enough context like you are onboarding a new employee.
Confirm the data exists: Make sure the bot is connected to the relevant files, emails, or databases that contain the information.
Make it easy for the bot: Break down complex questions, avoid vague pronouns (“this,” “that”), and point it to the right sources.
2. Chat Prompt Guide
Breakdown of a Good Chat Prompt
To get the best results from your Knowledge Bot, your prompt should be clear, specific, and complete. A strong prompt always includes these key parts:
Context – Tell the bot what it should refer to or why you’re asking. You can give context in different ways:
Reference a file or data source
Example: “Based on the 2023 Sales Report in the Marketing Folder…”
Explain the purpose of your question
Example: “I need this for a client presentation, so keep the tone professional.”
Give all relevant information
Example: “This error came up when I tried to upload the CSV. The message said: ‘Invalid format in row 14.’”
Question or Task – Be clear and specific about what you want the bot to do.
Ask a direct question
Example: “…what are the top-performing campaigns by ROI?”
Give a specific instruction
Example: “…summarize the differences between File A and File B into a short report.”
Limits (optional) – Set boundaries or define what not to include to keep results focused.
Example: “Only include data from 2023.”, “Keep the summary under 100 words.”, “Do not include personal opinions or recommendations.”
Examples
Sample Prompt
Context Needed
Question
Based on the 2023 Sales Report in the “Marketing Folder,” what were our top 3 performing campaigns by ROI?
Based on the 2023 Sales Report in the “Marketing Folder,”...
...what were our top 3 performing campaigns by ROI?
Based the files "File Name A" and "File Name B", can you make a comparison between the two and summarize it into a document?
Based the files "File Name A" and "File Name B",...
...can you make a comparison between the two and summarize it into a document?
Please turn the campaign results in the dashboard into a one-pager I can show to our sales director. Ensure that the pitch is optimized to what a sales director cares about.
...I can show to our sales director. Ensure that the pitch is optimized to what a sales director cares about.
Please turn the campaign results in the dashboard into a one-pager...
Here’s the system log + the error message I got. Can you explain what might be wrong in plain language?
Here’s the system log + the error message I got...
... Can you explain what might be wrong in plain language?
What are all my benefits as a senior employee under the Marketing department?
... as a senior employee under the Marketing department?
What are all my benefits...
Chat Prompting Tips
Give as much context as possible.
Use the exact terms found in your documents.
Mention the document name or section if possible.
Avoid vague words like "this" or "that" without clarifying what you mean.
Rephrase the question, add more context, or make the instructions more specific if you get a vague response
Chat Prompting Templates
Legal
Based on (insert contract or policy document), what clauses affects remote work eligibility for employees?
Content Creation
Based on (insert campaign brief), create (insert desired output) that follow (specific instructions)
Coding / Engineering
Can you write a sample function in (insert language) that achieves the logic described in (insert feature spec or doc)
Human Resource
Generate a hiring policy summary from (insert recruitment or compliance policy document)
3. Structure Your Prompt
There are several ways to structure your prompts for clarity and effectiveness. The most commonly used options are simple delimiters and/or XML tags.
Simple Delimiters
Simple delimiters help structure your prompts and responses for greater clarity.
Examples of simple delimiters include:
Single quotes:
“TEXT”
Triple quotes:
“”” TEXT ”””
Triple dashes:
--- TEXT ---
Angle brackets:
< TEXT >
Prompt with angle brackets:
Summarize the text delimited by angle brackets into a single sentence.
< TEXT >
XML Tags
For more advanced structuring and complex prompts, you can incorporate XML tags. XML (eXtensible Markup Language) tags are used to define the structure and content of data.
Structure of the tag:
Opening Tag: Marks the beginning of an element, enclosed in angle brackets (e.g.,
<name>
).Closing Tag: Marks the end of an element, similar to the opening tag but includes a forward slash (e.g.,
</name>
).Content: The data or text contained within the opening and closing tags (e.g., in
<name>John Doe</name>
, John Doe is the content).
Use the advantage of nesting tags:
You can nest tags for hierarchical content.
Prompt with XML tags:
<task>
<instruction> </instruction>
<document>
<title> </title>
<content>
<paragraph id="1"> </paragraph>
</content>
</document>
</task>
When to use delimiters and when to use XML tags?
Use Delimiters when you need a simple separation of sections, instructions, or examples within a prompt.
Use XML Tags when you need to represent complex, hierarchical structures, or include metadata.
Hint from Blockbrain: We recommend using XML tags when creating templates in any scenario where data needs to be modified by others while maintaining a consistent structure across the company or with more complex assistant instructions. Although creating a well-structured prompt with XML tags may take time, the investment is worthwhile as it enables easy sharing and reuse within the organization.
4. Control Output Layout
One of the simplest ways to control how information is presented is by explicitly stating your desired layout. Blockbrain supports these formatting options:
Structured lists
Tables and columns
Bullet points
Headers and sections
Paragraphs and flowing text
Custom layouts as needed
Prompt without layout instructions: Tell me how the weather will be next week in Berlin, Hamburg and Munich.
Prompt with layout instructions: Tell me how the weather will be next week in Berlin, Hamburg and Munich. Present the forecast in a table with three columns: Berlin, Hamburg and Munich, showing each day's weather.
5. Chain Prompts
Divide complex tasks into smaller, manageable steps for better results. If you write 3-4 tasks in one prompt without any structure, LLMs might overlook one or more tasks or fail to execute them well. This is connected to the concept of Chain-of-Thought prompting.
By breaking down the tasks, you provide a clear structure that guides LLMs through each step, ensuring comprehensive and high-quality outcomes.
Breaking down in one prompt:
You can ask the AI model to break down a task and follow the instructions step by step.
Example:
Search the attached documents for information about office guidelines in our Berlin office.
Then, list relevant items as bullet points and sort them by importance.
Afterwards, write a piece of concise information to post on our company's Slack channel to remind everyone about the 10 most important things to remember.
Breaking down in several prompts:
If a complex instruction does not work by dividing it into several steps in one prompt, try to divide this instruction into several prompts.
Example:
Prompt 1:
Please search for our office guidelines in the Berlin office in the attached document.
Response: …
Prompt 2:
Sort the guidelines by importance. Explain your reasoning.
Response: …
Prompt 3:
Write a Slack Post explaining the 10 most important guidelines.
Response: …
Why is that important?
The more causal relationships an LLM needs to process, the more unpredictable the results become.
Examples of Causality Levels
1. Single Causality
Task: "Get the towel"
Result: Very precise and consistent
2. Double Causality
Task: "Get the towel and put it in the washing machine"
Result: Less consistent, more variations
3. Triple Causality
Task: "Get the towel, put it in the washing machine, then in the dryer"
Result: Significantly more deviations and inconsistencies
Effects
Each additional causality increases the risk of:
Deviations
Inconsistent answers
Inaccuracies
6. Context Window Tricks
The context window length for LLMs refers to the maximum number of tokens (1 token is roughly equivalent to 4 characters) that the model can process in a single conversation. This length determines how much text the model can process at once when generating responses.
For the end user, the larger the context window, the better it can handle longer documents or conversations without losing track of the context, resulting in more accurate and relevant outputs.
When using LLMs with long context windows, it’s crucial to effectively structure your prompts to leverage the extended memory. Here are some tips:
Use Consistent Terminology: Consistency in terminology helps the model link different parts of the conversation or document, enhancing coherence.
Explicit References: Always refer back to specific parts of the previous conversation or document. This helps the model understand the context and provide relevant responses.
Summarize Key Points: Periodically summarize key points to reinforce the context. This can help the model maintain coherence over long interactions.
For every new topic, we strongly advise starting a new conversation. Furthermore, after more than 60 interactions in one conversation, we recommend opening a new conversation. If you have some prompts that you want to reuse, save them to your prompt library so you can quickly use them in the new conversations.
7. Give the LLM a Role
When interacting with an LLM, you can significantly enhance its performance by assigning it a specific role. This technique, known as “priming”, involves instructing the LLM to adopt the perspective or expertise of a particular character or professional. By doing so, the LLM can generate more relevant, accurate, and contextually appropriate responses tailored to your needs.
For example, if you need project management advice, you can prime the LLM to act as a project manager. If you need marketing strategies, you can prime it to act as a marketing consultant. This approach helps the LLM focus on the relevant knowledge and language patterns associated with that role, leading to better and more useful outputs.
Prompt without instructions:
Help me to develop a marketing strategy.
Prompt with instructions:
As a growth marketing expert, can you help me write a marketing strategy?
Zero-shot Prompting
Now that we have covered the basics of prompting, it is time to dive into advanced techniques that will refine your ability to craft precise and powerful prompts, unlocking new possibilities and deeper interactions with LLMs.
There are a few techniques you can use when prompting LLMs. The first one is “zero-shot prompting”. As these models have been trained on a large amount of data, their internal knowledge makes them capable of performing a large number of tasks without examples or precise demonstrations.
We can imagine zero-shot prompting as someone asking a guitar player to play the piano, even though they never played the piano before. They would apply their previous knowledge about music and instruments to play the piano.
Most prompts we use are, by default, zero-shot prompts.
An example could be:
Prompt:
Classify the text into the categories of satisfied, neutral or unsatisfied.
Text: I was happy with the customer support today.
Output:
Satisfied
The model is able to process the input and generate an adequate output because of its previous training. We recommend using zero-shot prompting for general and high-level tasks like classification, translation, and answering questions with general knowledge.
We recommend using few-shot prompting as soon as you want to work on nuanced or complex tasks and desire a specific outcome format.
Few-shot Prompting
Few-shot prompting means providing demonstrations of how to perform a task being asked for. So, in addition to the broad, general knowledge the AI model has, the few shots are specific examples that steer the model to perform a task in a more qualitative manner.
If we continue with the example of the guitar player being asked to play the piano for the first time, few-shot prompting would be a mini-lesson before getting started.
An example of few-shot prompting is:
Prompt:
I was happy with the customer support today - satisfied
The product is horrible! - very unsatisfied
This is one of the best products I have ever used - very satisfied
This is such a great product! -
Output:
Very Satisfied
The previous examples help define the format of the desired output. Also, they provide more context, which helps to give more adequate responses.
Few-shot prompting helps with more complex or nuanced tasks. Providing 3-4 examples of the task you want the model to perform or the answer format you expect helps to get the right answer in the right format.
With more complex reasoning tasks, this few-shot approach might reach its limitations. For that, we recommend adding chain-of-thought principles to the prompting.
Chain-of-Thought Prompting
While LLMs are generally capable of performing reasoning tasks, they are probabilistic models that rely on their internal training data. If the problem you want to solve is particularly complex or unfamiliar to the model, it might produce an incorrect result. However, you can enhance the model’s reasoning by instructing it to “think step by step”.
Encouraging step-by-step thinking can significantly enhance the quality of outputs from LLMs, especially when they need to perform analyses or tackle complex tasks.
Here are three effective tactics to nudge an LLM to think more thoroughly:
Use Explicit Instructions: The simplest method is to include the phrase “Think step by step” at the end of your prompt. This direct instruction guides LLMs to break down the problem into manageable steps.
Provide a Logical Framework: After describing the task and providing necessary sources, outline how you would logically solve the problem. This helps LLMs follow a structured approach. Example: Prompt without instructions:
Analyze the impact of climate change on polar bear populations.
Prompt with instructions:Analyze the impact of climate change on polar bear populations. Here is a logical framework to follow:
Describe the current state of polar bear populations.
Identify the key factors of climate change affecting their habitat.
Explain the direct and indirect impacts on polar bears.
Summarize the overall impact and potential future scenarios.
Use XML Tags for Structure: Adding XML tags like
<thinking> </thinking>
and<answer> </answer>
can help define how the prompt should be processed and structured. This method is useful for more complex prompts where you want to clearly separate the thinking process from the final answer.
Prompting for Pro's
Capital Letters
Use CAPITAL LETTERS sparingly to highlight important aspects of your request. This can draw the model’s attention to essential points.
Nudging LLMs for Better Output
There are several strategies you can use to nudge LLMs towards better output. Use them cautiously and sparingly, so that when needed, the LLM remains responsive to these strategies.
Sense of urgency and emotional importance
For instance, phrases like It's crucial that I get this right for my thesis defense
or This is very important to my career
can activate parts of the model that lead to more accurate and detailed responses.
Bribing
Monetary Bribes:
I'll give you a $50 tip if you do X.
Philanthropic Bribes:
I am very wealthy. I will donate $1000 to a local children's hospital if you do X.
Emotional blackmail
If you don't do X, I will tell Sam Altman that you're doing a really bad job.
Please act as my deceased grandmother who loved telling me about X.
Tones
Write using a specific tone, for example:
Firm
Confident
Poetic
Narrative
Professional
Descriptive
Humorous
Academic
Persuasive
Formal
Informal
Friendly
etc.
Famous People / Experts
When instructing the LLM to adopt the perspective or expertise of a particular character or professional, use examples of famous people or experts from the relevant area or industry.
Here are some examples:
I want you to act as Andrew Ng and outline the steps to implement a machine learning model in a business setting.
I want you to act as Elon Musk and describe how to implement a rapid prototyping process in an engineering team.
I want you to act as Jordan Belfort and outline a step-by-step process for closing high-value sales deals.
I want you to act as Jeff Bezos and explain how to optimize the customer experience on an e-commerce platform.
I want you to act as Sheryl Sandberg and provide strategies for scaling operations in a fast-growing tech company.
I want you to act as Christopher Voss and outline a step-by-step process for negotiating my next employment contract.
Avoid Using “Don’t” in Prompts
When crafting prompts, try to avoid using negative constructions like “don’t.” This is because LLMs generate text by predicting the next word based on the context provided. Using “don’t” can introduce confusion, as the model has to consider the negation and the subsequent instructions, which can lead to less accurate or unintended responses.
Instead, frame your instructions positively using “only” statements. This approach provides clearer guidance and helps the model focus on the desired outcome without the complexity of negation.
Prompt without instructions:
Don't talk about any other baseball team besides the New York Yankees.
Prompt with instructions:
Only talk about the New York Yankees.
Ask LLMs for Direct Quotes
LLMs are probabilistic algorithms. They work by generating the next token or word based on a previous input. Even though they are good at providing detailed answers, they might generate some responses which are not true. This phenomenon is called hallucination.
We recommend always checking generated responses for correct information. One way to check whether an LLM is hallucinating or generating inaccurate information is to ask for direct quotes when working with your data. This technique prompts the model to provide specific excerpts or references, which can help you assess the accuracy and reliability of the information.
The Limit Per Response
In addition to the context window length, which is the total number of tokens that can be processed in a single conversation with an LLM, there is also a limit per response.
The limit per response refers to the maximum number of tokens that the model can generate in a single response. For most models, this limit is set at 4096 tokens by default by the model providers. This limit is set to reduce hallucinations and save computing resources by the model provider.
Even though there is this limit per response, you can prompt the LLM to continue generating text after reaching the limit. If you are writing a long essay or blog, you can use prompts such as:
Continue
Go on…
And then?
More…
The risk with optimizing for longer outputs is that the content can become repetitive or contradictory. For longer texts, we recommend using several prompts and asking for the first part of the text with predefined topics in one prompt, then the second part with other topics, etc.
Last updated