Skip to main content

Writing a prompt

To maximize the efficiency of Lampi, it is crucial to master the technique of providing it with precise instructions and communicating effectively. This is where the art of composing effective prompts plays a significant role.

In this tutorial, you'll discover:

What is a prompt? Why it is so important? The best way to write a prompt Some examples of prompts.

What is a “Prompt”?

A prompt refers to a question or command given to an AI model, instructing it to perform a specific task or provide a certain output. Prompts are the catalysts that drive AI models to interpret, analyze, and generate data in a manner that aligns with the user's intent. Prompts play a pivotal role in the field of Natural Language Processing (NLP), the subfield of AI that enables machines to understand, process, and generate human language.

Why Prompts are so Important when using AI?

The quality and clarity of a prompt can greatly influence the output generated by the AI model, making it important to craft prompts that effectively convey the user’s intent and desired outcome.

To better understand the profound impact of a well-constructed prompt, let's consider a practical example. Suppose you provide an AI model with a vague prompt, such as "Can you give me a cake recipe?" The AI model could interpret this in various ways, resulting in an array of outputs, some of which may not be as useful to the user. However, a specific and detailed prompt, such as "Can you provide a recipe for a gluten-free chocolate cake under 300 calories?", would guide the AI model to generate a precise, useful, and practical output.

In a business context, understanding and implementing prompt engineering can be a game-changer.

Consider the difference between a vague prompt, such as "Perform a market analysis of the Luxury sector," and a more detailed prompt, like "Prepare a comprehensive report analyzing the market trends of the Luxury sector in the third quarter of 2023 using the following structure: [structure]". The latter provides a precise direction to the AI model, enabling it to generate a relevant and actionable output.

The potential of well-crafted prompts in transforming AI outputs cannot be overstated.

Precise prompts AI systems to deliver accurate, detailed, and relevant results. However, the art of prompt engineering is not devoid of challenges. Creating effective prompts requires an understanding of the AI model's capabilities, the data at hand, and the desired outcome.

How to write a perfect prompt?

Writing prompts is not difficult. But writing the perfect prompts to get relevant results from the language model is not as easy as it looks, either.

The process of creating perfect prompts isn't just about firing off a question or instruction. It involves a strategic approach to get the desired output. It is not about asking a question, but about asking the right question in the right way.

Guidelines for getting better results:

  • Ask the model to adopt a persona: It involves instructing the model to respond as if it were a specific character or individual to have specific characteristics, knowledge, and viewpoints. With Lampi, you can use specific agents who are designed to act in a specific way, and even create your own agents.
  • Write a clear instruction: Lampi can’t read your mind. Avoid vagueness as it can lead to broad, generalized, and often irrelevant responses. Instead, be as specific as possible in your prompts. The more specific the prompt, the better the AI model can generate precise and relevant responses.
  • Use action-oriented language: Ensure your prompts are action-oriented, guiding the AI model on what exactly it needs to do. The model should be able to understand the tasks based on the verbs used in your prompts. Use commands to instruct the model what you want to achieve, such as "Write", "Classify", "Summarize", "Translate", "Order", etc. Keep in mind that you need to experiment to see what works best
  • Emphasis on key aspects: Highlight the key aspects of your request in your prompts. These key points will guide the AI model to focus on the aspects you consider most important, enabling it to provide outputs that cater to your specific needs.
  • Provide context: Providing adequate context in your prompts is key to getting the desired output. With Lampi, you can trigger relevant documents to provide context to your queries directly (for more information about it, Retrieval Augmented Generation (RAG)). By giving the AI more context, you can guide it to deliver more accurate and meaningful responses.
  • Split complex tasks into simpler sub-tasks: Complex tasks often have a higher likelihood of mistakes than simpler ones. Additionally, it's possible to reorganize complex tasks into a series of easier tasks, where the results from the initial tasks are used to inform the next steps.
  • Use examples: You can use examples in your prompts. If you want to write something based on a specific example, include that example in your prompt.
  • Give the model time to "think": Just as you might need a moment, models also benefit from additional time to formulate responses. They tend to make fewer reasoning mistakes when they aren't rushed to provide an answer immediately. Requesting a "chain of thought" approach before arriving at an answer can significantly enhance the model's ability to reach accurate conclusions.
  • Specify response length: AI models don't inherently know whether you want a brief or comprehensive response. It's essential to specify the desired length of the response in your prompt to avoid confusion and excessive regeneration of content.
  • Refine as needed: Creating the perfect prompt might not always be a one-shot process but rather an iterative one. Just like the classic saying, "Rome wasn't built in a day," achieving the ideal prompt requires refinement and adjustment. You’ll find that you may need to modify and fine-tune your prompts to align more closely with the specific outputs you desire. When refining, choosing the right words matters in prompt engineering: expand, explain, simplify, clarify, formalize, reiterate, etc.

As you get started with designing prompts, you should keep in mind that it is really an iterative process that requires a lot of experimentation to get optimal results. You can start with simple prompts and keep adding more elements and context as you aim for better results. Iterating your prompt along the way is vital for this reason.

Note: To avoid rewriting your prompts, we recommend saving the prompts that work for you.

Advanced Prompting Techniques

Once you've mastered the basics, these advanced techniques will take your prompting skills to the next level.

Chain of Thought (CoT)

Chain of Thought prompting encourages the AI to break down complex reasoning into intermediate steps, dramatically improving accuracy on tasks requiring logic or multi-step analysis.

How it works: Instead of asking for a direct answer, you ask the model to "think step by step" or "explain your reasoning."

Without CoTWith CoT
Is this acquisition target a good fit for our portfolio?Evaluate this acquisition target step by step: First, analyze how it fits with our existing portfolio companies. Then assess the management team quality. Next, evaluate the market position and competitive moat. Finally, consider the valuation relative to comparable transactions. Show your reasoning at each step.

Zero-Shot vs Few-Shot Prompting

Zero-Shot: Asking the AI to perform a task without providing examples. Works well for straightforward tasks.

Few-Shot: Providing 2-5 examples of the desired input/output format before your actual request. Dramatically improves consistency and accuracy.

Few-Shot Example:

Classify the following customer feedback as Positive, Negative, or Neutral:

Example 1: "The product arrived on time and works perfectly!" → Positive
Example 2: "Terrible experience, will never buy again." → Negative
Example 3: "It's okay, nothing special." → Neutral

Now classify: "The delivery was late but the product quality exceeded my expectations."

Step-by-Step Task Orchestration

One of the most powerful techniques is instructing the AI to perform tasks in a specific sequence, using the output of each step to inform the next. This is especially useful with Lampi's Agent mode, where you can leverage multiple tools.

The principle: Tell the AI exactly what steps you would take yourself, in what order, and how to combine the information.

Example: Target Company Screening

I need to evaluate [Company Name] as a potential acquisition target. Follow these steps exactly:

Step 1: Search my internal documents for any existing research, previous
interactions, or deal memos related to this company or its sector.

Step 2: Search the web for:
- Recent news and press releases (last 12 months)
- Key financial metrics and growth trajectory
- Management team background and recent changes
- Competitive positioning and market share

Step 3: Compare the information from both sources:
- What intelligence do we already have internally?
- What's new from public sources?
- Are there any red flags or contradictions?

Step 4: Synthesize your findings into an investment screening memo:
- Company overview (2-3 sentences)
- Key investment highlights
- Potential concerns/risks
- Preliminary valuation considerations
- Recommendation: Pursue / Pass / Need more info

Example: Portfolio Company Analysis

Prepare a quarterly review analysis for [Portfolio Company Name]:

Step 1: Search our internal documents for the original investment memo,
previous board materials, and KPI tracking.

Step 2: Search the web for:
- Industry trends and competitor movements
- Any news about the company or its market
- Comparable company performance data

Step 3: Cross-reference current performance against:
- Original investment thesis assumptions
- Projected vs actual KPIs
- Market benchmarks

Step 4: Deliver a structured analysis:
- Performance vs plan summary
- Key wins and challenges this quarter
- Updated risk assessment
- Strategic recommendations for next quarter

Self-Consistency Prompting

Ask the AI to approach a problem from multiple angles and then reconcile the different perspectives. This reduces errors and provides more robust answers.

Analyze this potential acquisition using three different perspectives:

1. As a Deal Partner focused on strategic fit and value creation potential
2. As a CFO focused on financial structure, leverage capacity, and returns
3. As an Operating Partner focused on operational improvement opportunities

After presenting each perspective, identify where they agree and disagree,
then provide a consolidated investment recommendation.

Constrained Output Formatting

Being explicit about the exact format you need saves time and ensures the output is immediately usable.

Analyze this CIM (Confidential Information Memorandum) and provide your response in the following exact format:

**Executive Summary:** (2-3 sentences max)

**Key Metrics:**
- Revenue: €[amount] | EBITDA: €[amount] | Margin: [X]%
- Revenue CAGR (3yr): [X]%
- Customer concentration: Top 10 = [X]%

**Investment Highlights:**
1. [highlight]
2. [highlight]
3. [highlight]

**Key Risks:**
1. [risk]
2. [risk]
3. [risk]

**Preliminary View:**
- Attractiveness: High / Medium / Low
- Next steps recommendation

Negative Prompting (What NOT to do)

Explicitly telling the AI what to avoid can be as important as telling it what to do.

Write a pass letter to a company whose deal we reviewed but decided not to pursue.

DO:
- Be respectful and professional
- Thank them for their time and the materials provided
- Leave the door open for future opportunities
- Keep it concise (under 150 words)

DO NOT:
- Give specific reasons for passing (keep it vague)
- Mention valuation concerns or specific weaknesses
- Make promises about reconsidering in the future
- Share any competitive intelligence

Iterative Refinement Pattern

Build complex outputs through successive refinement rather than trying to get everything perfect in one prompt.

Let's create an investment memo in stages:

Stage 1: First, outline the key sections this memo should have based on
our standard IC memo template.

[Wait for response, then continue...]

Stage 2: Now draft the Executive Summary and Investment Thesis sections.

Stage 3: Expand on the Market Analysis and Competitive Positioning.

Stage 4: Detail the Financial Analysis and Returns Expectations.

Final Stage: Review the complete memo for consistency, ensure the risks
are properly addressed, and verify the thesis flows logically throughout.

Common Prompting Mistakes to Avoid

MistakeWhy It's a ProblemBetter Approach
Being too vagueAI has to guess your intentBe specific about what you want
Asking multiple unrelated questionsDilutes focus, inconsistent answersOne clear objective per prompt
Not specifying formatOutput may not be usableDefine exact format needed
Forgetting contextAI doesn't know your situationProvide relevant background
Expecting perfection first tryLeads to frustrationPlan for iteration and refinement
Not leveraging toolsMissing out on capabilitiesUse Agent mode for complex tasks

The CRAFT Framework

A simple framework to remember when writing prompts:

  • Context: Provide relevant background information
  • Role: Define who the AI should act as (if helpful)
  • Action: Clearly state what you want done
  • Format: Specify exactly how you want the output
  • Tone: Indicate the style (formal, casual, technical, etc.)

Example using CRAFT:

[Context] We're preparing an IC memo for a potential add-on acquisition 
for one of our portfolio companies. The target has strong revenue growth
but declining margins.

[Role] Act as a senior PE investment professional.

[Action] Help me structure the key considerations and frame the
strategic rationale for this add-on.

[Format] Provide:
- 3 bullet points on strategic fit
- Key synergy opportunities (revenue and cost)
- Main risks to flag for the IC
- Suggested deal structure considerations

[Tone] Direct, analytical, balanced.

Further Reading


Next: Selecting and curating data