← All case studies

Case study · Manufacturing

Formulation and offer assistant

A sales team receives product requests written in plain language, and used to take at least two weeks to answer one. The assistant now replies in the same session: it maps the inquiry to an agreed field structure, returns the ten closest existing formulations with a match score, and drafts the response from the one a sales engineer chooses.

2 weeksMinimum wait for a first reply before
Same sessionFirst reply now
LiveIn production since July 2025
3Engineers, including me as lead
The assistant showing a structured request and the closest formulation match
Real screen. Client name, brands, suppliers, codes, and prices removed.
Client
A European food ingredients manufacturer
My role
Lead engineer. I signed off the architecture and led development day to day.
Team
Me, one AI engineer, and one full stack engineer
Timeline
Discovery from December 2024. Development from June 2025. Releases in July, October, and November 2025.
Stack
Azure OpenAI, Azure AI Foundry, PostgreSQL with pgvector, FastAPI, React, Azure Container Apps

The problem

Customers describe what they want loosely, in an email. A sports powder in sachets with collagen, magnesium and zinc, dose and flavour still open.

Each inquiry was assigned, queued and answered by hand, so a first reply took at least two weeks.

Before and after workflow for the formulation assistant
How a customer inquiry was handled before the assistant, and how it is handled now.

The solution

Similarity search always returns ten results, whether or not any of them fit. So the match score is the product here, not the ranking: it is what tells a sales engineer the top result at 85 percent is worth quoting and the next one is not.

The assistant maps the inquiry to a field structure agreed before development, retrieves the closest formulations with their documents and suppliers, and drafts the reply from the one the engineer picks.

Select any box to see what it does.

Client source pagesHubSpot Daily sync, changes only Formulation and supplier libraryPostgreSQL with pgvector Application Insights traces, Slack alert on a failed sync Customer inquiryplain language ExtractionGPT-4.5 Embeddingtext-embedding-3-large Similarity searchtop 10 with score User selectsformulation and suppliers Weights adjustedmodel suggests, person sets Response draftGPT-4.5, small prompt Internal reviewoptional gate Offer to customer Activity log: every stage, skip, offer, and version, with user and time EVALUATION every model output has a check that can fail Extraction checksField by field against thestructure agreed with theclient before development Retrieval golden setRequests with a known exactrecipe. Checks the right matchranks first, with its score Domain reviewA project manager from theclient team checked theproduct knowledge throughout Release gateRe-run the set on everyprompt or model change.Not automated in this release FastAPI and React on Azure Container Apps. Models served through Azure AI Foundry.
Customer inquiryThe sales user enters the inquiry as the customer wrote it. Nothing needs to be reformatted first.
Simplified. Client systems are generalised. Green boxes are the checks that can fail; the dashed one was run by hand in this release.

Components

Extraction

GPT-4.5 maps the inquiry to the field structure agreed with the client before development. A field the inquiry does not state stays empty rather than being guessed.

Retrieval

The structured request is embedded and matched against the formulation library in pgvector. Ten results come back, each with a score, its specification and pricing documents, and its suppliers.

Human selection

The user compares up to three matches and chooses the formulation and the manufacturers. The assistant suggests. It never selects.

Weight adjustment

The model proposes ingredient weights. The sales engineer applies a multiplier before the offer is final, so commercial judgement stays with the person who owns it.

Daily sync

A pipeline loads only what changed in the client source pages. A new formulation appears in the assistant the next day, and a failed run raises a Slack alert.

Evaluation

Extraction is checked field by field. Retrieval is checked against a golden set built from requests with a known exact recipe, so the right formulation has to rank first, not merely appear.

Review gate

An optional internal review before the offer goes out. Skipping it is allowed, and the skip is recorded against the user who did it.

Audit trail

Every stage change, skipped review, offer and formula version is logged with the user and the time, so any offer can be traced back to who decided what.

Tech stack

Models

GPT-4.5 on Azure OpenAItext-embedding-3-largeAzure AI Foundry

Retrieval

PostgreSQLpgvectorSimilarity search, top 10

Application

FastAPIReactAzure Container Apps

Data and operations

Daily sync from HubSpotSlack alertsTracing dashboardFull activity logging

Product screens

New request in plain language

1 of 5

Real screens. Client name, brands, suppliers, codes, and prices removed. Select a screen to enlarge it.

Results

Before

At least 2 weeks

A first reply to the customer, after the inquiry had been assigned, queued, and answered by a manual search of the formulation documents.

After

Same session

The reply goes out while the inquiry is still open, built from a matched formulation and the suppliers who can actually deliver it. In production since July 2025.

The hardest part was not the model. The formulations lived in internal client pages never meant to be read by a machine, and extracting them reliably took longer than building the agent.