Customer sentiment analysis with OCI AI Language

March 13, 2024 | 5 minute read
Aviv Graupen
AI Infra/GPU Technical Specialist
Text Size 100%:

Imagine a leading global professional services company providing a broad range of risk and wealth solutions. The company has increased focus on driving digital transformation through customer relationship management and gaining insights from client feedback surveys. By analyzing the sentiments expressed in the responses, the company aims to identify trends in how their products and services are perceived, and potential areas for improvement - yet how?

Despite having a vast pool of data, the company lacked an efficient method to swiftly and reliably extract valuable customer feedback to refine its operations and enhance its portfolio. To tackle this challenge, the company opted for Oracle Cloud Infrastructure (OCI), using OCI AI and other services for large-scale data processing. The company collects customer feedback forms and reviews on a monthly basis, resulting in an extensive amount of data . However, the challenge lies in the unstructured nature of the data, mainly text-based reviews, which made quick and consistent analysis at scale difficult, especially over time. The goal was to understand their customers' sentiments and promptly identify keywords indicating different sentiments and entities, such as products, services, and organizations that received positive or negative feedback.


Use case with OCI AI Language using unstructured data and sentiment analysis.
Figure 1: Use case with OCI AI Language using unstructured data and sentiment analysis.

Use case solution on OCI

The company employed various OCI services, software developer kits (SDKs), and frameworks. Part of the OCI AI collection, OCI Language enables sophisticated text analysis at scale. Developers can integrate AI capabilities like sentiment analysis, key phrase extraction, text classification, and entity recognition into their applications without needing AI expertise. OCI Autonomous Data Warehouse offers a fully automated database service, facilitating the development and deployment of application workloads of complexity, scale, or criticality. Its converged engine supports diverse data types, streamlining application development from modelling, coding, extract transform load (ETL), database optimization, to data analysis. Oracle Analytics Cloud (OAC) is a cloud-native service that addresses the entire analytics process, from data ingestion and modelling to data preparation, enrichment, visualization, and collaboration.

Work flow diagram for the use case deployment.
Figure 2: Work flow diagram for the use case deployment
  1. Data is replicated from sales cloud using Oracle Data Integrator (ODI). We recommend using an extract load transform (ELT) tool to replicate data from the sales cloud to Autonomous Database.
  2. Data is preprocessed using the inbuilt SQL and PL/SQL capabilities of the Autonomous Data Warehouse.
  3. The OCI Language API is called from Autonomous Data Warehouse through the PL/SQL service and performs sentiment analysis.
  4. The result of the analysis from OCI Language is stored in tables in the Autonomous Data Warehouse and prepared for visualization in views.
  5. The end users access these views through a data model in OAC and use them to develop visualizations that deliver actionable insights.

What about sentiment analysis for other language support, like Hebrew?

Despite its tech prominence, Israel lags in natural language processing (NLP), particularly in Hebrew and Arabic. Some estimates suggest that an accurate Hebrew model might still be 5–10 years away. The complexity of Hebrew, including its flexible word order and lack of vowels, complicates accurate language model creation. Current Hebrew models achieve only about 70–80% accuracy because of limited training data and resources.

If the datasets are substantial, processing them requires significant GPU power, making OCI bare metal and virtual machine (VM) GPU shapes a strong option. Bar-Ilan University developed a Hebrew model called AlephBERT based on 100 million sentences with 80% accuracy. But reaching production standards of 95% accuracy remains a challenge, especially considering the accuracy drop when translating between languages. So, what’s the solution?

Example with Hebrew

Because of the absence of a dominant Hebrew model, many companies dealing with Hebrew resort to using the Google Translate plugin in their code. In an experiment, I used the following steps:

 Solution design for translating Hebrew into English using AlephBERT and Google Translate.
Figure 3: Solution design for translating Hebrew into English using AlephBERT and Google Translate
  • I deployed a VM.GPU.A10 instance to run my Python code.
  • I created a table containing approximately 1,100 hotel reviews in Hebrew.
  • Each review was translated into English using the Google Translate plugin and entered into a new column in the table.
  • The table was accessed using OAC, and a Python app detect Hebrew and English in the table, running OCI Language for sentiment analysis and returning the results.
Work flow for the solution with optional use of the Google Translate plugin.
Figure 4: Work flow for the solution with optional use of the Google Translate plugin

Using the BERT model that understands Hebrew without Google Translate yielded different sentiment results compared to the Google Translate plugin, highlighting the complexities and nuances of language processing.

Final, visualized results of the insights from the sentiment data analysis.
Figure 5:
Final, visualized results of the insights from the sentiment data analysis

Semantic search is crucial. It narrows down query meanings by more deeply understanding the specific words and phrases in context, going beyond mere keyword search. We can achieve even better results by using retrieval-augmented generation (RAG).


The power of understanding and analyzing sentiments in diverse languages becomes not just an asset, but an indispensable tool. Our AI service transcends linguistic barriers, offering nuanced sentiment analysis in both English and other languages. It’s a journey beyond mere word interpretation. It’s about capturing the essence of emotions and viewpoints across different cultures.

At the core of our system lies a robust framework engineered for AI performance. By selecting and optimizing our GPUs, we offer better precision, speed, and efficiency in sentiment analysis. This technical prowess doesn't just analyze sentiments—it comprehends them in real time, equipping you with the insights necessary for informed decision-making in a multicultural landscape.

Are you ready to embark on the future of sentiment analysis and uncover a universe of insights? Step into a world where language isn’t a barrier, but a bridge to understanding and connection.

For more information, see the following resources:


Aviv Graupen

AI Infra/GPU Technical Specialist


I possess over 15 years of comprehensive experience in AI-ML and HPC infrastructure, along with solution development on various Linux platforms. My background spans in the cloud, on-prem Data Centre and field. I specialize in AI, NVIDIA GPU, and HPC.
My skills encompass architecture, design, solution development, application profiling, benchmarking. 

I am passionate about creating value and impact for my customers, partners, and company, by applying my knowledge in cloud computing, sales consulting, and new business development. I strive for excellence and innovation, by thinking creatively, challenging assumptions, and working with my team and stakeholders.

Previous Post

OCI Search with OpenSearch 2.11 delivers easy access to latest AI innovations

Carter Shanklin | 5 min read

Next Post

Want to become an AI developer? Here’s how with MySQL HeatWave

Nipun Agarwal | 5 min read