Prompt Best Practices
The questions or commands you give to Pagos AI are known as prompts. Prompts can be straightforward industry questions (e.g. “What is an issuing bank?”) or questions about your specific payments data (e.g. “What was my chargeback rate last week?”). You can also go a more direct route and tell Pagos Copliot exactly what you want to see, for example, “Show me my monthly approval rate for Visa card transactions from January until July 2024.” However you decide to style your prompt, follow these best practices to ensure Pagos AI understands your needs and responds appropriately.Include Specific Prompt Elements
When designing a prompt—especially one designed to illicit bespoke payments data visualizations—try to include some of the following elements:- Metric - State which common payments metric you want to see data for. Examples include approval rate, transaction count, chargeback value, etc.
- Date range - Set a timeline for the data (e.g. November 1, 2023 - June 30, 2024). If possible, go one step further and also state how you want the data from this time period grouped. For example, broken down into monthly increments, weekly, or daily.
- Data segment - If you don’t want to view a metric for all of your payments volume, state the specific segment you’re interested in. Use the list of filter options as a guideline. For example, you may only want transaction data for a specific payment method, card brand, customer country, or issuing bank.
- Data Visualization Type - Specify how you want to view the data; see the section below for a list of possible data visualizations.
“I want to know my top performing markets.”More Specific Prompt:
“What are my top 5 customer countries in terms of total approved transaction value this year?”
Avoid Complex Prompts
Always write your prompts using simple sentence constructions and make your instructions very explicit. Imagine you’re explaining a cooking recipe to a beginner; you want to get to the point and leave as little room for ambiguity as possible. If Pagos AI doesn’t provide the results you’d expect, try rewriting the prompt to use more basic and straight-forward language. Pagos AI follows the context of steps within the same working session. As such, you can break complex questions into a series of small requests input individually. You may not start a session with Pagos AI knowing exactly what information you want, so breaking up questions in this way reflects the natural flow of a conversation. Start with a simple request, clarify your goals as you reflect on each step in the dialogue, and steer the conversation accordingly. Example of a prompt that’s too complex:“For the top 10 BINs with the highest attempted transaction value, chart their approval rates over the past six months, shown in a monthly graph, restricted to USA for credit card transactions only.”The danger with this one is that Pagos AI may perform a query and analysis, but is more likely to make choices in setting up the analysis that don’t correspond to your intentions. Instead try the a series of prompts:
“In the last 6 months, what were my top 10 BINs in terms of attempted transaction value for credit cards issued in the US?”
“What were the approval rates for those same BINs in that time period?”
“Chart the monthly approval rates for those BINs over the last 6 months in a line graph, with each BIN having it’s own line”Following this thread, Pagos AI produced the following visualization:

Request Summaries and Recommendations
Pagos AI doesn’t just show you data—it knows as much about payments data as the Pagos team does. If you’re not sure how to summarize or explain a visual to your leadership, for example, ask Pagos AI for suggestions! This can be as simple as “Summarize what we learn from this data?” or “What are the top three takeaways?” The tool will respond with structured content you can copy-paste directly into communications with your team. You can even ask Pagos AI for recommendations. This can be recommendations on what else you should investigate in your payments data, or suggestions for how to act on the data you’ve already pulled. To ensure Pagos AI’s recommendations fit your needs, specify your end goal in your prompt. For example, if your main focus is increasing revenue or reducing fraud, include these goals in your prompt.Pagos AI Data Insights
Pagos AI generates the best form of data visualizations necessary to answer your specific questions. Sometimes, this means creating a visual from scratch unlike any others available in the Pagos Service Panel. You can ask for the following visualization types:- Vertical bar graph
- Horizontal bar graph
- Stacked bar graph
- Line graph
- Pie chart
- Heatmap
- Table
Example Prompt
“Show me the monthly transaction count in Canada from March 1 to June 30, 2024?”For this example, we’ve included the following elements:
- Metric: Transaction count
- Date Range: March 1 - June 30, 2024
- Data Segment: Customer country of Canada

“Show me the percentage change of that data month over month.”

A Technical Approach to Prompting
Behind the scenes, we use Matplotlib and Seaborn libraries to power Pagos AI data visualizations. If you’re familiar with these Python libraries, you can write prompts to request specific formatting of the graphs AI returns. You can also edit the content of graphs after the fact by asking for a replot. Following our recommendations around avoiding complex prompts, you’ll generally get better results by starting with a simple chart, then iterating by asking for only a few changes with each new input message (rather than trying to include every detail in a single message). Let’s walk through a multi-prompt example:Prompt A: “Plot my approval rates using a line for each stored credential, covering the past 3 months at a daily level. Use the Seaborn library theme darkgrid.”Response:

Prompt B: “Replot this up to September 1st, and remove the “unknown” category from the chart. Fix the y-axis between 80% and 100% with subticks for every percentile, but only label the even values. Make the x- and y-axis labels and the tick labels use a larger font, and ensure that the title font is 3 points larger than that. Use a linewidth of 2 units, but the same size marker. Add large open red circles around the values for card on file that fall below 91%.”Response:

Prompt C: “Display working python code that reproduces this plot exactly. Assume that the approval rate data is stored in a dataframe namedResponse:df
with these dates in the index and the stored credential column namedstored_credential
.”
Prompt D: “Create a similar plot where the approval rate lines use an alpha of 0.3. Then, calculate the straight line of best fit for each, ignoring the values below 91%, and overlay those lines on the plot using a solid, thick line of the same color corresponding to each type of stored credential time series. Add a box to the chart that indicates the slope of each fitted line to two significant figures.”Response:

Prompt E: Express those best fit gradients in a sentence about the rate of change of approval rate as percentage points, adjusted for time units of months instead of days.Response: Here are the sentences describing the rate of change of the approval rate per month for each stored credential type, based on the gradients computed earlier from the best fit lines:
- Card-on-file-repeat: The approval rate is increasing at a rate of approximately 0.207 percentage points per month.
- Card-on-file-vault: The approval rate is decreasing at a rate of approximately -0.573 percentage points per month.
- One-time: The approval rate is increasing at a rate of approximately 0.318% percentage points per month.