Skip to main content

How to write effective prompts for Excel Agents

Industry-standard prompt engineering best practices applied to DataSnipper Excel Agents, with structured examples for finance and audit workflows.

Effective prompt engineering is a prerequisite for reliable, repeatable outcomes when working with AI Agents. Across the industry, prompt design is increasingly treated not as creative writing, but as an engineering discipline: clear intent, structured instructions, and explicit verification logic materially improve agent reliability. This article translates industry-wide prompt engineering best practices into the context of DataSnipper Excel Agents.

What are Excel Agents?

DataSnipper Excel Agents move beyond automation to bring intelligence directly into Excel. Instead of working through manual steps, you describe what you want to achieve and the Agent takes care of the execution. From reading source documents and reconciling data to applying audit and finance logic, Excel Agents execute complete tests end to end. The result is transparent, explainable output that is fully traceable back to the underlying evidence and ready for review.

Availability: Excel Agents are available in DataSnipper v26 and later.

Step 1: Start with a clear goal and success definition

Best practice: Clearly state what you want the agent to achieve and what a "good" outcome looks like.

Why this matters: State the objective in operational terms, not abstract analysis. Describe the artifact you expect to exist in the workbook once the agent is finished (e.g., a table, reconciliation, or set of Snips), not just the analysis you want performed.

Example:

"Create a reconciliation table that ties the AP subledger total to the GL AP control account for October to December. Include columns for Subledger Total, GL Total, Variance, Variance %, and a short explanation of likely drivers. Flag any variance above €500."

Step 2: Explain why instructions exist, not just what to do

Best practice: When giving rules or constraints, briefly explain their purpose.

Why this matters: This reduces brittle rule-following and allows the agent to reason correctly when encountering edge cases. It reinforces intent and improves adherence without increasing prompt complexity.

Example:

"Use only posted transactions dated within the test period (based on Posting Date), because our procedure tests the completeness and accuracy of the final ledger population for that period. Exclude drafts and unposted items so the population reflects what is actually recorded in the financial statements."

Step 3: Structure prompts explicitly

Best practice: Use a clear, repeatable structure for prompts.

Why this matters: Well-structured prompts reduce cognitive load for the agent and make instructions easier to follow.

Recommended structure:

  • Context: What data is being used and why

  • Instructions: What actions to take, in what order

  • Output expectations: What should be created or returned

Clear separation prevents the agent from confusing background information with executable instructions.

Example:

Context: "Sheet 'GL_Detail' contains transactions; 'Trial_Balance' contains period totals."

Instructions: "1) Filter GL_Detail to period and account range. 2) Summarize by account code. 3) Compare to Trial_Balance. 4) Identify mismatches."

Output expectations: "Create a new sheet 'Tie-Out' with summary table, variance flags, and a short note on exceptions."

Step 4: Be specific about outputs and formatting

Best practice: Explicitly define the expected output format. Specify whether the output should be a table (with named columns), Snips linked to source documents, formulas, totals, or checks, and call out specific number formats or precision. This removes ambiguity and reduces rework.

Example:

"Output a table in a new sheet called 'Exception_Log' with columns: Document ID, Vendor, Invoice Date, Amount, GL Account, Matched GL Amount, Variance, Evidence Snip Link, Reviewer Note. Format currency as EUR with 2 decimals and add a totals row."

Step 5: Break complex work into steps

Best practice: Decompose multi-part tasks into sequential steps (e.g., extract, then compare, then summarize). Sequential instructions improve execution quality and make intermediate results easier to review.

Example:

  1. Extract invoice totals and invoice numbers from the selected documents into a table.

  2. Normalize invoice numbers (remove spaces and dashes).

  3. Match to GL entries by invoice number and vendor.

  4. Summarize match rate and list exceptions with reasons.

Step 6: Iterate deliberately and maintain prompt versions

Best practice: Treat prompt development as an iterative process and retain versions. Store prompts directly in the workbook (e.g., a dedicated worksheet). This creates an audit-friendly record and makes successful prompts easy to reuse and share.

Example "Prompts" tab:

  • v1: Initial extraction prompt

  • v2: Added rule for posted transactions only + rationale

  • v3: Added exception log format + self-check steps

Keep each version with a short note: "what changed" and "why it improved".

Step 7: Use reasoning techniques intentionally

Best practice: Explicitly guide reasoning for complex analysis. Ask the agent to reason in stages (summarize, then compare, then flag, then explain). Avoid vague requests to "think step by step" without defining what those steps should be.

Example:

  1. Summarize the population (counts, totals, time range).

  2. Compare key totals to the control total.

  3. Flag exceptions above threshold and categorize likely causes (timing, mapping, missing entries).

  4. Produce a concise exception narrative suitable for a workpaper.

Step 8: Develop internal enablement practices

Best practice: Actively invest in internal enablement around prompt usage when adopting Excel Agents. Teams that see sustained value from AI agents treat prompting as a shared capability rather than an individual skill. Without intentional enablement, effective prompts stay isolated, inconsistent, or relearned repeatedly.

Effective practices:

  • Develop internal prompt champions. Identify power users who own crafting, refining, and validating prompts. They act as a reference point for teams and align prompts with firm methodologies and assurance expectations.

  • Curate a shared prompt library. Maintain a collection of proven prompts within workbook templates. This reduces duplicated effort and gives new or infrequent users a starting point.

  • Share best practices and learnings. Document what worked, what did not, and why. Sharing patterns, pitfalls, and improvements institutionalizes prompt quality and builds confidence in agent-assisted workflows.

Verification is non-negotiable

Excel Agents, like any generative AI, can occasionally miss details or be less than fully accurate, especially when context is ambiguous. Outputs may look correct at first glance, so always review them before relying on them.

Excel Agents are grounded in your documents and outputs should always be traceable back to source evidence using Snips. Instead of assuming the generated answer is accurate, you should:

  • Review the underlying Snips to see exactly where the information comes from.

  • Open the source documents to validate context, completeness, and accuracy.

  • Confirm that the evidence actually supports the conclusion.

Use the thumbs up or thumbs down button to flag a response as helpful or not, or write to support.datasnipper.com with feedback.

Did this answer your question?