Prompt Writing Techniques

Tips and best practices for achieving the most accurate results with Harvey.

Last updated: Sep 22, 2025

Overview

To get the most detailed and tailored output from Harvey, it’s essential to include the right mix of “request,” “context,” and “output” in your prompt. This article provides tips and best practices to help you use Harvey effectively.

How Prompts Work

Harvey performs best when given clear, task-specific instructions in natural language. Think of Harvey as a junior colleague who needs precise directions and relevant context.

A successful prompt includes three key components:

  • Request: Use clear, specific language to phrase your prompt as a question or request.
    • Example: Summarize the interim covenants…
    • Example: Analyze the assignment clause…
    • Example: Draft a memo…
  • Context: Provide background to help Harvey understand your request.
    • What document have you uploaded?
    • Who is your intended audience?
    • What key issues should be addressed?
  • Output: Specify the desired format and style of the response.
    • Example: …in a table
    • Example: …as a bulleted or numbered list
    • Example: …as a memo
Prompt Tips

How to Craft Your Prompt

  • Upload Supporting Documents: Uploading documents helps ground Harvey and reduces the risk of hallucinations (AI-generated incorrect or misleading information). Be aware that Harvey may not always provide citations, especially when:
    • Multiple sources are referenced
    • There are too many valid sources
    • The information is inferred as a general concept from the document
  • Avoid Referencing Pages or Document Numbers: Harvey may not interpret documents and pages as you do. Instead, refer to sections or document names.
  • Include Sufficient Information in Your Prompt: Be specific and detailed, specifying the desired output format (e.g., structure the response as a memo with subheadings).
  • Consider Breaking Up Complex Prompts: Simpler queries often yield better responses. When dealing with large datasets or complex questions, break your prompt into multiple parts to allow Harvey to focus on one task at a time.
    • Use follow-up questions instead of multi-part prompts.
    • While drafting break up complex prompts into multiple queries, or revisions, to ensure thorough responses. Think of it as marking up the document with a pen. Revisions should be tethered to the first draft.
  • Be Mindful of Output Length: Harvey cannot generate a specified number of pages. Instead of asking for a “10-page summary,” guide Harvey by requesting a “thorough” or “detailed” output for longer responses, and use “brief” or “concise” for shorter ones.

Example Prompts

Crafting Prompts for Better Table Outputs

Harvey is great at generating structured tables, but large language models can sometimes produce errors—like misaligned formatting, missing rows, or extra text.

We generally advise using simple prompts in plain language to produce your desired table output first. When that fails, you can try incrementally incorporating the techniques described in this section to make table outputs more reliable.

Follow these techniques in order. Start simple, then add more structure only if needed.

  1. Establish Context
    1. What to do: Begin by describing the source or domain of the content.
    2. Example: “I have attached a lease document.”
    3. Why it helps: Anchors Harvey in the subject matter before formatting instructions.
  2. Define the Task Clearly
    1. What to do: State the exact goal.
    2. Example: “Generate a valid markdown table with 3 columns titled ‘Summary.’”
    3. Why it helps: Reduces ambiguity and ensures Harvey knows exactly what format to use.
    4. Note: Markdown is a simple way of writing text that can be easily turned into clean, formatted documents (like web pages or PDFs) without needing complicated software. A Markdown table is just a grid made with plain text characters (like | and -) that neatly organizes information into rows and columns.
  3. Pre-Specify Rows or Categories
    1. What to do: List the items that must appear in the first column.
    2. Example: “Row 1: Item A, Row 2: Item B.”
    3. Why it helps: Prevents Harvey from skipping or rearranging rows.
    4. Tip: to view a more practical example of how this applies to a prompt, view the full example prompt at the bottom of this article, specifically under ## task.
  4. Provide Fallback Rules
    1. What to do: Tell Harvey what to do if information is missing.
    2. Example: “If a value is not found, enter N/A.”
    3. Why it helps: Avoids made-up content (i.e. hallucinations) and keeps tables consistent.
  5. Enforce Strict Formatting with a Checklist
    1. What to do: Add a checklist of formatting rules.
    2. Example:
      1. Output only the table
      2. Use pipes (|) consistently
      3. Include a header row and separator row
      4. No text before [specify where]
      5. Exactly 5 columns
    3. Why it helps: Prevents extra text and enforces valid markdown structure.
  6. Show a Positive Example
    1. What to do: Provide a sample markdown table in the exact format you want.
    2. Example:
      1. …[your prompt written here]...
        ### Format:
        | [Column 1 Header] | [Column 2 Header] | [Column 3 Header, if any] |
        |---|---|---|
        | [Row item 1] | [Details] | [Details] |
        | [Row item 2] | [Details] | [Details] |
        | [Row item 3] | [Details] | [Details] |
    3. Why it helps: Examples strongly guide Harvey to reproduce the structure.
    4. Tip: to view a more practical example of how this template can be filled, view the full example prompt at the bottom of this article.
  7. Repeat Critical Rules
    1. What to do: Restate important constraints (for example, “exactly 2 columns”) in multiple places.
    2. Why it helps: Reinforces key requirements and reduces the chance of errors.
    3. Tip: Don’t overload prompts with too many examples or rules at once. Conflicting instructions often cause poor quality outputs. Start simple, then layer on complexity only if needed.

Key Takeaways and Full Example Prompt

Key Takeaways:

  • Anchor with context to reduce hallucination.
  • Define the task precisely (columns, rows, titles).
  • Specify fallback rules for missing info.
  • Use a checklist to enforce strict formatting.
  • Add examples and repeat critical rules if problems persist.
Prompt Writing Techniques