NewsTechTrends

Beyond simple productivity hacks: biggest value unlocks we’ve delivered with AI

Generative AI

The current hype around Generative AI (Gen AI) is undeniable. The euphoria has partly been fueled by tools like ChatGPT and Midjourney racing into mainstream adoption with millions of users worldwide, giving the masses, for the first time, a taste of what’s possible. These tools can deliver huge efficiency gains for the average knowledge worker and sometimes even for creative collaboration (here’s how Shann Puri, host of the popular podcast MFM uses ChatGPT to help him write movie scripts). 

At Calcey, while we’ve been keen to adopt these tools (here’s how we tried writing software product spec with ChatGPT), and we’ve always had the belief that focusing on solving core business challenges, rather than hyped-up tools is the way to unlock big value. Here are a few examples of key business challenges we’ve been tackling using AI.

AI to Improve Product Search, User Experience, and Conversion

For many businesses, the accuracy and ease of product search can significantly impact user experience and conversion rates. For e-commerce or online lead generation businesses this is a central part of their business and hence a better experience directly translates to a competitive advantage. 

One of our clients, Biocompare, is a leading resource for product information in the life sciences industry, hosting over 10 million products. The site’s users rely heavily on academic citations to make informed purchasing decisions. Hence, Biocompare had implemented a keyword-based matching system to automatically draw in citations related to listed products. This approach often resulted in inaccurate citations, hence it was fine tuned with filters that would remove many valid citations as well, leading to lost opportunities.

To address this problem, Biocompare’s internal team and Calcey collaboratively developed a transformer model architecture similar to ChatGPT’s, enabling context-aware matching of academic literature with products. In layman’s terms the new model looks at the surrounding words for a given keyword (i.e. the rest of the sentence) to understand the context and thereby what is being referred to. For instance, this enables us to identify whether it’s a company, product, disease, technique etc. 

Let’s illustrate what this means with an example. Let’s say we present the following sentence to our model “___________ is a major global health issue with more than 350,000 newly diagnosed cases per year with associated mortality rate reaching around 45%.” Given the context of the sentence our model would understand that “____” refers to a condition/disease. 

Specifically, we fine-tuned a pre-trained language model with a small, labelled dataset of academic papers. This approach is currently being trialed and shows promising signs that it can provide an order of magnitude more citations to users with higher accuracy. 

Streamlining Product Discovery

Another client, a major motor spare parts distributor, faced challenges with their multi-step product configurator, which was cumbersome for users. We realized that this multi-step search process can be greatly simplified with a bot that users could type their queries into using natural language and we started working on proving this hypothesis with a prototype. This client carries 30,000 spare parts spread across around 100 brands and 5,000+ models, hence this would be no small task. 

Calcey’s data science team converted the information for each product in the client’s inventory into numerical representations, known as embeddings, and saved them in a vector store. Embeddings convert human-readable data into mathematical representations that capture the meaning of the data. Then we followed these steps;

  1. Named Entity Recognition: The bot would identify the vehicle make, vehicle model, and the part name from the user’s initial query. If any of these necessary pieces of information were not provided, the bot would request it from the user.
  2. Vector Similarity Search: The embeddings for the provided information would then be calculated and matched against the product embeddings to reorder the whole product list by relevance.
  3. Retrieval-Augmented Generation: The most relevant products would be shortlisted and provided to the bot, which would then use this information to return a response to the user. 

Our proof of concept demonstrated that it is indeed possible to improve product search experience vastly with Gen AI. The initial approach we tried incurs significant cost for the LLM usage. We are now trying several different approaches to make it more cost effective. 

AI for Personalization at Scale

Personalization is becoming a critical factor for business success. According to Gartner, by 2026, 30% of new applications will use AI to drive personalized adaptive user interfaces, up from less than 5% today. 

A long standing client – Fresh Fitness Food (FFF), a London-based startup, provides personalized meal plans tailored to each customer’s macronutrient requirements. They cook, pack and deliver over 80,000 meals in London monthly, each with individualized portions. The complexity of balancing proteins, carbohydrates, and fats in each meal while providing meal variety is further compounded by having to account for allergies and meal preferences. All of this has to be done while maximizing economies of scale for FFF. 

Given our experience with this extreme personalization problem, our data science team recently tried to create a generic solution for such a complex personalization scenario. We started off by identifying that this is technically an optimization problem. With this realization we developed a solution as follows:

  1. Data Collection: We gathered detailed nutritional information for all possible meal components, as well as constraints imposed by recipe requirements. 
  2. Optimization Problem Definition: We defined the variables (e.g. quantities in grams of grilled chicken breast, boiled broccoli, and brown rice), constraints (e.g. quantity of brown rice should be at least 2 times the quantity of grilled chicken breast), and objectives (e.g. total protein, carbohydrate, and fat content should be 135 g, 296 g, and 63 g respectively) of the algorithm explicitly.
  3. Optimization Algorithm: We implemented an optimization algorithm that gets as close to the defined objectives as possible, given the variables and their constraints. We settled on using a Greedy Search Algorithm that provided a good balance between speed and accuracy. 

Details of our exact approach along with the supporting mathematical proofs are available here. 

Training an AI Bot to Answer Questions Based on a Set of Documents/Policies

In the realm of customer service and internal knowledge management, AI can revolutionize how information is accessed and utilized. Given that this is one of the most popular use cases for LLMs, we tried our hand at it with an internal product. We currently also serve a client, disrupting the tax industry with AI, that uses a similar prosperity tool to answer questions related to the US tax code. 

The challenge we gave our AI team was to develop a bot that could answer HR policy related questions from our employees that our internal HR team would periodically receive. The answers had to be based on our HR policies, all of which are documented. 

Here’s how we tackled this:

  1. Document Embeddings: We calculated the embeddings for the entire set of policy documents. Embeddings represent human-readable data as a set of numbers that capture its semantic meaning.
  2. Vector Similarity Search: When a user asked a question, the bot calculated its embeddings, compared it with those of the HR documents, and retrieved the most relevant information.
  3. Retrieval-Augmented Generation (RAG): The bot then used this retrieved information to generate a response to the user’s question. By referencing the policy document and the exact sections it was basing its answer on, the bot enables the user to verify the response and get further information. 
  4. Fine-tuning Prompts: We fine-tuned the LLM with appropriate prompts to only answer based explicitly on the policy documents fed to it (to minimize hallucination) and provide a standard “please contact the HR team” response for queries outside these boundaries. 

This approach allowed us to build a highly effective AI bot in quick time. Here are the exact steps we followed and the prompts we used.

Closing thoughts

At Calcey, we pride ourselves on our ability to solve complex business problems using the most appropriate technology. Get in touch, if you’re a business owner looking to collaborate with a team that can quickly grasp business problems and leverage the latest tools to swiftly deliver proof of value.