When I started working with Getaway to develop scoring algorithms for flights and hotels, I knew we had to approach the task out of the box. The challenge was to create a system that could evaluate and rank thousands of travel options according to complex criteria. Instead of traditional methods, we chose advanced language models such as ChatGPT and Llama.
How was the process of working with language models? We break down our approach in detail.
Problem: Challenges of creating business requirements using large language models
Organising travel on the Getaway platform required flexible and precise algorithms to score flights and hotels. To this end, we used advanced language models such as ChatGPT and Llama to create a unique scoring system. The challenge was to adapt the algorithm to the specific needs of Getaway and its users, taking into account parameters such as the number of connecting flights, departure time, hotel location and quality of amenities.
Creating a scoring system for flights required a thoughtful approach. The main goal was to create an algorithm that could score different flight and hotel offers based on a number of factors – not only such as price, but also the quality of the amenities offered and the specifics of the trip.
This is where the ability to test different approaches and quickly iteratively adjust the context of the prompts was key.
Prerequisites:
✅ We use large language models (ChatGPT, Llama) to create a scoring system for flights and hotels
✅ The aim is to adjust the evaluation of offers based on parameters such as price, number of connectingflights, duration, hotel location, etc.
Description of the problem:
The first tests showed that finding the right parameters for scoring is more complex than we expected. We are keen on an algorithm that takes into account both user preferences and the specific characteristics of each offer. What to do?
Sounds like a complicated process. Has the use of LLM introduced additional challenges?
Yes, finding the right context for the prompts proved crucial. I looked for inspiration in the available databases, but these kinds of case studies are still rare. What is your approach to iteration?
We created an iterative design process for the prompts, so we could quickly adjust the context and improve the scoring. In the end, it only took us a few days to get an MVP that addressed our main requirements:
- Working with context – for flights, we took into account parameters such as price, number of connecting flights, flight time, etc. We tested different combinations to find the most effective one.
- We have implemented a scoring system that adjusts scores based on preferences, e.g. higher prices or more transfers result in negative points.
What about the implementation of the algorithm in the test environment? Were you able to make all the adjustments during testing?
#1 Working with prompts – context and iterations
At the initial stage, we focused on designing prompts that appropriately contextualised the scoring requirements. For flights, key factors included:
- Price,
- Total flight time,
- Number of transfers,
- Departure/arrival times,
- Number of airports visited.
Using an iterative approach, we developed the MVP of the scoring algorithm in just two days, which allowed us to quickly get an initial picture of the model's effectiveness and conduct the first tests.
#2 Implementation of a reward and punishment mechanism
Following the development of the prompting system, we started to implement a reward and punishment system. It allows the user's preferences for a particular flight or hotel to be taken into account. For example:
- Flights with a number of connecting flights higher than the average received negative points,
- More expensive flights or hotels, exceeding the average prices for the date, were 'penalised' with a percentage reduction in value.
This solution increased the precision of the results and allowed the results to be dynamically adapted to the user's preferences.
By introducing penalties for offers that deviate from user preferences, we have achieved a system that is tailored to the real expectations of Getaway customers, which has had an impact on their satisfaction with the results.
#3 Testing and adjustment of the mechanism at the UAT stage
In the final stage, we implemented the algorithm on a test environment (UAT) and conducted intensive unit and integration tests. The scoring functionality was further optimised based on the test results, ensuring that it was in line with real user needs. This phase also allowed for the calibration of scales and parameters.
- Software development: Optimising code for fast query processing.
- Design and maintenance of prompts: Preparation of ready-made sets of prompts for future use.
- Reward/punishment mechanism: Clarification of thresholds and penalties for less desirable parameters.
- Unit and integration tests: Ensuring consistency of results across all use cases.
After UAT testing, the scoring works as intended, but we would like to optimise the algorithm to further improve its precision. Have you used any additional techniques or parameters?
When tuning the scoring algorithm, it was crucial to introduce a dynamic reward/penalty mechanism. For example, we adjusted the parameters for different types of travel – business flights were prioritised differently from economy flights.
We then analysed user preferences. As a result, the language model adjusts the results in real time and users see the most relevant offers.
Very interesting approach with dynamic parameters. Has the use of this mechanism worked well in practice?
Absolutely! Operating in a production environment, the reward/punishment mechanism automatically adjusts the results, resulting in better personalisation and faster user decision-making.
The result? Perfectly tailored results that significantly increased conversion and customer satisfaction.
Effect: an integrated scoring system for TravelTech
By combining large language models and advanced scoring techniques, Getaway has gained a scalable and dynamic recommendation system for flights and hotels. Customisation mechanisms allow users to make decisions faster, and the entire platform has become more personalised and user-friendly for end users.
Getaway's turnkey scoring system is prepared for future extensions, making it flexible and resilient to changes in user preferences and new developments in the TravelTech industry.