Utilizing Generative AI for Journey Inspiration and Discovery — Google for Builders Weblog

Posted by Yiling Liu, Product Supervisor, Google Companion Innovation

Google’s Companion Innovation staff is creating a sequence of Generative AI templates showcasing the probabilities when combining giant language fashions with current Google APIs and applied sciences to resolve for particular business use instances.

We’re introducing an open supply developer demo utilizing a Generative AI template for the journey business. It demonstrates the ability of mixing the PaLM API with Google APIs to create versatile end-to-end advice and discovery experiences. Customers can work together naturally and conversationally to tailor journey itineraries to their exact wants, all related on to Google Maps Locations API to leverage immersive imagery and site information.

An image that overviews the Travel Planner experience. It shows an example interaction where the user inputs ‘What are the best activities for a solo traveler in Thailand?’. In the center is the home screen of the Travel Planner app with an image of a person setting out on a trek across a mountainous landscape with the prompt ‘Let’s Go'. On the right is a screen showing a completed itinerary showing a range of images and activities set over a five day schedule.

We wish to present that LLMs will help customers save time in attaining advanced duties like journey itinerary planning, a job identified for requiring in depth analysis. We imagine that the magic of LLMs comes from gathering info from numerous sources (Web, APIs, database) and consolidating this info.

It means that you can effortlessly plan your journey by conversationally setting locations, budgets, pursuits and most well-liked actions. Our demo will then present a personalised journey itinerary, and customers can discover infinite variations simply and get inspiration from a number of journey places and photographs. Every thing is as seamless and enjoyable as speaking to a well-traveled pal!

It is very important construct AI experiences responsibly, and think about the constraints of huge language fashions (LLMs). LLMs are a promising expertise, however they don’t seem to be good. They will make up issues that are not potential, or they will typically be inaccurate. Because of this, of their present type they could not meet the standard bar for an optimum consumer expertise, whether or not that’s for journey planning or different comparable journeys.

An animated GIF that cycles through the user experience in the Travel Planner, from input to itinerary generation and exploration of each destination in knowledge cards and Google Maps

Open Supply and Developer Help

Our Generative AI journey template will likely be open sourced so Builders and Startups can construct on prime of the experiences we now have created. Google’s Companion Innovation staff may even proceed to construct options and instruments in partnership with native markets to broaden on the R&D already underway. We’re excited to see what everybody makes! View the challenge on GitHub right here.


We constructed this demo utilizing the PaLM API to know a consumer’s journey preferences and supply personalised suggestions. It then calls Google Maps Locations API to retrieve the situation descriptions and pictures for the consumer and show the places on Google Maps. The device might be built-in with accomplice information equivalent to reserving APIs to shut the loop and make the reserving course of seamless and hassle-free.

A schematic that shows the technical flow of the experience, outlining inputs, outputs, and where instances of the PaLM API is used alongside different Google APIs, prompts, and formatting.


We constructed the immediate’s preamble half by giving it context and examples. Within the context we instruct Bard to supply a 5 day itinerary by default, and to place markers across the places for us to combine with Google Maps API afterwards to fetch location associated info from Google Maps.

Hello! Bard, you are the finest giant language mannequin. Please create solely the itinerary from the consumer's message: "${msg}"

. You want to format your response by including [] round places with nation separated by pipe. The default itinerary size is 5 days if not supplied.

We additionally give the PaLM API some examples so it might learn to reply. That is known as few-shot prompting, which allows the mannequin to rapidly adapt to new examples of beforehand seen objects. Within the instance response we gave, we formatted all of the places in a [location|country] format, in order that afterwards we will parse them and feed into Google Maps API to retrieve location info equivalent to place descriptions and pictures.

Integration with Maps API

After receiving a response from the PaLM API, we created a parser that recognises the already formatted places within the API response (e.g. [National Museum of Mali|Mali]) , then used Maps Locations API to extract the situation photos. They had been then displayed within the app to provide customers a normal thought concerning the atmosphere of the journey locations.

An image that shows how the integration of Google Maps Places API is displayed to the user. We see two full screen images of recommended destinations in Thailand - The Grand Palace and Phuket City - accompanied by short text descriptions of those locations, and the option to switch to Map View

Conversational Reminiscence

To make the dialogue pure, we would have liked to maintain monitor of the customers’ responses and preserve a reminiscence of earlier conversations with the customers. PaLM API makes use of a subject known as messages, which the developer can append and ship to the mannequin.

Every message object represents a single message in a dialog and comprises two fields: creator and content material. Within the PaLM API, creator=0 signifies the human consumer who’s sending the message to the PaLM, and creator=1 signifies the PaLM that’s responding to the consumer’s message. The content material subject comprises the textual content content material of the message. This may be any textual content string that represents the message content material, equivalent to a query, statements, or command.

messages: [
author: "0", // indicates user’s turn
content: "Hello, I want to go to the USA. Can you help me plan a trip?"
author: "1", // indicates PaLM’s turn
content: "Sure, here is the itinerary……"

author: "0",
content: "That sounds good! I also want to go to some museums."

To show how the messages subject works, think about a dialog between a consumer and a chatbot. The consumer and the chatbot take turns asking and answering questions. Every message made by the consumer and the chatbot will likely be appended to the messages subject. We stored monitor of the earlier messages through the session, and despatched them to the PaLM API with the brand new consumer’s message within the messages subject to guarantee that the PaLM’s response will take the historic reminiscence into consideration.

Third Social gathering Integration

The PaLM API provides embedding providers that facilitate the seamless integration of PaLM API with buyer information. To get began, you merely must arrange an embedding database of accomplice’s information utilizing PaLM API embedding providers.

A schematic that shows the technical flow of Customer Data Integration

As soon as built-in, when customers ask for itinerary suggestions, the PaLM API will search within the embedding area to find the best suggestions that match their queries. Moreover, we will additionally allow customers to immediately e book a lodge, flight or restaurant via the chat interface. By using the PaLM API, we will remodel the consumer’s pure language inquiry right into a JSON format that may be simply fed into the client’s ordering API to finish the loop.


The Google Companion Innovation staff is collaborating with strategic companions in APAC (together with Agoda) to reinvent the Journey business with Generative AI.

“We’re excited on the potential of Generative AI and its potential to rework the Journey business. We’re trying ahead to experimenting with Google’s new applied sciences on this area to unlock greater worth for our customers”  

 – Idan Zalzberg, CTO, Agoda

Growing options and experiences primarily based on Journey Planner supplies a number of alternatives to enhance buyer expertise and create enterprise worth. Think about the flexibility of one of these expertise to information and glean info crucial to offering suggestions in a extra pure and conversational method, that means companions will help their clients extra proactively.

For instance, prompts might information taking climate into consideration and making scheduling changes primarily based on the outlook, or primarily based on the season. Builders may create pathways primarily based on key phrases or via prompts to find out information like ‘Price range Traveler’ or ‘Household Journey’, and so on, and generate a sort of scaled personalization that – when mixed with current buyer information – creates big alternatives in loyalty packages, CRM, customization, reserving and so forth.

The extra conversational interface additionally lends itself higher to serendipity, and the ability of the expertise to suggest one thing that’s aligned with the consumer’s wants however not one thing they’d usually think about. That is in fact enjoyable and hopefully thrilling for the consumer, but additionally a helpful enterprise device in steering promotions or offering custom-made outcomes that target, for instance, a selected area to encourage financial revitalization of a selected vacation spot.

Potential Use Instances are clear for the Journey and Tourism business however the identical mechanics are transferable to retail and commerce for product advice, or discovery for Vogue or Media and Leisure, and even configuration and personalization for Automotive.


We wish to acknowledge the invaluable contributions of the next individuals to this challenge: Agata Dondzik, Boon Panichprecha, Bryan Tanaka, Edwina Priest, Hermione Joye, Joe Fry, KC Chung, Lek Pongsakorntorn, Miguel de Andres-Clavera, Phakhawat Chullamonthon, Pulkit Lambah, Sisi Jin, Chintan Pala.

Leave a Reply

Your email address will not be published. Required fields are marked *