4913
Of your peers have already watched this video.
5:00 Minutes
The most insightful time you'll spend today!
Video: How AI is Helping Biologists Protect Wildlife
According to the World Wildlife Fund, vertebrate populations have shrunk an average of 60 percent since the 1970s. And a recent UN global assessment found that we’re at risk of losing one million species to extinction, many of which may become extinct within the next decade.
To better protect wildlife, seven organizations, led by Conservation International, and Google have mapped more than 4.5 million animals in the wild using photos taken from motion-activated cameras known as camera traps. The photos are all part of Wildlife Insights, an AI-enabled, Google Cloud-based platform that streamlines conservation monitoring by speeding up camera trap photo analysis.
With photos and aggregated data available for the world to see, people can change the way protected areas are managed, empower local communities in conservation, and bring the best data closer to conservationists and decision-makers.
Camera traps help researchers assess the health of wildlife species, especially those that are reclusive and rare. Worldwide, biologists and land managers place motion-triggered cameras in forests and wilderness areas to monitor species, snapping millions of photos a year.
But what do you do when you have millions of wildlife selfies to sort through? On top of that, how do you quickly process photos where animals are difficult to find, like when an animal is in the dark or hiding behind a bush? And how do you quickly sort through up to 80 percent of photos that have no wildlife at all because the camera trap was triggered by the elements, like grass blowing in the wind?
Watch this video to find out.
Making Hybrid Work Human: Google Workspace and Economist Impact Survey

5483
Of your peers have already read this article.
2:30 Minutes
The most insightful time you'll spend today!
Google Workspace recently commissioned Economist Impact to complete a global survey (October 2021)* on the state of hybrid work, including its challenges and opportunities. We already knew that the pandemic had fundamentally changed the world of work, but the survey emphasizes the scale, reach, and longevity of those changes..
Over 75% of respondents believe that hybrid/flexible work will be a standard practice within their organizations in the coming three years. Given that 70% of respondents said they never worked remotely before the pandemic, it’s clear that hybrid has become the dominant model for work and that it’s here to stay.
But it’s also clear, as we’ll see below, that hybrid has some serious gaps that need to be addressed if it’s going to be sustainable and successful in the long term.
Defining hybrid work
As part of our work on the hybrid work survey and a broader project with The Economist Group, we interviewed a group of experts across research, consulting, business, and the advocacy world to arrive at a definition of hybrid work that captures all ways work is changing.
As Brian Kropp, one of the interviewees and vice president at Gartner, puts it: “Hybrid work is not just about different locations, but also different timings and different schedules.”
Harriet Molyneaux, managing director at HSM Advisory, a future-of-work research and advisory group, adds to this notion by describing the time-location work spectrum: “At one end of the spectrum is everyone in the office, nine till five, so both restricted time and location. And then at the other end of the spectrum is anywhere around the world at any time. So no restricted time or location. A hybrid is anything that sits in the middle of that.”
I agree with Brian and Harriet’s views. Flexibility in both location and hours is a core part of our working definition of hybrid work: a spectrum of flexible work arrangements in which an employee’s work location and/or hours are not strictly standardized.

Given this definition and framework, how is hybrid work faring and what lies ahead?
Individual wellbeing is coming at the cost of organizational connection
Early on in the pandemic, productivity remained steady or even increased for many organizations. But it came at a cost, with levels of burnout spiking as employees juggled caregiving, homeschooling, and other demands in their personal lives with work responsibilities.
Based on the survey data, wellbeing has made an upward shift, no doubt aided by things like students returning to schools in many regions and fewer demands being made of working parents. The majority of respondents said that hybrid work, based on their own experiences, can have a positive impact on the physical, mental, financial, and social wellbeing of employees.
But it appears that individual wellbeing is coming at the cost of organizational connection. The majority of respondents said they feel disconnected from their organization and co-workers (57%), that limited networking opportunities negatively impact career growth (62%), and that limited social interactions with co-workers has had a negative impact on their mental health (54%).
To be sustainable, hybrid work models must address this sense of disconnection in real and tangible ways. And it won’t happen just by increasing the number of virtual meetings. Although 72% of people say that virtual meetings improve inclusion and participation, 68% also say there are too many virtual meetings to begin with. We need new ways for people to connect spontaneously.
Hybrid workers are often using tools built for a bygone desktop era
When asked about the most important conditions needed to achieve the long-term success of hybrid work models, the number one choice globally was “new technologies that allow for time and location flexibility.”
Naturally, it was gratifying to see this, since Google Workspace is built on a cloud-based platform that empowers collaboration from anywhere, on any device, but the survey answer also highlights how much organizations have had to scramble to meet the demands of the pandemic. Some had to take legacy, office-centric systems and make them work for a distributed workforce overnight, often leveraging less-than-ideal technologies like VPNs that introduce digital friction.
As a result, top technology concerns of respondents include:
- unreliable internet access (if only all our WiFi connections were hybrid-ready!)
- reliance on slow or outdated tools
- accessing and maintaining files in multiple places
- relying on too many applications in order to get work done
Hybrid work, it seems to me, doesn’t need more applications and collaboration surfaces. It needs deeper, more meaningful connections in the tools and surfaces we already have.
As organizations assess their tech stacks, they should consider whether they can shape the behaviors they want from hybrid employees (e.g., real-time collaboration, ease of information sharing) with the tools they have in place. Or are the limits of the technology determining hybrid employee behavior?
The management and culture gap
In the same way that tools have often been built for a shared physical workspace, organizational culture seems to lag behind the hybrid moment. The majority of respondents said that a lack of face-to-face supervision creates a sense of distrust among managers and employees, and that they feel stressed by increased monitoring associated with flexible work. And more than 62% said that limited networking opportunities with senior employees and co-workers has a negative impact on career growth.
Strikingly, more than 70% of respondents indicated that the culture of trust between managers and employees needed improvement. Training and management best practices (60% of people want more of both) might help fill some of the gaps, but a manager can’t build trust with their hybrid teams by going through a training program.
The role of manager must itself evolve to meet the demands of a hybrid model. How can we empower managers to be the bridge between the “office of one” and the “office of many”? And as I discussed previously on Forbes, driving towards impact rather than output is a more sustainable metric for team engagement and productivity. It also dispenses with monitoring as a core part of a manager’s role, freeing them up to be a coach-and-connector.
How Google Workspace can help bridge the hybrid work gaps
No one has all the answers for how to make hybrid work successful, and I suspect we will see iterations of the model into 2022 and beyond as organizations—including Google—experiment with the right mix of location, culture, processes, and tools.
On the technology front, Google Workspace is uniquely positioned to bridge many of the emerging hybrid work gaps. Over the last year, we’ve delivered a set of innovations that are designed to deepen collaboration experiences while strengthening social connections within and across teams.
For example, we launched smart canvas to bring new collaboration capabilities to the places where people are already working together, helping to keep them connected, rather than having them switch tabs or open new apps. And we delivered Spaces as a central place for collaboration, where teams can share ideas, work on documents together, and manage tasks from a single place. Because all their work is preserved for future reference, team members can easily jump in and contribute at a time that works best for them, seeing a full history of the conversations, context, and content along the way. Spaces helps people maintain individual wellbeing while preserving the health of a group project.
In Google Meet, we’ve introduced real-time captions in multiple languages (in preview now), the ability for people to customize their video tiles, including being able to turn off their own to help with meeting fatigue, and we’ve implemented automatic light adjustments and noise cancellation. These changes help ensure that everyone can be seen and heard.
Meanwhile, features like hand-raise, Q&A, and polls have helped make meetings more inclusive and companion mode (in preview) can bring these to life in hybrid settings, to help ensure that there’s one cohesive conversation between the people in the office and their colleagues working somewhere else. We view companion mode as a bridge between the office and “somewhere else.”
On the personal wellbeing front, we launched Focus Time, which lets people block out their calendars for uninterrupted focus work, and Time Insights in Google Calendar, where employees can look at how they’re spending their time and adjust as needed.
As hybrid work continues to evolve, Google Workspace is committed to supporting wellbeing and seamless collaboration with tools that can remove digital friction and help people maintain connections—to each other and the organizations they work for.
*Survey details: The survey, completed in October 2021, polled a total of 1,244 employees and managers in four regions (North America, Europe, APAC, and Latin America), from more than 15 industries, in every age group, and from both small and large organizations. The focus was on knowledge workers, though it’s important to note that some of those people have been working on the frontlines; 20% of respondents indicated they haven’t worked remotely at all during the pandemic. This includes people in hospitality, retail, transportation and logistics, and healthcare.
Google is a Leader in the 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms

1296
Of your peers have already read this article.
1:30 Minutes
The most insightful time you'll spend today!
We’re excited to share that Gartner has recognized Google as a Leader in the 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms, authored by Bern Elliot and Gabriele Rigon.

We believe this recognition is a testament to Google Cloud’s robust investments and commitment to innovation in AI, coupled with a deep understanding of enterprise customer needs. Enterprises are increasingly investing in AI-driven solutions that balance addressing customer expectations with operational efficiency. At a time when the demand for quality, performant, and trustworthy conversational AI has never been higher, we’re thrilled to continue to deliver best-in-class technologies, purpose-built to solve our customers’ most critical use cases.
In 2022, Google Cloud delivered cutting-edge conversational AI technologies with many launches to our Conversational AI API portfolio. Together, these enabled developers to leverage Google’s technologies to power their applications with our end-to-end Contact Center AI (CCAI) suite, designed to solve the needs of Customer Experience (CX) and contact center leaders.
Google Cloud’s Conversational AI APIs include pre-trained models for Speech to Text, Text to Speech and Natural Language Understanding. This conversational AI core leverages Google Research’s technology for speech, understanding and interaction, enabling and orchestrating high-quality conversational experiences at scale.
With Contact Center AI, organizations see improved customer satisfaction, higher agent productivity and reduced costs through increased agent efficiency. By focusing on user needs, Google Cloud provides comprehensive and integrated solutions that are ready for the enterprise. CCAI encompasses a comprehensive set of offerings to address the needs of the contact center.
In 2022, we launched Contact Center AI Platform, our AI-first, mobile-first, user-first contact center as a service (CCaaS), providing AI-powered experiences, CRM-centered design and deployment flexibility in a single platform without the need for multiple providers. Contact Center AI Platform auto-scales on the backend, with capacity for up to 100k concurrent users on a single tenant. It also offers multi-provider voice resiliency with global low-latency routing for best possible call quality and is optimized for enhanced customer/business data security, reduced downtime, and increased agent productivity. Segra, one of the largest independent fiber infrastructure bandwidth companies in the Eastern U.S., is leveraging CCAI Platform to reimagine their customer experience through predictive flows for common experiences and greatly expanding their channels for customer interaction.
CCAI also includes Dialogflow for building virtual agents, enabling businesses to meet their customers across multiple channels. It offers robust, flexible self-service voice and chat interactions that are just as natural as a live agent. Dialogflow enables both a great customer experience and a cost-effective way to scale services.
Our Agent Assist service gives businesses the ability to transition a call from a virtual agent to a human agent while maintaining context. It efficiently guides the agent to an accurate response, while providing real-time suggestions, more accurate responses and informed recommendations.
To improve contact center operations, CCAI Insights analyzes all customer conversations to provide leaders with real-time, actionable data points on customer queries, agent performance, and sentiment trends. Its topic modeling capabilities enable deeper understanding of key investment areas and greater classification accuracy.
To ensure our enterprise customers deploying CCAI realize value faster, Google Cloud offers CCAI through three defined transformation stages with out-of-the-box packages. The first stage starts with efficiency basics in the first week that include transcription and summarization. The second stage covers automation basics within six months using Agent Assist and Insights. The final stage is full automation within a year with industry use cases and pre-built components. All of this leads to higher agent efficiency, improved customer satisfaction and increased containment.
As we look forward to the rest of 2023 and beyond, elevating the customer experience through user-first design, AI-first capabilities and accelerating time-to-value will be our north star. We plan to announce exciting new capabilities over the next few months to enable that vision to become a reality for many more organizations.
We are honored to be a Leader in the 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms, and look forward to continuing to innovate and partner with customers on their digital transformation journeys.
Download the complimentary copy of the report: 2023 Gartner® Magic Quadrant™ for Enterprise Conversational AI Platforms.
Learn more about how organizations are transforming their business with Google Cloud solutions with Contact Center AI.
GARTNER is a registered trademark and service mark of Gartner and Magic Quadrant is a registered trademark of Gartner, Inc. and/or its affiliates in the U.S. and internationally and are used herein with permission. All rights reserved.
This graphic was published by Gartner, Inc. as part of a larger research document and should be evaluated in the context of the entire document. The Gartner document is available upon request from Google.
Gartner does not endorse any vendor, product or service depicted in its research publications and does not advise technology users to select only those vendors with the highest ratings or other designation. Gartner research publications consist of the opinions of Gartner’s research organization and should not be construed as statements of fact. Gartner disclaims all warranties, expressed or implied, with respect to this research, including any warranties of merchantability or fitness for a particular purpose.
10181
Of your peers have already watched this video.
1:00 Minutes
The most insightful time you'll spend today!
Predict User Churn on Gaming Apps with Google Analytics Data using BigQuery ML
User retention can be a major challenge for mobile game developers. According to the Mobile Gaming Industry Analysis in 2019, most mobile games only see a 25% retention rate for users after the first day. To retain a larger percentage of users after their first use of an app, developers can take steps to motivate and incentivize certain users to return. But to do so, developers need to identify the propensity of any specific user returning after the first 24 hours.
In this blog post, we will discuss how you can use BigQuery ML to run propensity models on Google Analytics 4 data from your gaming app to determine the likelihood of specific users returning to your app.
You can also use the same end-to-end solution approach in other types of apps using Google Analytics for Firebase as well as apps and websites using Google Analytics 4. To try out the steps in this blogpost or to implement the solution for your own data, you can use this Jupyter Notebook.
Using this blog post and the accompanying Jupyter Notebook, you’ll learn how to:
- Explore the BigQuery export dataset for Google Analytics 4
- Prepare the training data using demographic and behavioural attributes
- Train propensity models using BigQuery ML
- Evaluate BigQuery ML models
- Make predictions using the BigQuery ML models
- Implement model insights in practical implementations
Google Analytics 4 (GA4) properties unify app and website measurement on a single platform and are now default in Google Analytics. Any business that wants to measure their website, app, or both, can use GA4 for a more complete view of how customers engage with their business. With the launch of Google Analytics 4, BigQuery export of Google Analytics data is now available to all users. If you are already using a Google Analytics 4 property, you can follow this guide to set up exporting your GA data to BigQuery.
Once you have set up the BigQuery export, you can explore the data in BigQuery. Google Analytics 4 uses an event-based measurement model. Each row in the data is an event with additional parameters and properties. The Schema for BigQuery Export can help you to understand the structure of the data.
In this blogpost, we use the public sample export data from an actual mobile game app called “Flood It!” (Android, iOS) to build a churn prediction model. But you can use data from your own app or website.
Here’s what the data looks like. Each row in the dataset is a unique event, which can contain nested fields for event parameters.
SELECT *FROM `firebase-public-project.analytics_153293282.events_*`TABLESAMPLE SYSTEM (1 PERCENT)

This dataset contains 5.7M events from over 15k users.
SELECTCOUNT(DISTINCT user_pseudo_id) as count_distinct_users,COUNT(event_timestamp) as count_eventsFROM`firebase-public-project.analytics_153293282.events_*

Our goal is to use BigQuery ML on the sample app dataset to predict propensity to user churn or not churn based on users’ demographics and activities within the first 24 hours of app installation.

In the following sections, we’ll cover how to:
- Pre-process the raw event data from GA4
- Identify users & the label feature
- Process demographic features
- Process behavioral features
- Train classification model using BigQuery ML
- Evaluate the model using BigQueryML
- Make predictions using BigQuery ML
- Utilize predictions for activation
Pre-process the raw event data
You cannot simply use raw event data to train a machine learning model as it would not be in the right shape and format to use as training data. So in this section, we’ll go through how to pre-process the raw data into an appropriate format to use as training data for classification models.
This is what the training data should look like for our use case at the end of this section:

Notice that in this training data, each row represents a unique user with a distinct user ID (user_pseudo_id).
Identify users & the label feature
We first filtered the dataset to remove users who were unlikely to return the app anyway. We defined these ‘bounced’ users as ones who spent less than 10 mins with the app. Then we labeled all remaining users:
- churned: No event data for the user after 24 hours of first engaging with the app.
- returned: The user has at least one event record after 24 hours of first engaging with the app.
For your use case, you can have a different definition of bounce and churning. Also you can even try to predict something else other than churning, e.g.:
- whether a user is likely to spend money on in-game currency
- likelihood of completing n-number of game levels
- likelihood of spending n amount of time in-game etc.
In such cases, label each record accordingly so that whatever you are trying to predict can be identified from the label column.
From our dataset, we found that ~41% users (5,557) bounced. However, from the remaining users (8,031), ~23% (1,883) churned after 24 hours:
SELECTbounced,churned,COUNT(churned) as count_usersFROMbqmlga4.returningusersGROUP BY 1,2ORDER BY bounced

To create these bounced and churned columns, we used the following snippet of SQL code.
...#churned = 1 if last_touch within 24 hr of app installation, else 0IF (user_last_engagement < TIMESTAMP_ADD(user_first_engagement,INTERVAL 24 HOUR),1,0 ) AS churned,#bounced = 1 if last_touch within 10 min, else 0IF (user_last_engagement <= TIMESTAMP_ADD(user_first_engagement,INTERVAL 10 MINUTE),1,0 ) AS bounced,...
You can view the Jupyter Notebook for the full query used for materializing the bounced and churned labels.
Process demographic features
Next, we added features both for demographic data and for behavioral data spanning across multiple columns. Having a combination of both demographic data and behavioral data helps to create a more predictive model.
We used the following fields for each user as demographic features:
geo.countrydevice.operating_systemdevice.language
A user might have multiple unique values in these fields — for example if a user uses the app from two different devices. To simplify, we used the values from the very first user engagement event.
CREATE OR REPLACE VIEW bqmlga4.user_demographics AS (WITH first_values AS (SELECTuser_pseudo_id,geo.country as country,device.operating_system as operating_system,device.language as language,ROW_NUMBER() OVER (PARTITION BY user_pseudo_id ORDER BY event_timestamp DESC) AS row_numFROM `firebase-public-project.analytics_153293282.events_*`WHERE event_name="user_engagement")SELECT * EXCEPT (row_num)FROM first_valuesWHERE row_num = 1 #first engagement);
Process behavioral features
There is additional demographic information present in the GA4 export dataset, e.g. app_info, device, event_params, geo etc. You may also send demographic information to Google Analytics through each hit via user_properties. Furthermore, if you have first-party data on your own system, you can join that with the GA4 export data based on user_ids.
To extract user behavior from the data, we looked into the user’s activities within the first 24 hours of first user engagement. In addition to the events automatically collected by Google Analytics, there are also the recommended events for games that can be explored to analyze user behavior. For our use case, to predict user churn, we counted the number of times the follow events were collected for a user within 24 hours of first user engagement:
user_engagementlevel_start_quickplaylevel_end_quickplaylevel_complete_quickplaylevel_reset_quickplaypost_scorespend_virtual_currencyad_rewardchallenge_a_friendcompleted_5_levelsuse_extra_steps
The following query shows how these features were calculated:
WITHevents_first24hr AS (SELECTe.*FROM`firebase-public-project.analytics_153293282.events_*` eJOINbqmlga4.returningusers rONe.user_pseudo_id = r.user_pseudo_idWHERETIMESTAMP_MICROS(e.event_timestamp) <= r.ts_24hr_after_first_engagement)SELECTuser_pseudo_id,SUM(IF(event_name = 'user_engagement', 1, 0)) AS cnt_user_engagement,# ... repeated for all behavior data ...SUM(IF(event_name = 'use_extra_steps', 1, 0)) AS cnt_use_extra_steps,FROMevents_first24hrGROUP BY1
View the notebook for the query used to aggregate and extract the behavioral data. You can use different sets of events for your use case. To view the complete list of events, use the following query:
SELECTevent_name,COUNT(event_name) as event_countFROM`firebase-public-project.analytics_153293282.events_*`GROUP BY 1ORDER BYevent_count DESC
After this we combined the features to ensure our training dataset reflects the intended structure. We had the following columns in our table:
- User ID:
user_pseudo_id
- Label:
churned
- Demographic features
countrydevice_osdevice_language
- Behavioral features
cnt_user_engagementcnt_level_start_quickplaycnt_level_end_quickplaycnt_level_complete_quickplaycnt_level_reset_quickplaycnt_post_scorecnt_spend_virtual_currencycnt_ad_rewardcnt_challenge_a_friendcnt_completed_5_levelscnt_use_extra_stepsuser_first_engagement
At this point, the dataset was ready to train the classification machine learning model in BigQuery ML. Once trained, the model will output a propensity score between churn (churned=1) or return (churned=0) indicating the probability of a user churning based on the training data.
Train classification model
When using the CREATE MODEL statement, BigQuery ML automatically splits the data between training and test. Thus the model can be evaluated immediately after training (see the documentation for more information).
For the ML model, we can choose among the following classification algorithms where each type has its own pros and cons:

Often logistic regression is used as a starting point because it is the fastest to train. The query below shows how we trained the logistic regression classification models in BigQuery ML.
CREATE OR REPLACE MODEL bqmlga4.churn_logregTRANSFORM(EXTRACT(MONTH from user_first_engagement) as month,EXTRACT(DAYOFYEAR from user_first_engagement) as julianday,EXTRACT(DAYOFWEEK from user_first_engagement) as dayofweek,EXTRACT(HOUR from user_first_engagement) as hour,* EXCEPT(user_first_engagement, user_pseudo_id))OPTIONS(MODEL_TYPE="LOGISTIC_REG",INPUT_LABEL_COLS=["churned"]) ASSELECT*FROMbqmlga4.train
We extracted month, julianday, and dayofweek from datetimes/timestamps as one simple example of additional feature preprocessing before training. Using TRANSFORM() in your CREATE MODEL query allows the model to remember the extracted values. Thus, when making predictions using the model later on, these values won’t have to be extracted again. View the notebook for the example queries to train other types of models (XGBoost, deep neural network, AutoML Tables).
Evaluate model
Once the model finished training, we ran ML.EVALUATE to generate precision, recall, accuracy and f1_score for the model:
SELECT*FROMML.EVALUATE(MODEL bqmlga4.churn_logreg)

The optional THRESHOLD parameter can be used to modify the default classification threshold of 0.5. For more information on these metrics, you can read through the definitions on precision and recall, accuracy, f1-score, log_loss and roc_auc. Comparing the resulting evaluation metrics can help to decide among multiple models.Furthermore, we used a confusion matrix to inspect how well the model predicted the labels, compared to the actual labels. The confusion matrix is created using the default threshold of 0.5, which you may want to adjust to optimize for recall, precision, or a balance (more information here).
SELECTexpected_label,_0 AS predicted_0,_1 AS predicted_1FROMML.CONFUSION_MATRIX(MODEL bqmlga4.churn_logreg)

This table can be interpreted in the following way:

Make predictions using BigQuery ML
Once the ideal model was available, we ran ML.PREDICT to make predictions. For propensity modeling, the most important output is the probability of a behavior occurring. The following query returns the probability that the user will return after 24 hrs. The higher the probability and closer it is to 1, the more likely the user is predicted to return, and the closer it is to 0, the more likely the user is predicted to churn.
SELECTuser_pseudo_id,returned,predicted_returned,predicted_returned_probs[OFFSET(0)].prob as probability_returnedFROMML.PREDICT(MODEL bqmlga4.churn_logreg,(SELECT * FROM bqmlga4.train)) #can be replaced with a proper test dataset
Utilize predictions for activation
Once the model predictions are available for your users, you can activate this insight in different ways. In our analysis, we used user_pseudo_id as the user identifier. However, ideally, your app should send back the user_id from your app to Google Analytics. In addition to using first-party data for model predictions, this will also let you join back the predictions from the model into your own data.
- You can import the model predictions back into Google Analytics as a user attribute. This can be done using the Data Import feature for Google Analytics 4. Based on the prediction values you can Create and edit audiences and also do Audience targeting. For example, an audience can be users with prediction probability between 0.4 and 0.7, to represent users who are predicted to be “on the fence” between churning and returning.
- For Firebase Apps, you can use the Import segments feature. You can tailor user experience by targeting your identified users through Firebase services such as Remote Config, Cloud Messaging, and In-App Messaging. This will involve importing the segment data from BigQuery into Firebase. After that you can send notifications to the users, configure the app for them, or follow the user journeys across devices.
- Run targeted marketing campaigns via CRMs like Salesforce, e.g. send out reminder emails.
You can find all of the code used in this blogpost in the Github repository:
What’s next?
Continuous model evaluation and re-training
As you collect more data from your users, you may want to regularly evaluate your model on fresh data and re-train the model if you notice that the model quality is decaying.
Continuous evaluation—the process of ensuring a production machine learning model is still performing well on new data—is an essential part in any ML workflow. Performing continuous evaluation can help you catch model drift, a phenomenon that occurs when the data used to train your model no longer reflects the current environment.
To learn more about how to do continuous model evaluation and re-train models, you can read the blogpost: Continuous model evaluation with BigQuery ML, Stored Procedures, and Cloud Scheduler
More resources
If you’d like to learn more about any of the topics covered in this post, check out these resources:
- BigQuery export of Google Analytics data
- BigQuery ML quickstart
- Events automatically collected by Google Analytics 4
- Qwiklabs: Create ML models with BigQuery ML
Or learn more about how you can use BigQuery ML to easily build other machine learning solutions:
- How to build demand forecasting models with BigQuery ML
- How to build a recommendation system on e-commerce data using BigQuery ML
Let us know what you thought of this post, and if you have topics you’d like to see covered in the future! You can find us on Twitter at @polonglin and @_mkazi_.Thanks to reviewers: Abhishek Kashyap, Breen Baker, David Sabater Dinter.
3138
Of your peers have already watched this video.
17:00 Minutes
The most insightful time you'll spend today!
How FLYR and Google Cloud Help Airlines Forecast Demand and Set Prices
FLYR Labs is an international team of industry experts and specialists in revenue management that works to bring in intelligence to the airlines companies. FLYR uses machine learning and AI to help predict demand and optimize price so that every airline is operating its complete capacity. Watch the video from Architecting with Google Cloud to deep-dive into a use case with FLYR involving the use of historic data, competitors data and future information to build model for outputting demand, set prices and optimize revenue. You can can even have a quick view of the FLYR ML platform!
Master AI Prompt Engineering with 6 Proven Tips

1057
Of your peers have already read this article.
2:30 Minutes
The most insightful time you'll spend today!
As AI-powered tools become increasingly prevalent, prompt engineering is becoming a skill that developers need to master. Large language models (LLMs) and other generative foundation models require contextual, specific, and tailored natural language instructions to generate the desired output. This means that developers need to write prompts that are clear, concise, and informative.
In this blog, we will explore six best practices that will make you a more efficient prompt engineer. By following our advice, you can begin creating more personalized, accurate, and contextually aware applications. So let’s get started!
Tip #1: Know the model’s strengths and weaknesses
As AI models evolve and become more complex, it is essential for developers to comprehend their capabilities and limitations. Understanding these strengths and weaknesses can help you, as a developer, avoid making mistakes and create safer, more reliable applications.
For example, an AI model that is trained to recognize images of blueberries may not be able to recognize images of strawberries. Why? Because the model was only trained on a dataset of blueberry images. If a developer uses this model to build an application that is supposed to recognize both blueberries and strawberries, the application would likely make mistakes, leading to an ineffective outcome, and poor user experience.
It’s important to note that AI models have the ability to be biased. This is due to AI models being trained on data that is collected from the real world, and so it can reflect the inequitable power dynamics inherently rooted in our social hierarchy. If the data that is used to train an AI model is biased, then the model will also be biased. This can lead to problems if the model is used to make decisions that affect people by reinforcing societal biases. Addressing these biases is important to ensure that data is fair, promoting equality, and ensuring the responsibility of AI technology. Prompt engineers should be aware of training limitations or biases so they can craft prompts more effectively and understand what kind of prompting is even possible for a given model.

Tip #2: Be as specific as possible
AI models have the ability to comprehend a variety of prompts. For instance Google’s PaLM 2 can understand natural language prompts, multilingual text, and even programming codes like Python and JavaScript. Although AI models can be very knowledgeable, they are still imperfect, and have the ability to misinterpret prompts that are not specific enough. In order for AI models to navigate ambiguity, it is important to tailor your prompts specifically to your desired outcome.
Let’s say you would like your AI model to generate a recipe for 50 vegan blueberry muffins. If you prompt the model with “what is a recipe for blueberry muffins?”, the model does not know that you need to make 50 muffins. It is thus unlikely to list the larger volume of ingredients you’ll need or include tips to help you more efficiently bake such a large number of muffins. The model can only go off the context that is provided. A more effective prompt would be “I am hosting 50 guests. Generate a recipe for 50 blueberry muffins.” The model is more likely to generate a response that is relevant to your request and meets your specific requirements.
Tip #3: Utilize contextual prompts
Utilize contextual information in your prompts to help the model gain an in-depth understanding of your requests. Contextual prompts can include the specific task you want the model to perform, a replica of the output you’re looking for, or a persona to emulate, from a marketer or engineer to a high school teacher. Defining a tone and perspective for an AI model gives it a blueprint of the tone, style, and focused expertise you’re looking for to improve the quality, relevance, and effectiveness of your output.
In the case of the blueberry muffins, it is important to prompt the model using the context of the situation. The model might need more context than generating a recipe for 50 people. If it needs to be aware that the recipe must be vegan friendly, you might prompt the model by asking it to answer by emulating a skilled vegan chef.
By providing contextual prompts, you can help ensure that your AI interactions are as seamless and efficient as possible. The model will be able to more quickly understand your request and it will be able to generate more accurate and relevant responses.
Tip #4: Provide AI models with examples
When creating prompts for AI models, it is helpful to provide examples. This is because prompts act as instructions for the model, and examples can help the model to understand what you are asking for. Providing a prompt with an example looks something like this: “here are several recipes I like – create a new recipe based on the ones I provided.” The model can now understand the your ability and needs in order to make this pastry,
Tip #5: Experiment with prompts and personas
The way you construct your prompt impacts the model’s output. By creatively exploring different requests, you will soon have an understanding of how the model weighs its answers, and what happens when you interfuse your domain knowledge, expertise, and lived experience with the power of a multi-billion parameter large language model.
Try experimenting with different keywords, sentence structures, and prompt lengths to discover the perfect formula. Allow yourself to step into the shoes of various personas, from work personas such as “product engineer” or “customer service representatives,” to parental figures or celebrities such as your grandmother, a celebrity chef, and explore everything from cooking to coding!
By crafting unique, and innovative, requests replete with your expertise and experience, you can learn which prompts provide you with your ideal output. Further refining your prompts, known as ‘tuning,’ allows the model to have a greater understanding and framework for your next output.
Tip #6: Try chain-of-thought prompting
Chain of thought prompting is a technique for improving the reasoning capabilities of large language models (LLMs). It works by breaking down a complex problem into smaller steps, and then prompting the LLM to provide intermediate reasoning for each step. This helps the LLM to understand the problem more deeply, and to generate more accurate and informative answers. This will help you to understand the answer better and to make sure that the LLM is actually understanding the problem.
Conclusion
Prompt engineering is a skill that all workers, across industries and organizations, will need as AI-powered tools are becoming more prevalent. Remember to incorporate these five essential tips the next time you communicate with an AI model, so you can generate the accurate outputs that you desire. AI will forever continue to develop, constantly refining itself as we use it, so I encourage you to remember that learning, for mind and machine, is a never ending journey. Happy Prompting!
More Relevant Stories for Your Company

Leverage the Power of Looker to Extract Data Value at Web Scale
Data science can be applied to business problems to improve practices and help to strengthen customer satisfaction. In this blog, we address how the addition of Looker extends the value of your Google Cloud investments to help you understand your customer journey, unlock value from first-party data, and optimize existing

Swarovski’s Journey towards Online and Offline Conversion with Predictive Analytics
Luxury brand and leader in crystals and glass production, Swarovski has charmed customers with its exquisite collections for over 125 years. To understand their customers better and map their online behaviors, Swarovski had to overcome prediction hurdles as majority of the purchases are not frequent or habitual. They are mostly

AI-as-a-Service is Here. It’s Really Almost Plug-and-Play
What is the one thing that enterprises want providers to do vis-à-vis AI? To decomplexify it. Today, the path to AI adoption is confusing, and requires skills that are out of reach for most enterprises. That’s what Google Cloud is addressing. “It used to be—still is true—that AI's a pretty
ML Workflow Made Simple: How to Automate ML Experiment Tracking with Vertex AI Experiments Autologging
Practical machine learning (ML) is a trial and error process. ML practitioners compare different performance metrics by running ML experiments till you find the best model with a given set of parameters. Because of the experimental nature of ML, there are many reasons for tracking ML experiments and making them






