From Text to Rating: Automating Sentiment Scoring with Microsoft Fabric

Table of Contents

Sentiment analysis in Microsoft Fabric follows one pipeline: ingest feedback into a Lakehouse, clean it in notebooks, score it with an AI service, and report it in Power BI. You can score text with Fabric AI Functions, prebuilt Azure AI Language (preview), or Azure OpenAI, and each option returns different outputs. Labels or confidence scores are then converted into a 1-to-5 rating that can be averaged, trended, and validated against human-labeled samples.

Introduction

Customer feedback is one of the most underused data assets in the enterprise. Reviews, surveys, support tickets, and social posts arrive constantly, but most of that text is never scored. Manual review cannot keep pace with the volume, and ad hoc spreadsheet exports do not produce the trend data that drives decisions.

Sentiment analysis in Microsoft Fabric closes that gap without separate infrastructure. Pipelines, Lakehouse storage, notebooks, AI services, and Power BI work within a single governed environment.

This guide explains which scoring option fits which use case, how to convert sentiment into a numeric rating, and how to validate and budget for the results.

What Is Sentiment Analysis and How Does It Support Better Decisions?

Sentiment analysis identifies emotional signals in written text and classifies them as positive, negative, neutral, or mixed. Scored at scale, it turns unstructured feedback into trend data that teams can segment, compare, and act on.

Depending on the service, AI-powered sentiment analysis can return more than a label:

  • A confidence score for each sentiment class.
  • Sentence-level and document-level results.
  • Aspect-level sentiment, also called Opinion Mining, which ties sentiment to the specific product or service attribute being discussed.

When sentiment is paired with operational, sales, and customer metrics, teams can spot patterns, prioritize issues, and make decisions based on evidence rather than isolated comments.

Document, Sentence and Aspect-Level Sentiment:

Document-level sentiment scores a whole record, sentence-level sentiment scores each sentence, and aspect-level sentiment scores each named attribute. Aspect-level scoring matters most when one comment praises one thing and criticizes another.

Consider the sentence: “The room was great, but the staff was unfriendly.” A document-level score would likely return mixed. Azure AI Language’s Opinion Mining goes further. It identifies “room” and “staff” as targets, pairs them with “great” (positive) and “unfriendly” (negative), and lets you route each finding to the right team.

How Does Microsoft Fabric Support End-to-End Sentiment Analytics?

Microsoft Fabric supports end-to-end sentiment analytics by consolidating ingestion, transformation, scoring, and reporting on a single platform. Raw text, cleaned data, and scored results all stay in the same Lakehouse, so every dashboard traces back to source records.

The pipeline runs in four stages:

  • Ingest. Fabric pipelines pull data from internal or external sources and land it in the Lakehouse in raw form, preserving the original text for traceability and reprocessing.
  • Transform. Notebooks clean, flatten, and structure the data into analytics-ready Delta tables.
  • Score. AI services add sentiment labels, confidence scores, or aspect-level results to the curated data.
  • Report. Power BI reads the scored tables, so business users see consistent, governed results without copying data between tools.

Which Sentiment Scoring Option Should You Use?

Use Fabric AI Functions for fast, low-code labeling, prebuilt Azure AI Language when you need confidence scores or aspect-level results, and Azure OpenAI when text is sarcastic or domain-specific. Rule-based and custom ML approaches still fit narrow cases.

AI Functions in Notebooks, SQL and Dataflow Gen2:

Fabric AI Functions score sentiment with one line of code and return a label: positive, negative, mixed, or neutral. You can also pass your own custom labels. They use Fabric’s built-in AI endpoint by default, and PySpark runs them as distributed transformations across Spark clusters.

  • Where they run: notebooks (pandas and PySpark) and Dataflow Gen2. SQL in Fabric Data Warehouse is available in preview.
  • What they return: labels only, not confidence scores.
  • Requirements: Fabric Runtime 1.3 or later, and your admin must enable the tenant switch for Copilot and other features powered by Azure OpenAI.

Azure AI Language (Prebuilt, Preview):

Prebuilt Azure AI Language in Fabric returns sentiment labels, confidence scores between 0 and 1, Opinion Mining, and PII detection. It is in preview and authenticates via your Fabric workspace, so you do not need to manage a separate key.

This is the option to choose when you need to convert sentiment into a weighted numeric rating, since the confidence scores feed directly into the formula. It is also the only option here that natively returns aspect-level results. Because the service is in preview, confirm regional availability and terms before committing it to production.

Azure OpenAI for Nuanced or Domain-Specific Text:

Azure OpenAI models read context that standard NLP models miss: sarcasm, implied meaning, and industry-specific phrasing. They suit support tickets, executive survey verbatims, and feedback where tone matters more than keywords. The trade-off is higher cost and latency than the Language service, so reserve this option for the records that need it.

Rule-Based and Custom ML Alternatives:

A rule-based lexicon sentiment analysis still fits when text is short, vocabulary is controlled, and you need fully explainable scores. A trained classifier fits when you own labeled data in a narrow domain.

Scoring Options Compared:

AI Functions Azure AI Language (prebuilt) Azure OpenAI

Output

Label (positive, negative, mixed, neutral) or custom labels
Label plus confidence scores
Whatever your prompt defines (label, score, rationale)

Confidence scores

No
Yes (0 to 1)
Only if you prompt for them; not calibrated

Aspect-level support

Via custom prompt only
Yes (Opinion Mining)
Yes, via prompt design

Code required

One line
Light PySpark with SynapseML
Prompt design plus PySpark

Scale

Distributed in PySpark; SQL speed is about 20 to 100 rows per second
Distributed through SynapseML
Distributed, but rate-limited and slower per record

Cost driver

Capacity units (CUs) per AI Function operation
CUs per Language service operation
CUs based on tokens processed

Status

GA in notebooks and Dataflow Gen2; preview in Warehouse SQL
Preview
Prebuilt Azure OpenAI in Fabric is in preview

Design a Fabric Pipeline That Converts Reviews into Usable Scores.

We’ll map your real-world text sources, apply sentiment-scoring logic, and wire everything into the Lakehouse and Power BI so the results are ready for reporting.

Request a Consultation

How Does Raw API Data Flow into the Lakehouse?

Fabric pipelines connect to any REST-based API and land the response in the Lakehouse. The data can remain raw for traceability, or be written to Delta tables via mappings so it is query-ready from the start.

Feedback APIs usually return nested JSON across multiple pages and are updated continuously. Fabric accepts the input without making premature assumptions about structure.
The Lakehouse then holds raw files and structured tables side by side. Raw text is never overwritten, so you can re-run scoring at any time with a newer model without losing the source data.

How Does Raw API Data Flow into the Lakehouse

Loading Only New Feedback Records:

Use a watermark column, such as a created or modified timestamp, to ingest and score only new or changed rows. Store the last processed value, filter each run against it, and schedule the pipeline nightly or hourly.

  • Ingest only records newer than the stored watermark.
  • Score only rows without a sentiment result, or rows whose text changed.
  • Update the watermark after a successful run.

This keeps the scoring cost proportional to new feedback rather than to the total history.

How Is Raw Text Transformed into Analytics-Ready Data?

Notebooks shape raw text into analytics-ready tables by unpacking nested fields, standardizing text, and adding metadata. Because notebooks work directly on Lakehouse data, there is no need to move data between systems or maintain duplicate copies.

A typical Fabric sentiment pipeline follows these steps:

  1. Unpack nested JSON fields and flatten feedback records into rows.
  2. Standardize text: normalize whitespace, strip HTML, and fix encoding issues.
  3. Add metadata columns: source, date, product or service category, and customer segment.
  4. Filter out records too short to score reliably.
  5. Redact PII before scoring, so names, emails, and account numbers never reach the scoring service or downstream tables.
  6. Write the cleansed data to a Delta table in the Lakehouse for enrichment.

How Do You Score Text with Sentiment Intelligence?

Score the cleansed Delta table in a notebook, then write results to a new Delta table next to the source. Choose the option using the comparison table above, then apply it as follows:

  • AI Functions: apply the sentiment function to the cleansed text column. Fabric adds a label column to each row, using the built-in endpoint with no key setup.
  • Azure AI Language: call the prebuilt service from a notebook through SynapseML, authenticated by your workspace. The output includes the label and the confidence scores for each record.
  • Both options: write results to a new Delta table next to the source table, and keep the record ID so scores join back to the raw text.
    Always keep the original text column in the output table. It is what lets you audit scores and re-run them later.

How Do You Convert Sentiment into a Numeric Rating?

You convert sentiment into a numeric rating by mapping labels to a 1-to-5 scale, or by calculating a weighted score from confidence values. Either way, the result is a number you can average, trend, and compare across segments.

Mapping Labels to a 1 to 5 Scale:

Map each label to a fixed rating, for example: negative = 1, mixed = 3, neutral = 3, positive = 5. This works with every scoring option, including AI Functions, which return labels only.
Mixed and neutral both land at 3 because both sit between the extremes. They mean different things, though. Mixed text contains strong positive and negative signals that cancel out, while neutral text contains neither. If you want to separate them, report the share of mixed records as a separate metric rather than hiding it in the average.

Using Confidence Scores for Weighted Ratings:

With Azure AI Language scores on a 0 to 1 scale, calculate: rating = 1 + 4 × (positive − negative + 1) / 2. The formula centers neutral text at 3, pushes strongly positive text toward 5 and strongly negative text toward 1.

  • Positive 0.90, negative 0.05: rating = 1 + 4 × (0.85 + 1) / 2 = 4.7
  • Positive 0.10, negative 0.80: rating = 1 + 4 × (−0.70 + 1) / 2 = 1.6
  • Positive 0.02, negative 0.03, neutral 0.95: rating = 1 + 4 × (−0.01 + 1) / 2 = 3.0

Weighted ratings preserve intensity that a fixed label mapping discards, making trend lines smoother and more sensitive to change.

Scoring Aspects Separately:

Score each aspect, such as price, delivery, and support, as its own rating, then roll the aspect ratings up to the record. A single overall rating hides which attribute is driving dissatisfaction, while aspect ratings show it directly.
Store aspect results in a separate Delta table, with one row per record-aspect pair, keyed to the parent record ID. Roll up with an average, or with a minimum if your team cares most about the weakest experience.
Example: A review scores 2 for price, 5 for delivery, and 4 for support. The average roll-up gives a record rating of 3.7. The minimum roll-up gives 2, which flags the price complaint.

Scoring Aspects Separately

How Do You Check That Sentiment Scores Are Accurate?

Validate scores by comparing them with human judgment on a labeled sample. Without this step, a dashboard can look precise while quietly mislabeling a meaningful share of your feedback.

  • Build a sample. Have two reviewers label 200 to 500 records, stratified by source and by product or service line
  • Measure agreement. Compare model output with the human labels, and review the misclassified records for patterns such as sarcasm or negation.
  • Compare approaches. Score the same sample with each option you are considering. Pick on measured accuracy and cost, not on assumptions.
  • Re-validate on change. Run the sample again whenever the model, prompt, or label set changes.

What Does Sentiment Scoring Cost in Fabric?

AI Functions and prebuilt AI services consume Fabric capacity units (CUs) rather than billing separately per token. Cost depends on the scoring option, the number of records, and the text length, so estimate with your own volumes.
To estimate a nightly batch:

  1. Count new records per night (watermark loading keeps this low).
  2. Find the CU consumption rate for your chosen service in Microsoft’s AI services consumption table.
  3. Multiply records by the rate to get CU seconds, then compare that with your capacity’s daily budget. A capacity of N CUs provides N × 86,400 CU seconds per day.
  4. Run a 1,000-record pilot and read the actual usage in the Fabric Capacity Metrics app before scaling up.

For time planning, Microsoft documents a typical SQL AI Function speed of 20-100 rows per second. At that rate, 10,000 new records take roughly 100 to 500 seconds.
LLM-based scoring generally costs more per record and runs slower than the Language service because it processes tokens. A common pattern is to score everything with the cheaper option and send only low-confidence or high-value records to an LLM.
For capacity sizing and licensing, see Microsoft Fabric capacity pricing.

What Does Sentiment Scoring Cost in Fabric?

AI Functions and prebuilt AI services consume Fabric capacity units (CUs) rather than billing separately per token. Cost depends on the scoring option, the number of records, and the text length, so estimate with your own volumes.
To estimate a nightly batch:

  1. Count new records per night (watermark loading keeps this low).
  2. Find the CU consumption rate for your chosen service in Microsoft’s AI services consumption table.
  3. Multiply records by the rate to get CU seconds, then compare that with your capacity’s daily budget. A capacity of N CUs provides N × 86,400 CU seconds per day.
  4. Run a 1,000-record pilot and read the actual usage in the Fabric Capacity Metrics app before scaling up.
    For time planning, Microsoft documents a typical SQL AI Function speed of 20-100 rows per second. At that rate, 10,000 new records take roughly 100 to 500 seconds.

LLM-based scoring generally costs more per record and runs slower than the Language service because it processes tokens. A common pattern is to score everything with the cheaper option and send only low-confidence or high-value records to an LLM.

What are Some Industry Use Cases for Fabric Sentiment Analysis?

Sentiment scoring in Fabric applies wherever unstructured feedback influences decisions. These five industries show the typical pattern.

  • Retail: Aggregate product reviews to catch quality issues before they show up in return data. Segment by SKU, store, or purchase channel.
  • Financial Services: Analyze adviser feedback and call transcripts for compliance signals and satisfaction trends. Scored results can be integrated with Dynamics 365 data for customer analytics; see sentiment analysis on Dynamics 365 data.
  • Healthcare: Process patient survey responses and discharge comments to identify service gaps. Apply PII redaction before scoring.
  • Manufacturing: Score dealer and distributor feedback from CRM notes or email threads to monitor the health of channel relationships.
  • SaaS and Technology: Ingest G2, Capterra, and App Store reviews through APIs, score them nightly, and surface feature-level sentiment to product teams in Power BI.
Fabric Sentiment Analysis

Audit Why Your Sentiment Data Isn’t Reaching Power BI Cleanly

We review your ingestion, transformations, and model layer to identify where sentiment data breaks, duplicates, or loses meaning.

Request a Consultation

Conclusion

Pick the scoring option that matches your output needs, define the rating logic before you build dashboards, validate against a human-labeled sample, and then automate the pipeline with incremental loads. AlphaBOLD, a Microsoft Solutions Partner, helps enterprise teams design and run this end-to-end in Fabric. Talk to our team about your sentiment pipeline.

FAQs

Can Microsoft Fabric Handle Sentiment Analysis at Scale?

Yes. Fabric uses pipelines, notebooks, and Lakehouse storage to process large volumes of text data. SynapseML’s distributed PySpark AI Functions can score millions of rows in one notebook run.

Do Sentiment Scores Update Automatically When New Data Arrives?

Yes. Schedule the pipeline and notebook to score new or changed records on each run. See Loading Only New Feedback Records.

Can We Keep Raw Text and Sentiment Results Together for Auditing?

Yes. Store raw text and sentiment scores in the same Lakehouse to support reprocessing, accuracy checks, and compliance requests.

Is Power BI Required to Visualize Sentiment Data in Fabric?

No. You can query sentiment scores using SQL, notebooks, or other tools. Power BI offers a direct connection to Lakehouse data.

How Does Fabric Compare to a Standalone Python NLP Pipeline?

Fabric combines storage, compute, scheduling, governance, and reporting into a single environment. Standalone Python pipelines require separate infrastructure, making enterprise-scale scheduling and auditing harder.

Explore Recent Blog Posts