Improving Customer Service with AI-Powered Sentiment Analysis

Chiedozie Onyearugbulem 27-Mar-2025 14:43:54
Improving Customer Service with AI-Powered Sentiment Analysis
5:52

At DSP, we are committed to delivering exceptional customer service. To enhance our support operations, we developed an AI-powered Sentiment Analysis tool, an Oracle award-winning solution that analyses customer emails and service desk tickets in real-time. By leveraging Oracle AI and Microsoft Power BI, this tool enables businesses to detect dissatisfaction early, prioritise support, and improve service quality. In this blog, we’ll explore how it works, its benefits, and how to implement it effectively.

 

The Problem

Delayed customer feedback

Traditional feedback methods, where customers rate their experience at the end of a service request, are potentially too late. If a customer has experienced poor service during that request, they can be left feeling dissatisfied before the provider even realises there’s an issue.

Reactive rather than proactive support

Without real-time sentiment detection, support teams can only respond when customers explicitly voice concerns rather than proactively addressing issues as they arise.

Operational inefficiencies

Checking the sentiment of every interaction in the Service Desk via Service Managers would lead to a huge administrative overhead and be prohibitively expensive. It would be a challenge to scale support operations effectively without automation.

The Solution: AI-Powered Sentiment Analysis

Our AI-driven Sentiment Analysis tool addresses these issues by detecting and interpreting customer sentiment in real-time and providing an accurate representation of what a customer thinks about the quality of the service you provide. Built with Oracle AI-Language and integrated with Microsoft Power BI, our tool detects negative sentiment in real-time, delivering instant insights that enable businesses to act before issues escalate. This ultimately enhances customer satisfaction, optimises service operations, and reduces churn.

Below are screenshots showcasing the solution visualised in Microsoft Power BI.

Sentiment Analysis

Figure 1. Power BI visualiSation showing an overview of customer sentiments for a selected time interval.

Sentiment Analysis

Figure 2. Power BI visualiSation showing monthly sentiment trends for a customer.

 

How It Works: A Step-by-Step Implementation

1. Data extraction

The tool automatically pulls customer interactions from IT Service Management (ITSM) platforms, emails, and support tickets.

2. Sentiment detection

Oracle’s advanced AI-Language model analyses conversations and categorises them as positive, neutral, or negative in real-time.

import oci 
import pandas as pd 

# Create OCI AI Language Client 
def createLanguageClient(config_path): 
    config = oci.config.from_file(config_path, "DEFAULT") 
    return oci.ai_language.AIServiceLanguageClient(config) 

# Prepare text for analysis 
def createTextDocument(key_, data, language_code_="en"): 
    return oci.ai_language.models.TextDocument( 
        key=key_, text=data, language_code=language_code_) 

# Perform sentiment analysis 
def SentimentAnalysis(AI_client, text_document): 
detect_language_sentiments_response = AI_client.batch_detect_language_sentiments(batch_detect_language_sentiments_details=oci.ai_language.models.BatchDetectLanguageSentimentsDetails( 
                documents=[text_document], 
                compartment_id=dsp_msa_test_comp 
            ), level=['SENTENCE']) 
        return detect_language_sentiments_response.data  

# Wrapper to run on a DataFrame row 
def run_sentiment_analysis_api(row, col_name='Inbound Comms'): 
    row_index = row.name 
    language_client = createLanguageClient(config_path) 
    text_document = createTextDocument(key_='doc_'+str(row_index), language_code_="en", data=row[col_name]) 
    sentiment_response = SentimentAnalysis(language_client, text_document) 
    return sentiment_response 
 
# Extract sentiment and confidence 
def get_sentiments_and_confidence_score(row): 
    sent_obj = row['Sentiment Object'] 
    sentiment = sent_obj._documents[0].document_sentiment 
    confidence = sent_obj._documents[0].document_scores[f'{sentiment}'] 
    return sentiment, confidence 

 

3. Visualisation

Insights are displayed on Microsoft Power BI dashboards, allowing service teams to track sentiment trends, identify emerging issues, and improve response strategies.


4. Automated alerts

When negative sentiment is detected, alerts notify service managers, enabling swift intervention before issues escalate.

 

Solution Architecture 

Sentiment Analysis

Figure 3. Sentiment analysis solution architecture


The solution comprises two OCI services:

  1. Oracle Cloud Infrastructure Generative AI: This service offers a cloud-based language model for advanced language comprehension with a wide range of use cases, including writing assistance, summarisation, analysis, and chat. OCI Generative AI provides the capability to provide instructions (prompts) for language models to execute a task. For our data cleaning process, OCI Generative AI is used to remove boilerplate texts (email headers, footers, signatures and disclaimer notes) from email texts and retain just the email body. Removing these boilerplate texts helped improve the results of the sentiment analysis.

  2. Oracle Cloud Infrastructure Language: This service enables natural language processing (NLP) capabilities within OCI. OCI Language service provides advanced text analysis, including sentiment analysis, entity recognition, translation, and key phrase extraction. The sentiment analysis feature in OCI Language services enables text analytics that detect the emotions in a text based on keywords in the text. Sentiment analysis classifies a text to be either positive, negative or neutral. The emails from our service desk application are run through the OCI Sentiment Analysis model to detect the sentiment of each email.


The Business Impact

Proactive customer engagement

By identifying negative sentiment early, businesses can prioritise support efforts, ensuring customers receive the attention they need before dissatisfaction leads to churn.


Improved customer satisfaction & loyalty

With real-time insights, support teams can tailor interactions, reducing response times and fostering positive customer experiences.


Operational efficiency & cost reduction

Automating sentiment analysis minimises manual workloads, freeing up support teams to focus on high-priority cases and strategic initiatives.


Data-driven continuous improvement

Visualising sentiment trends over time allows businesses to refine their customer service strategies, measure the impact of improvements, and ensure consistent service excellence.


Why DSP?

As an Oracle Partner for over 25 years, DSP specialises in AI-driven automation to transform business operations. Our Sentiment Analysis tool seamlessly integrates with existing service platforms, helping organisations improve customer retention, drive revenue growth, and stay ahead in a competitive landscape.


Summary

AI-powered sentiment analysis enables businesses to detect negative customer sentiment in real-time, helping them address issues before they escalate. By integrating with IT Service Management (ITSM) platforms, it analyses customer interactions, classifies sentiment, and provides actionable insights through Microsoft Power BI dashboards and automated alerts. This proactive approach improves customer satisfaction, reduces operational costs, and enhances service quality.

Get in touch today to see how DSP can help implement this game-changing solution for your business.