GPT-4o fine-tuning
for customer live chat.

I built a Python application that combined the fine-tuned model with retrieval of product and policy information.

PythonFine-tuningRetrievalData engineering

Overview

I made a fine-tuned machine learning model to accurately answer customer live chats as well as a trained human with up-to-date company policy and product information that was performant enough to converse with real customers in real time. I did this work over the summer of 2024.

Data processing74,000+ messages
Retrieval index2,402 embeddings
Project contextSummer 2024

Explore the project

The application

I built a Python application that combined the fine-tuned model with retrieval of product and policy information. We then commissioned the developer of the company’s live chat software to integrate my application into the existing system, allowing sales staff to use AI suggestions within their usual chat interface.

Evaluation and outcome

The head of sales reviewed the first fine-tuned model, and judged its responses to be below the standard of trained sales employees, making it unsuitable for deployment. After I manually curated the training data and retrained the model, he judged its conversational performance to be good relative to that of a trained sales employee. The model already demonstrated general knowledge of diamonds and jewellery but showed improved alignment to the sales process after retraining. Company-specific product information and policies were introduced later through a vector database so it would always know the latest product and policy information.