If this is how Skynet starts, at least the charts will be pretty.
- Pre-aggregated data, metadata, and low-temperature prompts significantly improve the quality and consistency of LLM-generated repo market analysis.
- LLMs struggle without context; encoding domain knowledge via prompt engineering produces meaningful insights.
- Structured formats enable concise, repeatable, human-like commentary.
I have enjoyed my experience using repo data to explore how large language models (LLMs) interact with structured financial data. From writing python scripts to exploring context windows, here are my early lessons;
- Asking an LLM a question is not a shortcut to understanding. You still have to explore the data yourself.
- Combining multiple tools – LLMs, python and data visualisation — leads to better, faster and more insightful data analysis.
- Pre-aggregating data is essential. It reduces hallucinations, saves tokens and improves clarity.
- LLMs are better summarizers than calculators.
This blog looks at how to move from a basic summary to something closer to what a human analyst might write—by guiding the model with better prompt engineering.
UK Repo Dashboard
I built a Repo Dashboard using UK SFTR data:

I inserted a little GPT “widget” below the dashboard, which sends pre-aggregated data to the LLM for analysis. This reduces token usage, preventing an LLM from becoming overwhelmed when summarising data for us.

However, the summaries produced are poor. Dry, flat and overly descriptive – see below:
The repo market data is categorized based on the venue type and whether transactions are cleared or not. Here is a summarized analysis of clearing behavior across different venue types:
-GB (Government Bonds) Market:
Cleared Transactions: Transactions amounting to approximately $27.87 trillion across 970,291 deals.
Non-Cleared Transactions: Transactions worth about $20.65 trillion processed in 5,997......etc etc
Blah blah blah…. I think that it shows a little bit of potential, but wow is it boring to read! Can I improve it?
Prompt Engineering
Hey ChatGPT – let me help you.
In last week’s blog, humans scored an easy win versus AI. But was it a fair match? My research shows that pre-aggregation and modular workflows allow LLMs to generate more meaningful insights and prevent them from being overwhelmed.
I want to start applying the same approach to the LLM prompt, helping the model think more like me. What context do I bring to the party that helps me see things in the data?
ChatGPT suggested the following would make for a better prompt:
You are a financial market analyst writing for ActrixFT. The data contains aggregated repo data showing weekly totals of amounts lent and number of transactions, broken down by venue type and cleared status.
Please:
1. Identify trends in clearing percentages across different venue types.
2. Highlight structural differences between cleared and uncleared markets.
3. Point out any anomalies or recent shifts.
Be concise and professional. Assume the audience understands repo market structure. Return four bullet points.
A dashboard design tweak quickly allows me to send the pre-aggregated data and the above prompt. The response is improved, but still not something I enjoy reading:
Clearing Trends Across Venues: Notably, the percentage of cleared transactions is significantly lower in the XOFF and XXXX venues compared to GB and NonGB venues. While GB and NonGB venues....etc
Structural Differences: The XXXX venue exhibits a markedly higher volume in aggregate amount lent and number of transactions...etc
Notable Shifts or Anomalies: There is an extremely low number of cleared transactions in the XOFF venue (only 1,734 out of 904,664), which is disproportionate compared......
Adding Context with Metadata
There are clearly things that I know that the model doesn’t know – venue codes like GB and XOFF have specific meanings. So I created a metadata section:
### Data Dictionary and Metadata
- GB: UK Trading Venue
- nonGB: Non-UK Venue
- XOFF / XXX: Off-venue trades
- Cleared: Yes = CCP; No = bilateral
- Amounts are in GBP
This improved the model’s ability to identify structural differences, like:
"Over 90% of off-venue transactions are cleared bilaterally, contrasting the broader market’s shift toward central clearing."
Now I am getting some insight. Still, the model wasn’t consistently repeatable. Sometimes it nailed it. Other times: waffle.
Locking it Down
To guide the LLM even further, I developed the following approach…
- Moved metadata into a CSV so I can easily edit without changing code.
- Lowering the model temperature. This is new to me, but worth doing if you want less “flowery” results.
- Introduced an output format.
- Allowed users to enter custom prompts, appending metadata and tasks in the background.
…and it worked!

I am pleased with the results so far. For example, when I ask the LLM to “Identify key patterns in the data” it now returns;
- 🔍 Key Observation: Off-venue trading (XXXX) has the highest aggregate amount lent at £300.54 trillion for uncleared trades.
- 📉 Implication for market structure: Dominance in size suggests a preference for privacy and flexibility in off-venue trading environments.
- 🔍 Key Observation: Cleared trades at UK Trading Venues represent only 10% of transactions but 57% of the aggregate amount lent.
- 📉 Implication for market structure: Indicates higher average transaction size for cleared trades, suggesting a focus on larger, possibly more standardized deals.
- 🔍 Key Observation: Non-UK Trading Venues have a significantly higher volume of uncleared trades (£119.13 trillion) compared to cleared (£59.35 trillion).
- 📉 Implication for market structure: Reflects potentially differing regulatory environments or risk appetites between UK and non-UK venues.
This approach scores highly on the repeatability scale, but hangs on to nuance in the data.
For example, when prompted with a seemingly innocuous query “Has the amount of clearing changed in the UK over the past year?” it performs particularly well:
- 🔍 Key Observation: UK Trading Venue cleared trades increased by 28% compared to uncleared.
- 📉 Implication for market structure: Stronger reliance on CCPs, indicating a shift towards risk mitigation.
- 🔍 Key Observation: Off-venue trading cleared trades are just 0.5% of uncleared.
- 📉 Implication for market structure: Minimal CCP use off-venue suggests prevailing bilateral agreements.
In Summary
Our prompts are still not perfect by any means – but the content of the outputs is good! I’ve learned that you can create answers that are;
- Concise
- Data-driven
- Repeatable
….by combining metadata with model temperature tweaks and a defined output format.
There is still work to do in tuning prompt structures, refining metadata, and eventually bringing in visual analysis (AI agents anyone?).
Subscribe below for FREE to see more in next week’s blog:


Leave a Reply