Best Practices for Agent Prompting (Agents)

How to Write Good Prompts for Pricefx Agents? This guide shows business users how to write effective prompts for the Pricefx Agents when working through the Pricefx Copilot or PlatformManager.

The guide provides 3 levels of details for can be provided for prompts:

Key Elements of Effective Agent Prompts

The following components are essential when designing prompts for Agents.

  • Clear Business Objective

  • Scope

  • Time Window

  • Methodology

  • Key Pricing Metrics & Thresholds

How Copilot & Agent Generator Use Your Prompt

When you write a prompt like:

:question_mark:

Create an agent that finds customers with high revenue but low margin over the last 12 months…

The Pricefx Copilot sends this prompt to the Agent Generator service, which:

  1. Interprets your business objective and requirements to define a structure to the Agent.

  2. Detail the Methodology and Metrics.

  3. Define the Series and potential Join Series.

  4. Define the Thresholds.

  5. Define the Actions.

The more the prompt is detailed, the more it is defined for the agent generator to match to the requirements. If unsure, the agent generation will provide the approach that makes the most sense.

Key Takeaways

  • Always start Agent-creation prompts with “Create agent…”. This tells Copilot you want to build an Agent, not just run a one‑off analysis.

  • Your prompt should describe the analysis / the expectations (what to monitor, compare, and flag), not the exact downstream workflow steps (emails, approvals); those belong in the Action definition and workflow configuration.

Level 1 – Basic Prompt (2 – 4 Sentences)

Objective

:logo_goals:

Get a first working Agent quickly.

Specification

You specify the following:

  • Objective – What the Agent should identify (e.g. “high revenue but low margin customers”).

  • Scope – Level of analysis and segments (Customer vs. Product, Region, Segment).

  • Output – What do you want to receive from the Agent.

You do not yet need to specify:

  • Formulas.

  • Ranking methods, or detailed thresholds.

Best Use-case

  • You are exploring a new idea.

  • You want to see if the underlying data supports it.

  • Or you want a starter Agent that you will refine later.

Basic Example

Margin Shortfall (High Revenue / Low Margin)

Business Goal
:logo_goals:

Find big customers with strong revenue but weak margin – the classic “margin shortfall” pattern.

Basic Prompt for Copilot
:question_mark:

Create an agent that checks whether recent cost increases for our products have been passed through to customer prices effectively.
Highlight product–customer cases where cost has gone up but prices have not followed so we can review them.

This prompt gives the Agent Generator enough information to:

  • Objective – Cost increases vs. Price increases.

  • Scope – Product and Customer combinations.

  • Output – A list showing cost/price changes.

Level 2 – Enhanced Prompts (Add methodology, Metrics, Thresholds)

Specification

To get to the next level, you need to specify the following information.

  • What is really a “big” customers?

  • How exactly should we measure margin shortfall?

  • Which results are too small to care about?

  • What time period you would like to consider?

Additional Information for Prompt

Level 2 prompts keep the same natural‑language style, but you need to add the following methodology.

  1. How to aggregate

    1. By Customer

    2. By Product

    3. By Segment

  2. How to compare

    1. Current vs. Previous period vs. Benchmark

  3. How to rank

    1. Revenue rank

    2. Margin rank

  4. What to filter out

    1. Low volume

    2. Returns

    3. Quotes

Add any detail of the approach what is important for you, like specific metrics.

Metrics & Thresholds

  • Which key metrics to compute

    • Margin %

    • Margin gap

    • Revenue uplift

    • Pass‑through ratio

  • Numeric thresholds (e.g., top 20 % revenue, pass‑through < 0.8, revenue uplift > 5k).

Enhanced Prompt for Copilot

Create agent that measures cost pass-through effectiveness for our products at the product–customer level and flags cases where price has not kept pace with rising costs.

Use sales data with product ID and name, customer ID and name, region, net price per unit, revenue, quantity, cost per unit, total cost, and margin %.
Filter the last 90 days versus the previous 90 days in a separate series.

For each product–customer combination:
- Calculate average cost per unit, average price per unit, revenue, and margin % for the “current” 90-day period.
- Compute cost change % and price change % between the two periods.
- Compute a cost pass-through variance = price change % - cost change %.
- Compute suggested price per unit, estimated revenue uplift, and estimated margin uplift.
- Add current revenue and current margin % 

Only consider combinations where revenue is at least 10,000 in local currency and cost change % is at least +5% (costs have clearly moved up).

Flag product–customer combinations where:
- The cost pass-through variance is below 0.01 (i.e., price is not keeping up with costs), and
- The estimated revenue uplift from fixing pass-through is at least 5,000 in local currency.

Key Takeaways (Basic vs. Enhanced Version)

  • Methodology – Two explicit time windows, request explicitly cost change %, price change %, and cost pass‑through variance, including the formula.

  • Additional Metrics – Suggested price, Revenue uplift, Margin uplift.

  • Thresholds – Revenue ≥ 10k, Cost change ≥ 5 %, Pass‑through < 0.01, Uplift ≥ 5k.

Level 3 – Detailed Prompts with Full Specifications

At Level 3, your prompt is effectively defining with many details what is expected.

Template

We suggest to use the following template, which has these sections:

  • Analysis Name Short descriptive label.

  • Objective – What the Agent detects and why it matters.

  • Methodology How to aggregate, Compare, Rank, and Detect outliers.

  • Data Scope and Time Range – Periods, Current vs. Comparison, Rolling windows.

Suggested Additions

  • Detection Frequency – How often the Agent should run.

    • Daily

    • Weekly

    • Monthly

  • Metrics & Thresholds – KPIs, Cut‑offs, Impact measures.

  • Notes

    • Business problem

    • Opportunities

    • How insights will be used

    • Success criteria (not hard revenue targets)

Detailed Prompt for Copilot

Create agent that measures cost pass-through effectiveness for our products at the product–customer level and flags cases where price has not kept pace with rising costs.

Use sales data with followint grouping:

Product: Product ID, Product Name
Customer: Customer ID, Customer Name
Geography: Region

Series 1: Current period with last 90 days
Series 2: Previous period: the 90 days immediately before the current period so from 180 days to 91 relative to “today”.

Include the following metrics in each serie: 
- Price per unit
- Revenue (net sales value)
- Quantity
- Cost per unit (sum of costs/sum of quantity)
- Total cost 

Create a join series each product–customer–region combination
and include the following metrics: 
- Current revenue 
- Current quantity 
- Current average price per unit
- Current total cost
- Current average cost per unit
- Current margin %
- Previous revenue
- Previous quantity
- Previous average price per unit
- Previous total cost
- Previous average cost per unit
- Previous margin % = (Current average price per unit ÷ Previous average price per unit) – 1
- Cost change % = (Current average cost per unit ÷ Previous average cost per unit) – 1
- Price change % = Current average price per unit ÷ Previous average price per unit) – 1
- Cost pass-through variance = Price change % – Cost change %.
- Suggested price per unit = Previous average price per unit × (Current average cost per unit ÷ Previous average cost per unit).
(Interpretation: “What the price would be now if it had fully followed the cost change proportionally.”)
- Estimated revenue uplift = (Suggested price per unit × Current quantity) – Current revenue. As the Incremental revenue if we applied the suggested price to current volume.
- Estimated margin uplift = Current revenue × (Previous margin % – Current margin %). As the Recoverable margin if we restored the previous margin % on current revenue.
- Estimated margin uplift (percentage points) = Previous margin % – Current margin %

Apply the following thresholds:
- For minimum business relevance: Current revenue > 10,000
- Clear cost movement: Cost change % > +5 %
- Insufficient pass-through: Cost pass-through variance < 0.01

Run the agent on a rolling basis, every monthly.

This agent is called: "Cost pass-through effectiveness Agent"

Practical Workflow (Start Simple and Iterate)

In practice, a good Agent often emerges over two or three iterations.

1. Start with a Level 1 Prompt

1.1 Type a 2–4 sentence Basic Prompt into the Copilot.

1.2 Let Agent Generator create the Agent.

1.3 Check if results are in the right ballpark (scope, metrics, time window).

2. Refine with a Level 2 Prompt

If the logic is too broad or noisy, rephrase your prompt into the Enhanced version.

2.1 Add methodology (How to aggregate/Compare).

2.2 Add explicit metrics and thresholds (Margin gap, Revenue rank, Pass‑through ratio, Minimum uplift).

2.3 When you know exactly what you expect, you can detail more the prompt and reach the Level 3.

3. Iterate Based on Business Feedback

Encourage users to feedback:

  • Are there too many false positives?

  • Are important cases missing?

  • Adjust thresholds and methodology.

Troubleshooting

If Agent creation fails or results are clearly wrong:

Simplify Prompt

  • Remove nested conditions and very complex logic.

    • Focus on one objective per Agent (e.g., just margin shortfall, not margin shortfall at multiple levels of aggregation with prioritization).

  • Check in the fields have been properly defined in the Sales Insights Mapping.

  • Avoid special characters & technical syntax.

  • Check your metrics exist.

    • Use metric names that match your Sales Insights/Transactions Datamart Labels (Margin %, Revenue, Discount %, etc.).

Tighten Thresholds

  • If results are noisy, raise minimum revenue/volume thresholds or tighten margin/discount gaps.

    • If you see nothing, loosen them.