Hybrid ML and LLM Approach for Automated Question Quality Feedback

stack_overflow · Tech · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: developer Q&A question-quality feedback and moderation assistance

Stack Overflow needed to help askers improve draft questions before public posting while reducing repetitive human reviewer feedback, but pure LLM quality scoring proved unreliable and generic.

Constraints:

Architecture

Stack Overflow built Question Assistant as a hybrid ML/LLM workflow. After a pure LLM approach failed to produce reliable quality ratings or category-specific feedback, the team trained individual logistic regression classifiers on historical reviewer comments and close comments. The models use TF-IDF features over question title and body to produce binary indicators for specific feedback needs, initially in the context/background category: problem definition, attempt details, error details, and missing minimal reproducible example. When an indicator fires, the service combines preloaded response text, the question content, and system prompts, then sends that structured input to Gemini to generate question-specific feedback. Models are trained and stored in Azure Databricks/Unity Catalog, served by an Azure Kubernetes service, and instrumented through Azure Event Hub and Datadog for experiments and iteration.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Question_draft["Question draft"] --> Feedback_classifier_service["Feedback classifier service"]
  Historical_reviewer_data["Historical reviewer data"] --> TF_IDF_vectorizer["TF-IDF vectorizer"]
  TF_IDF_vectorizer --> Feedback_indicator_models["Feedback indicator models"]
  Azure_Databricks["Azure Databricks"] --> Databricks_Unity_Catalog["Databricks Unity Catalog"]
  Databricks_Unity_Catalog --> Feedback_classifier_service
  Feedback_classifier_service --> Feedback_indicator_models
  Feedback_classifier_service --> Preloaded_feedback_library["Preloaded feedback library"]
  Preloaded_feedback_library --> Gemini_feedback_generator["Gemini feedback generator"]
  Feedback_classifier_service --> Gemini_feedback_generator
  Gemini_feedback_generator --> Question_feedback_response["Question feedback response"]
  Question_feedback_response --> Question_draft
  Feedback_classifier_service --> Azure_Event_Hub["Azure Event Hub"]
  Azure_Event_Hub --> Datadog_observability["Datadog observability"]
  A_B_testing_framework["A/B testing framework"] --> Azure_Event_Hub
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Question draft Question title and body submitted by an asker in Staging Ground or Ask Wizard. Feedback classifier service
Feedback classifier service Production service on Azure Kubernetes that hosts indicator models and generates predictions on demand. Feedback indicator models, Preloaded feedback library, Gemini feedback generator, Azure Event Hub
Feedback indicator models Individual logistic regression classifiers that decide whether a draft needs a specific feedback indicator. TF-IDF vectorizer, Databricks Unity Catalog
TF-IDF vectorizer Classical NLP feature extraction over reviewer comments, close comments, titles, and bodies. Feedback indicator models
Historical reviewer data Past Staging Ground reviewer comments, close comments, comment templates, and close reasons used to derive indicators and training data. TF-IDF vectorizer, Feedback indicator models
Preloaded feedback library Reusable response text aligned to specific indicators before Gemini contextualizes it. Gemini feedback generator
Gemini feedback generator LLM component that synthesizes indicator feedback and the question text into specific actionable feedback. Question feedback response
Question feedback response User-facing generated guidance returned to the asker for revision. Question draft
Azure Databricks Training environment and model-management ecosystem for the logistic regression models. Databricks Unity Catalog
Databricks Unity Catalog Model storage and versioning source from which the production service downloads models. Feedback classifier service
Azure Event Hub Collects user interaction events for experiments and monitoring. Datadog observability
Datadog observability Logs predictions and results to assess helpfulness and guide future model iterations. Feedback classifier service
A/B testing framework Splits eligible askers into control and variant groups across Staging Ground and Ask Wizard experiments. Azure Event Hub, Datadog observability

Data flow

A user drafts a question with a title and body. Feedback classifiers evaluate the draft against predefined indicators derived from historical Staging Ground comments and close reasons. If an indicator is positive, the service retrieves preloaded feedback text, combines it with the question and system prompts, sends it to Gemini, and returns contextual feedback to the asker. Events, predictions, and results flow through Azure Event Hub and Datadog so the team can measure usefulness, run A/B tests, and iterate on indicator models.

3 supporting quotes
“These produce a binary response based on the question title and body. Essentially: Does this question need a specific comment template applied to it or not?”article, stated
“Once an indicator flags a question, it sends a preloaded response text with the question to Gemini, along with some system prompts.”article, stated
“we collected events through Azure Event Hub and logged predictions and results to Datadog to understand whether or not the generated feedback was helpful for the user”article, stated

Why this architecture

Stack Overflow split classification from language generation because LLM-only quality scoring failed, while historical reviewer comments provided enough signal for discrete binary indicators. Logistic regression gives consistent, interpretable indicator decisions; Gemini is then used where it is stronger, turning structured indicator text plus the draft question into contextual feedback. The architecture also fits production operations by separating Databricks training/model management from Kubernetes serving and instrumenting outcomes through event and observability pipelines.

3 supporting quotes
“Instead of using only an LLM with the possibility of a wide range of responses and generic outputs, we created individual logistic regression models.”article, stated
“we still needed to pair it with an LLM in the workflow to provide actionable feedback.”article, stated
“In production, a dedicated service on Azure Kubernetes downloads from Databricks Unity Catalog and hosts the models to generate predictions upon feedback request.”article, stated

Models used: Gemini · individual logistic regression models · TF-IDF feature extraction

Scale

Alternatives considered (roads not taken)

Use LLMs to directly rate question quality

Rejected because: The LLM could not reliably align quality ratings with generated feedback and did not change ratings after drafts were edited.

“Our tests with LLMs showed they could not reliably predict quality ratings and provide feedback that correlated with each other.”article, stated
“Worse still, the quality rating and feedback wouldn’t change after the question draft was updated.”article, stated

Create numeric ground truth from reviewer ratings

Rejected because: A 1-to-5 survey produced low inter-rater reliability and numeric ratings did not explain what to fix.

“After running the results through Krippendorff’s alpha, we got a pretty low score”article, stated
“The numerical rating doesn’t give context for what, how, or where the question needs to be improved.”article, stated

Use generic LLM feedback without indicator classifiers

Rejected because: Pure LLM feedback repeated across categories and did not correspond to the category being assessed.

“The feedback itself was repetitive and did not correspond with the category—for example, all three categories would regularly include feedback about the version of the library”article, stated

Judge value only by approval rate and review time

Rejected because: Those original metrics were inconclusive, while success rate captured the real quality impact.

“neither approval rates nor average review times improved significantly for the variant group compared to the control.”article, stated
“We saw a meaningful increase in success rates for questions; that is, questions that stay open on the site and receive an answer or a post score of at least plus two.”article, stated

Patterns

eval-driven-development (quality)

The team moved through failed LLM tests, a failed ground-truth survey, two A/B tests, and a metric pivot before full rollout.

“Changing course is not uncommon in research and early development. But realizing when you're on a path that won’t provide impact and pivoting to new logic is key”article, stated
“We ran this experiment in two stages: first on Staging Ground only, then on stackoverflow.com for all question askers with [Ask Wizard]”article, stated

tool-use-orchestration (system-design)

The system orchestrates classical classifiers, preloaded response templates, system prompts, and Gemini rather than using Gemini for the whole task.

“we created individual logistic regression models. These produce a binary response based on the question title and body.”article, stated
“Once an indicator flags a question, it sends a preloaded response text with the question to Gemini, along with some system prompts.”article, stated

structured-output-contract (data-modeling)

Reviewer feedback is broken into explicit binary indicators so the LLM receives structured intent rather than making a subjective holistic rating.

“Rather than predicting the score directly, we built out individual models that would indicate whether a question should receive feedback for that specific indicator.”article, stated
“We broke the category into four individual and actionable feedback indicators:”article, stated

data-quality-loop (quality)

Historical reviewer comments, close comments, templates, and production event results feed the indicator-model training and iteration loop.

“We derived these feedback indicators from clustering reviewer comments on Staging Ground posts to find the common themes between them.”article, stated
“logged predictions and results to Datadog to understand whether or not the generated feedback was helpful for the user, and to improve future iterations of the indicator models.”article, stated

observability-tracing (operations)

Azure Event Hub and Datadog capture user events, predictions, and outcomes so the team can evaluate the production feedback system.

“To measure success, we collected events through Azure Event Hub and logged predictions and results to Datadog”article, stated

Tradeoffs

Hybrid classifiers plus Gemini

Chose logistic regression indicators for classification and Gemini for contextual feedback over LLM-only quality scoring and feedback.

Rationale: Traditional ML gives more consistent binary indicator decisions, while Gemini generates specific natural-language guidance once the indicator is known.

“In the end, we found that evaluating question quality and determining the appropriate feedback required some classic ML techniques in addition to our generative AI solution.”article, stated
“Gemini then synthesizes these to produce feedback that addresses the indicator, but is specific to the question.”article, stated

Feedback indicators instead of score prediction

Chose actionable binary indicators over 1-to-5 quality ratings.

Rationale: A score did not provide actionable information and the survey-based ground truth was unreliable.

“Rather than predicting the score directly, we built out individual models that would indicate whether a question should receive feedback for that specific indicator.”article, stated

Historical reviewer artifacts as training data

Chose clustered reviewer comments, close comments, templates, and close reasons over new numeric survey labels.

Rationale: Past human decisions aligned naturally with actionable feedback indicators, while survey ratings had poor agreement.

“We derived these feedback indicators from clustering reviewer comments on Staging Ground posts to find the common themes between them.”article, stated
“Those reviewer comments and close comments were all vectorized using [term frequency inverse document frequency (TF IDF)]”article, stated

Success rate as deployment signal

Chose questions staying open and receiving an answer or +2 score over approval rate and review time alone.

Rationale: The original metrics were inconclusive, but success rate captured actual question quality and downstream usefulness.

“questions that stay open on the site and receive an answer or a post score of at least plus two.”article, stated
“With the meaningful success rates and consistency of our findings, we made Question Assistant available to all askers”article, stated

Separate training and serving infrastructure

Chose Databricks/Unity Catalog for model training and storage, Azure Kubernetes for serving over a single monolithic training-and-serving service.

Rationale: The setup uses managed ML governance for models while keeping prediction serving in a dedicated production service.

“We trained and stored these models within our Azure Databricks ecosystem.”article, stated
“In production, a dedicated service on Azure Kubernetes downloads from Databricks Unity Catalog and hosts the models”article, stated

Gotchas (what bit them)

LLM-generated quality ratings were not reliable enough for subjective moderation feedback.

Root cause: The LLM's ratings did not correlate with its feedback, repeated the same advice across categories, and did not respond to draft revisions.

Resolution: Replace holistic LLM scoring with discrete logistic-regression indicator models and use Gemini only for contextual feedback generation.

“Our tests with LLMs showed they could not reliably predict quality ratings and provide feedback that correlated with each other.”article, stated
“While we wouldn’t be able to use an LLM to determine quality, our survey did affirm the importance of the feedback categories for that purpose.”article, stated

Reviewer survey labels did not create reliable ground truth.

Root cause: Question quality is subjective, and reviewers disagreed when asked to assign numeric 1-to-5 category scores.

Resolution: Use historical reviewer comments, comment templates, and close reasons as operational signals for specific feedback indicators.

“After running the results through Krippendorff’s alpha, we got a pretty low score”article, stated
“these themes also matched our existing comment templates and question close reasons, so we could use past data in training a model to detect them.”article, stated

Numeric ratings did not tell askers how to improve.

Root cause: A score alone lacks location, context, and concrete remediation steps.

Resolution: Shift from predicting scores to identifying actionable feedback indicators and generating targeted feedback.

“If someone gets a 3 in a category, does that mean they need to improve it in order to post their question?”article, stated
“The numerical rating doesn’t give context for what, how, or where the question needs to be improved.”article, stated

Original experiment metrics missed the system's actual value.

Root cause: Approval rates and review time did not significantly improve, but those metrics did not capture whether posted questions succeeded later.

Resolution: Analyze success rates defined by questions staying open and receiving an answer or a score of at least +2.

“neither approval rates nor average review times improved significantly for the variant group compared to the control.”article, stated
“this solution actually solves a different problem. We saw a meaningful increase in success rates for questions”article, stated

Evaluation

Evaluation proceeded through several layers: initial LLM tests, a 1,000-reviewer survey analyzed with Krippendorff's alpha, a Staging Ground A/B test with 50/50 control and variant groups, and a second Ask Wizard A/B test for all eligible askers. The team monitored approval rate, review time, and ultimately question success rate.

Metrics: Krippendorff's alpha for reviewer agreement · 50/50 Staging Ground A/B split · approval rate · average review time · question success rate · +12% success rate across two experiments · full rollout date March 6, 2025

3 supporting quotes
“After running the results through Krippendorff’s alpha, we got a pretty low score”article, stated
“all eligible Staging Ground askers were allocated for the experiment, split 50/50 between the control and variant groups.”article, stated
“We saw a steady success rate of +12% across both experiments.”article, stated

Outcomes

The case gives strong rollout and experiment evidence but limited operational detail about Gemini latency, cost, prompt design, or failure handling. The key reusable outcome is the architecture pivot: use ML classifiers for stable indicator decisions and LLMs for language generation.

3 supporting quotes
“With traditional ML and Gemini working together, we were able to fuse the suggested indicator feedback and the question text”article, stated
“neither approval rates nor average review times improved significantly for the variant group compared to the control.”article, stated
“we made Question Assistant available to all askers on Stack Overflow on March 6, 2025.”article, stated