Generative AI in the Consumer Buying Decision Process

Generative AI is all the rage and companies are currently trying to identify the right strategy to leverage its potential. But how can generative AI help your customers find the right products and speed up the consumer buying process? In this post I will highlight one way to help customers reduce the time they need to extract the relevant information from product reviews and make informed purchase decisions faster.

Reviews in the Consumer Buying Decision Process

The classic consumer buying decision process covers five stages:

  1. Problem Recognition
  2. Information Gathering
  3. Evaluation of Alternatives
  4. Purchase Decision
  5. Post-Purchase Behavior

Reviews typically play a role in the Evaluation of Alternatives stage. Let’s assume one concrete example and walk through the stages: the consumer needs a smartphone because the old one is broken (Problem Recognition). In the Information Gathering stage the consumer learns about different smartphone options, brands, trends, etc. With all this information at hand, consumers need to Evaluate the different Alternatives, and reviews are used as one source for comparing different products against each other.

But how important are reviews in this process stage? Research shows that 60% of consumers browse reviews on a weekly basis and 93% of whom actually say these reviews influence their shopping behavior. This supports the thesis that reviews are an important factor in the buying decision process.

Let’s return to the smartphone example and visit online shops to get a feeling for the number of reviews that we as consumers may encounter. According to statista, a German online platform offering statistics, the three largest e-commerce players in 2021 in Germany with regard to their revenue were Amazon, Otto and MediaMarkt. If we look at the first couple of non-sponsored results returned for the query smartphone in these three shops we can quickly see that these products can have several dozens reviews. This gives us an impression how much textual information there is to process for a human. Typically, not everyone is interested in all reviews or all aspects of these reviews. Personal preferences shape what we’re interested in: is the camera taking good pictures, does the battery last long enough with average phone usage, is the fingerprint sensor reacting fast, etc.

Generative AI for Summarization

Some online shops (e.g. Otto in Germany, Amazon in the US) already provide customers with a selection of keywords they can choose from to narrow down the reviews to the ones only containing these keywords. While this already is helpful, customers cannot search for the aspects they are interested in if they are not in the provided selection. Providing such a selection is often the result of keyword extraction, a related application of artificial intelligence where keywords or phrases are detected and extracted in a given text, a review in this example.

As a customer, wouldn’t it be helpful to extract the relevant information for my specific interests from the reviews and present them in a way easy to process? Enter generative AI: Large language models can be used to summarize what others say. It is worth mentioning that summarization as an AI application is not completely new: it was around before the rise of GPT (generative pretrained transformer) models. GPT models make this use case more approachable and instruction-based models can be used to take natural language prompts as an input and generate summaries based on these.

Types of Summarization

There are two types of summarization:

  1. General summarization: Summarize all reviews and present the resulting summary to the user to give an overview.
  2. Summarize by extracting: Summarize reviews by extracting those parts that are related to the interests of the users.

General summarization

According to CNBC, Amazon is already investing in generative AI to summarize product reviews to give the user an overview of what other customers liked or disliked. This is the first type of summarization described above.

The following code shows how summarization can be done. The actual review texts were generated by ChatGPT and are omitted for brevity. You can find the full example in this gist.

from transformers import pipeline

summarizer = pipeline("summarization") #, model="facebook/bart-large-cnn")

def summarize_content(text: str, max_len: int, shorten=True) -> str:
summary = summarizer("summarize: " + text, max_length=max_len, min_length=3, do_sample=False)
return summary[0]["summary_text"] except IndexError as ex:
print("Sequence length too large")
return summarize_content(text[:4000],max_len, False) if shorten else ""

all_reviews = " ".join([review_1, review_2, review_3, review_4, review_5, review_6, review_7, review_8, review_9, review_10])

summarize_content(all_reviews, max_len=40)

As a result you get a summary of maximum 40 words. A challenge for this type of summarization is length:

  1. The length of the summary to be generated: summarizing 100 reviews may need more words to express than summarizing five reviews. Defining the output length depending on the number of input reviews can be a solution.
  2. The length of the input reviews to summarize: some models have restrictions on how many input tokens or characters they can take into account. Restricting the reviews to the most helpful ones or summarizing in steps (e.g. summarize in batches of ten and then create a summary of summaries) are potential solutions.

Summarizing by extracting

Having an overview is nice – but extracting what’s of interest for the individual can be a real timesaver for customers as general summaries do not necessarily include what they’re interested in but focus on different aspects.

So instead of presenting a summary that may miss what aspects the individual users are interested in, extract the information related to their interests and create a summary with these extractions. Instruction-based language models are well-suited for this task as they take prompts as an input and these prompts can now contain the user interests. Prompts can either be defined directly by users or composed in the background with the user input. These prompts are sent together with the reviews to the large language model in the background and then the relevant information is extracted from the reviews – if available. In return, the webshop displays this extracted information as a summary helping the users find the information they’re looking for quicker.

Practical example – summarizing reviews by extracting information

Experimenting with this technique only requires a few lines of code. The following example shows how to extract the information relevant to battery life and display size from the above used reviews (the ones that were generated by ChatGPT and summarized) with OpenAI’s model GPT 3.5 turbo – provided you have an Open AI API key. Reviews omitted again for brevity:

import openai
import os
# read local .env file
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())

openai.api_key  = os.getenv('OPENAI_API_KEY')

#Define the function to interact with the instruction-based large language model:
def get_completion(prompt, model="gpt-3.5-turbo"):
    messages = [{"role": "user", "content": prompt}]
    response = openai.ChatCompletion.create(
    return response.choices[0].message["content"]

reviews = [review_1, review_2, review_3, review_4, review_5, review_6, review_7, review_8, review_9, review_10]

for i,review in enumerate(reviews):

    prompt = f"""
    Your task is to extract relevant information from \ 
    a product review from an ecommerce site to help \
    users find relevant information in their buying process. 

    From the reviews below, delimited by triple quotes \
    extract the information relevant to battery life and \ 
    display size. Limit to 30 words. 

    Review: ```{review}```

    response = get_completion(prompt)

And as a result you get the extracted information for each of the reviews (shortened):

0:Battery life: The battery life of the IncrediblePhone disappoints the reviewer as it drains faster than expected, especially when using the camera extensively. 

Display size: The IncrediblePhone has a 6-inch high-resolution display that enhances the viewing experience, making everything look sharp and vibrant.
1:Battery life: Not mentioned in the review.
Display size: Not mentioned in the review.

It is worth mentioning that hallucination, the phenomenon where LLMs “invent” content which does not originate from the provided input, is not likely to occur when crafting your prompts carefully. The keyword extract in the prompt is an important one in this case as it instructs the language model to extract an answer based on the review to work with and not to generate an answer from scratch.

User Interface and User Experience Considerations

A lot of use cases for large language models imply a chat-based user interface. While I can imagine users writing prompts and receiving an answer back in this use case I’m not totally convinced that this is the best achievable user experience. Not every customer may be familiar with how to write good prompts and (especially in e-commerce) many consumers still use keyword based queries. A chat-based experience might not be suitable for this.

An approach combining user research, experimentation and analytics is my suggestion to tackle this challenge and implement a good user experience for your customers.

  • User research: Talk to your customers and identify their needs when it comes to summarizing reviews and how they would interact with your online shop to get the information they are seeking in reviews.
  • Experimentation: Iterate on the user interface based on the research findings to get to the best possible user experience.
  • Analytics: Make it easy for users to express their preferences and what they’re interested in. If you collect information about how your users interact with your online shop you can leverage this information and provide quick selection options. If this user selected the battery life facet or used related query terms (e.g. “smartphone with long battery life”) you can directly provide an option to extract the relevant parts of the customer reviews (e.g. “Read what others say about the battery life of this smartphone”). This can lower the bar to use a feature like this.


Reviews are an important part of the consumer buying process as users regularly rely on them as one source of information to make purchase decisions. Instruction-based large language models can help summarize relevant information from user reviews and present it back to the users. That way they receive the information they care about speeding up the stage of evaluating alternatives and thus improving the customer experience.

Of course, this approach is not limited to e-commerce. Any platform providing their users with reviews can benefit from a way of making it easier for their customers to process this data. Summarizing reviews can also be used internally, e.g. in customer service departments making this technique one that can power multiple business cases.

If you want to know how generative AI can be strategically used to drive conversion, get in touch with us today.

Image from Man Vectors by Vecteezy