Beyond Bookings: Building an Intelligent Caribbean Travel Recommender with Gen AI

“Honey, we are overworked. Let’s take a weekend off soon.” “Great idea, baby. Shall we check some airline weekend getaway sites? They…

Beyond Bookings: Building an Intelligent Caribbean Travel Recommender with Gen AI
Visit me in the Caribbean!

Summary: A generative AI project that explores how large language models can assist with trip planning. It generates travel itineraries, recommendations, and insights for destinations in the Caribbean, showcasing how AI can enhance the tourism and hospitality experience.

👉 Full code & notebook: https://github.com/musicwil/Generative-AI-projects/tree/main/capstone-genai

“Honey, we are overworked. Let’s take a weekend off soon.” “Great idea, baby. Shall we check some airline weekend getaway sites? They usually have some great packages!” And there you go. The familiar scenario: the well-deserved urge for a break quickly met with the often-interminable quest to find something that truly resonates. Endless websites, countless listings, and hours of research can quickly dampen the excitement of planning a getaway.

But what if the conversation took a different turn? What if your answer could have been, “Great idea, baby. The Caribbean is perfect for weekend escapes! What would you like to do: explore historic sites steeped in culture, indulge in a relaxing spa retreat, or unwind on a romantic, secluded beach?”

This project tackles exactly that: the challenge of moving beyond generic bookings to find your dream Caribbean destination based on your specific desires and interests. We delve into how Generative AI can transform the travel planning experience, offering a more intuitive and personalized journey from aspiration to destination.

The AI-Powered Solution: Crafting Your Personalized Caribbean Escape

To move beyond the limitations of traditional travel platforms, this project harnesses the power of Large Language Models (LLMs) to simulate an intelligent travel agent. Instead of sifting through endless lists, imagine having a system that understands the essence of your desired vacation.

Our approach involved several key steps, all driven by the capabilities of Generative AI. First, we curated a collection of enticing descriptions for various Caribbean destinations, highlighting their unique attractions and activities. But simply having descriptions isn’t enough. To truly understand and compare these destinations based on user preferences, we employed embeddings. Think of embeddings as translating text into a rich, numerical representation that captures the semantic meaning — the underlying concepts and relationships between words. By embedding our destination descriptions, we created a semantic landscape of the Caribbean.

Next, we built a smart search mechanism powered by vector search. When you, as the user, express your travel desires — be it “romantic beaches” or “adventurous snorkeling spots” — your query is also transformed into an embedding. Our vector search then efficiently finds the destinations whose descriptions have embeddings most similar to your query’s embedding, effectively identifying the Caribbean gems that best align with your interests. A key part of this process is the travel_agent_rag_search function, which utilizes the vector_search function to find these similar embeddings. Here's a snippet illustrating how this works:

similar_indices = vector_search(query_embedding, list(valid_embeddings), top_n=top_n) 
   matching_promotions = [valid_promotions[i] for i in similar_indices]

Note: for the full, well documented notebook, please click here: https://github.com/musicwil/Generative-AI-projects.git

This code snippet shows how the vector_search function takes the embedding of the user's query and a list of all the valid promotion embeddings to return the indices of the top-N most similar promotions. These indices are then used to retrieve the actual matching promotion details.

To make this interaction feel more like a conversation with a knowledgeable travel agent, we implemented a basic conversational interface. This allows you to input your preferences in natural language and receive tailored recommendations in return, bridging the gap between a simple search bar and a personalized travel consultation.

In essence, we’ve built a system that doesn’t just match keywords; it understands the meaning behind your travel aspirations and connects you with the Caribbean experiences that truly speak to you.


Key Gen AI Capabilities in Action: The Secret Sauce (and Maybe a Sprinkling of Magic)

So, how did we conjure this intelligent travel genie? It wasn’t just waving a magic wand (though sometimes it felt like it!). We leaned heavily on some seriously cool Generative AI techniques.

First up: Few-shot Prompting. Imagine trying to teach a very smart puppy a new trick by showing it just a few examples. “See how this dog sits when I say ‘sit’?” We did something similar with our LLM, feeding it a handful of stellar examples of Caribbean destination descriptions with their themes. This ‘few-shot’ learning helped it grasp the vibe we were going for when generating new, enticing descriptions. Don’t fall asleep yet; the best is yet to come!

Next, we dove into the fascinating world of Embeddings. Now, this might sound a bit sci-fi but think of it as giving each word and phrase a secret numerical code that captures its meaning. “Beach” gets a code, “romantic getaway” gets a code, and even “piña colada at sunset” gets a code! This allows the AI to understand that “romantic beach” is more similar to “secluded cove” than to “historical fort.” Pretty neat, huh?

And speaking of finding things that are similar, that’s where our trusty sidekick, Vector Search, comes in! Once we have those secret numerical codes (embeddings) for all our Caribbean descriptions, vector search acts like a super-speedy librarian. When you ask for “adventure activities,” it instantly scans those codes and pulls out the destinations whose descriptions have the most similar codes. It’s like finding your favorite ice cream flavor in a giant freezer in milliseconds!

But wait, there’s more! We didn’t just want to find relevant destinations; we wanted to provide them in a helpful way. That’s where Retrieval Augmented Generation (RAG) struts onto the stage. Think of RAG as the intelligent assistant that takes your question (“Where can I go for a relaxing spa weekend?”) and first retrieves the most relevant destination descriptions using our amazing vector search. Then, it generates a natural-sounding answer based on that retrieved information. It’s like having a travel expert who instantly recalls all the best spots based on your needs!

And finally, because we’re always striving for perfection (and because even AI needs a little self-assessment), we even dabbled in Gen AI Evaluation. Our LLM took a peek at some of the descriptions it generated and gave us its own opinion on how good they were — things like “Is this description actually about the Caribbean?” and “Does this sound exciting?”. It’s like having an AI critic for your AI!

So, there you have it! Our intelligent travel agent is powered by a whole team of Gen AI superheroes working behind the scenes. Who knew finding your dream Caribbean getaway could be so… well, intelligently generated?

Demonstration: Your AI Travel Agent in Action

To truly appreciate the intelligence of our Caribbean travel recommender, let’s see it in action. Imagine you, the user, are looking for a specific type of getaway.

Scenario 1: A Romantic Escape

User Query: “Looking for a romantic getaway in the Caribbean.”

Top Recommendation: (Let’s assume it’s “Secluded Beaches of Anguilla”).

Why Anguilla? (Description snippet: “Anguilla offers pristine, secluded beaches with powdery white sand and turquoise waters, perfect for intimate strolls and unforgettable sunsets. Enjoy world-class dining and luxurious, tranquil resorts designed for couples seeking privacy and romance.”)

Scenario 2: An Affordable Family Adventure

User Query: “Need some ideas for affordable family trips to the Caribbean.”

Top Recommendation: (Perhaps “Family Fun in Puerto Rico”).

Why Puerto Rico? (Description snippet: “Puerto Rico offers a blend of cultural experiences, beautiful beaches, and exciting activities suitable for families on a budget. Explore historic Old San Juan, enjoy water sports, and discover natural wonders like El Yunque National Forest, with a range of affordable accommodation and dining options available.”)

Scenario 3: Underwater Wonders: Best Snorkeling Spots

User Query: “Where are the best snorkeling spots in the Caribbean?”

Top Recommendation: (Let’s imagine your data highlights “The Underwater Gardens of Bonaire”).

Why Bonaire? (Description snippet: “Bonaire is renowned as a diver’s paradise, but its shallow reefs and crystal-clear waters also make it a haven for snorkelers. Explore vibrant coral gardens teeming with colorful fish just a short swim from the shore. The Bonaire National Marine Park offers numerous accessible and breathtaking snorkeling sites for all skill levels.”)

As you can see from these examples, our AI travel agent goes beyond simple keyword matching. It understands the intent behind the queries — the desire for romance, budget-friendly family fun, or exceptional underwater exploration — and provides recommendations based on the semantic understanding of the Caribbean destinations in its knowledge base.

Snorkeling is fun (and colorful)

Challenges and Learnings: Navigating the Gen AI Landscape

Building our intelligent Caribbean travel agent wasn’t always smooth sailing. We navigated a few interesting currents along the way that provided valuable lessons:

1. Model Selection and API Evolution: Our initial foray involved experimenting with various Gemini models, each with its own strengths and nuances. We ultimately found the gemini-1.5-flash model to be a stable and cost-effective workhorse for our core programming needs. For generating semantic embeddings, we opted for a cutting-edge, recently released Gemini embedding model to capture the latest advancements in semantic understanding. Interestingly, for our Gen AI evaluation step, we strategically chose a different, also recent, LLM to gain a fresh and diverse perspective on the generated content.

Lesson Learned: The Gen AI landscape is rapidly evolving. Staying abreast of the latest model releases, API updates, and their specific capabilities is crucial for both efficiency and effectiveness in development. What works today might be superseded tomorrow, so continuous learning and adaptation are key.

2. The Art and Science of Prompt Engineering: Achieving high-quality, engaging travel descriptions that also scored well in our Gen AI evaluation proved to be a significant and iterative process. We meticulously tweaked not only generation parameters like max_tokens, temperature, and top_p, but also the prompts themselves, refining them through repeated experimentation.

Lesson Learned: Prompt engineering is truly an art form intertwined with science. There’s no single “magic bullet” solution. It requires patience, creativity, and a deep understanding of how LLMs respond to different instructions and contexts. It’s a continuous cycle of hypothesis, testing, and refinement.

3. Embracing New APIs and Technical Hurdles: Integrating the newly learned Gemini API presented its own set of technical challenges initially. However, overcoming these hurdles significantly boosted our confidence and proficiency in utilizing this powerful toolset. Furthermore, newer technologies often bring the benefits of increased speed, enhanced “intelligence,” and a tendency towards maximizing efficiency and reducing costs.

Lesson Learned: Embracing new technologies and APIs, while potentially challenging at first, is essential for leveraging the latest advancements in the field. The process of troubleshooting and finding solutions leads to significant growth in technical expertise. Furthermore, newer technologies often bring the benefits of increased speed, enhanced “intelligence,” and a tendency towards maximizing efficiency and reducing costs.

Conclusion and Future Directions: Charting the Course for Intelligent Travel Planning

This project has demonstrated the exciting potential of building an AI-powered travel agent specializing in Caribbean getaways. By leveraging the power of Generative AI capabilities like few-shot prompting for dynamic content creation, embeddings and vector search for understanding user intent, and Retrieval-Augmented Generation (RAG) for delivering relevant recommendations, we’ve taken a significant step beyond traditional, static travel platforms.

Our simulated agent offers a glimpse into a future where users can interact with intelligent systems that truly understand their travel desires, providing personalized and engaging recommendations. The ability to generate diverse promotional content and perform semantic searches opens up new possibilities for travel discovery.

While this project provides a solid foundation, the journey doesn’t end here. We envision several exciting avenues for future development:

  • Real-time Integration: Connecting to live APIs for flight and accommodation availability and pricing would transform the agent from a simulation to a practical planning tool.
  • Enhanced Personalization: Incorporating user history, preferences, and even real-time contextual information could lead to even more tailored and serendipitous recommendations.
  • Sophisticated Dialogue: Enhancing the conversational capabilities to handle complex queries, ask clarifying questions, and engage in more natural, multi-turn interactions would create a more seamless user experience.
  • Multimodal Experiences: Integrating rich media like images and videos of destinations could further enhance the user’s exploration and decision-making process.
  • Actionable Insights with Function Calling: Implementing function calling could enable the agent to perform actions like checking specific availability or even guiding users through a simulated booking process.

This exploration into an AI-powered Caribbean travel agent underscores the transformative power of Generative AI in reshaping how we plan and experience travel. As these technologies continue to evolve, we anticipate a future where intelligent agents become indispensable companions in our quest for the perfect getaway.

Follow us for more insights into Generative AI and travel tech!

Acknowledgments:

This project was developed as part of the “5-Day Gen AI Intensive Course with Google” presented on Kaggle for the “Gen AI Intensive Course Capstone 2025Q1”. The Generative AI models utilized are part of the Google Gemini family. The images used in this blog post were generated using Microsoft Designer.