All work

Case 03 · Commodity trading · AI

TradeLens AI

Traders ask for trade data in plain language inside Microsoft Teams — and every figure comes from the source, never from the AI.

Client
Swiss-based international commodity trading company
Industry
Commodity trading, financial technology, AI
Duration
4 months
Confidentiality
Project name, client name and client data are anonymised.
0trade figures generated by the AI — every number comes from the data provider
Teamswhere traders already work, and now ask their questions
10–30 secper request, down from 5–10 minutes of manual searching (estimated)

01

The problem

The data existed. Getting to it was the problem.

Commodity traders need international trade intelligence fast, for time-sensitive decisions. Getting it meant opening specialised platforms and setting filters by hand for every question.

Filters for every question

  • Country of origin
  • Destination country
  • Commodity and classification
  • Trade direction
  • Date range
  • Trade volume and value

Traders wanted to just ask — in plain language, inside Microsoft Teams. The goal was to shrink the time between a question and the answer.

02

The solution

AI as the interface, not the source.

We designed and implemented a conversational trade intelligence assistant inside Microsoft Teams. A large language model turns a trader's request into a structured query against external trade data APIs — but it never supplies the numbers. Every figure comes from the data provider.

Example conversation

Show me all aluminium exports from China to France in 2026, including monthly volumes and total trade value.

Understood as

Origin · ChinaDestination · FranceCommodity · AluminiumYear · 2026Direction · Export
Monthly volumes and total trade value — retrieved from the trade data provider and calculated by the backend, then summarised in the chat.

Follow-ups, without repeating the search

“Compare that with Germany.”“Show me the previous year.”“Break it down by month.”“Which month had the highest volume?”

The AI model is responsible for

  • Understanding the request
  • Identifying intent
  • Extracting search parameters
  • Resolving follow-up context
  • Picking the right data operation
  • Presenting results clearly

The backend is responsible for

  • Validating AI-generated parameters
  • Calling the external trade API
  • Retrieving the actual trade data
  • Running deterministic calculations
  • Aggregating records
  • Enforcing security and business rules

03

Implementation

How a question becomes an answer.

Request flow

Microsoft Teams.NET orchestrationAzure OpenAIParameter validationTrade intelligence APIProcessing & aggregationAnswer in Teams

The model handles intent, parameter extraction and follow-up context through function calling and structured outputs. The .NET backend validates every parameter before it calls the trade API, maps commodities to HS classification codes and does all calculations deterministically.

Stack

Microsoft Teams bot.NETAzure OpenAIFunction callingStructured outputsHS code mappingAzure Key VaultSecret rotationMonitoring & logging

04

What went wrong

Making AI precise enough for trading.

Issue

Traders use ambiguous names, jargon, abbreviations, partial places and relative dates. “Aluminium” can mean raw metal, alloys, scrap or finished products — each with different classification codes.

Fix

Structured output schemas, controlled function calling, commodity classification mapping and clarifying questions when a request is ambiguous.

Issue

A wrong interpretation still produces a valid API call — just with commercially useless results.

Fix

Every AI-generated parameter is validated and normalised by the backend before anything runs.

Issue

In trading, an invented figure could drive a real decision.

Fix

A hard line between AI interpretation and deterministic retrieval and calculation. Answers are grounded in source data only.

05

Finalisation

How it landed.

Traders get trade intelligence where they already work and can explore it conversationally, without repeating themselves. The same architecture is a reusable base for AI access to other enterprise data.

Estimated impact

10–30 secper request, vs 5–10 minutes setting filters by hand
90–98%less time spent retrieving trade data
10–60×faster from question to answer

Estimates based on typical manual retrieval times.

Impact

  • Trade data inside Microsoft Teams
  • No separate apps or manual filter setup
  • Less technical knowledge needed to query trade data
  • Less switching between applications
  • Conversational follow-ups on any answer
  • A reusable foundation for AI over other enterprise data

Lessons learned

  1. 01Enterprise AI should be an interface to reliable data, not a replacement for it.
  2. 02Always validate AI-generated parameters before acting on them.
  3. 03Domain terms need explicit handling and normalisation.
  4. 04Keep calculations deterministic, in the backend.
  5. 05AI inside existing workflows beats standalone AI apps.

Next case · 04

Engineering360