joined August 14, 2026
  • Why does my BigQuery UPDATE fail when replacing 0 values with NULL using CASE statements?

    I’m cleaning a weather dataset in Google BigQuery where missing values in wind_speed and visibility were incorrectly stored as 0. I tried updating the table like this:     UPDATE `my_project.weather_data.tracks_2023` SET wind_speed = CASE WHEN wind_speed = 0 THEN NULL END, visibility = CASE WHEN visibility = 0 THEN NULL END WHERE wind_speed =(Read More)

    I’m cleaning a weather dataset in Google BigQuery where missing values in wind_speed and visibility were incorrectly stored as 0.

    I tried updating the table like this:

     
     
    UPDATE `my_project.weather_data.tracks_2023`
    SET
    wind_speed = CASE WHEN wind_speed = 0 THEN NULL END,
    visibility = CASE WHEN visibility = 0 THEN NULL END
    WHERE wind_speed = 0 OR visibility = 0;
     

    The query returns an error.

    My goal is simple:

    • Convert 0 values in wind_speed to NULL
    • Convert 0 values in visibility to NULL
    • Leave all other values unchanged

    What’s the correct way to do this in BigQuery?

  • How do you reduce hallucinations in LLMs without sacrificing response quality?

    I’m working on an AI application that uses a large language model for question answering over internal documentation. While retrieval augmentation has improved factual accuracy, the model still occasionally generates confident but incorrect responses when the retrieved context is incomplete or ambiguous. A simplified version of the inference pipeline looks like this:   retrieved_docs =(Read More)

    I’m working on an AI application that uses a large language model for question answering over internal documentation. While retrieval augmentation has improved factual accuracy, the model still occasionally generates confident but incorrect responses when the retrieved context is incomplete or ambiguous.

    A simplified version of the inference pipeline looks like this:

     
    retrieved_docs = retriever.search(query, top_k=5)
    
    prompt = f"""
    Use ONLY the information below to answer the question.
    
    Context:
    {retrieved_docs}
    
    Question:
    {query}
    """
    
    response = llm.generate(prompt)
     

    I’ve experimented with increasing retrieval depth, adjusting chunk sizes, and rewriting prompts, but there’s always a trade-off between factual accuracy, latency, and response quality.

    For those building production AI systems:

    • How do you measure and mitigate hallucinations beyond prompt engineering?
    • Have you found techniques like reranking, verification models, or multi-agent validation to be effective?
    • What evaluation metrics do you rely on to determine whether changes actually improve factual reliability?

    I’m particularly interested in approaches that have worked well in production rather than benchmark experiments.

  • How do you handle concept drift without frequent retraining?

    I’m maintaining a machine learning model that’s deployed in production, and over the past few months I’ve noticed a gradual decline in performance. The data distribution has shifted, but not enough to justify retraining the model every few days. Right now, I’m monitoring prediction confidence and basic evaluation metrics, but I’m unsure when retraining should(Read More)

    I’m maintaining a machine learning model that’s deployed in production, and over the past few months I’ve noticed a gradual decline in performance. The data distribution has shifted, but not enough to justify retraining the model every few days.

    Right now, I’m monitoring prediction confidence and basic evaluation metrics, but I’m unsure when retraining should actually be triggered.

    Here’s a simplified version of the monitoring logic:

     
    from evidently.report import Report
    
    report = Report(metrics=[
        DataDriftPreset(),
        ClassificationPreset()
    ])
    
    report.run(
        reference_data=train_df,
        current_data=production_df
    )
    
    if drift_score > threshold:
        retrain_model()
     

    I’m curious how teams handle this in production.

    • Do you rely on statistical drift detection alone, or do you also monitor business KPIs?
    • How do you distinguish between temporary distribution shifts and genuine concept drift?
    • Have you had success with online learning, rolling retraining windows, or champion/challenger models?

    I’d love to hear how experienced ML engineers balance model stability with keeping predictions accurate over time, especially in high-volume production environments.

  • What’s the toughest data interview question you’ve been asked that you didn’t expect?

    I’ve been preparing for data analyst and data scientist interviews, and I’ve noticed that many interview experiences online focus on SQL, Python, and statistics. But I’ve heard that some companies ask open-ended business or case-study questions that are much harder than coding problems. For those who’ve been through multiple data interviews: What was the most(Read More)

    I’ve been preparing for data analyst and data scientist interviews, and I’ve noticed that many interview experiences online focus on SQL, Python, and statistics. But I’ve heard that some companies ask open-ended business or case-study questions that are much harder than coding problems.

    For those who’ve been through multiple data interviews:

    • What was the most challenging question you were asked?
    • What was the interviewer actually trying to assess?
    • Looking back, how would you answer it differently today?

    I’m especially interested in questions that required analytical thinking, problem-solving, or communicating your reasoning rather than simply recalling technical concepts.

  • How do you validate a causal inference model when you don’t have a true counterfactual?

    I’m working on an advanced analytics project where the goal is to estimate the impact of a business intervention (pricing changes, targeted campaigns, and operational improvements). The challenge is that there’s no randomized control group, and historical data is affected by seasonality, market trends, and multiple simultaneous interventions. I’ve experimented with propensity score matching and(Read More)

    I’m working on an advanced analytics project where the goal is to estimate the impact of a business intervention (pricing changes, targeted campaigns, and operational improvements). The challenge is that there’s no randomized control group, and historical data is affected by seasonality, market trends, and multiple simultaneous interventions.

    I’ve experimented with propensity score matching and difference-in-differences, but I’m struggling to determine whether the estimated treatment effect is genuinely causal or simply capturing hidden confounding variables.

    For those who’ve worked on large-scale causal inference problems:

    • How do you validate your model when a true counterfactual doesn’t exist?
    • Do you rely on synthetic controls, placebo tests, sensitivity analysis, or another validation framework?
    • How do you communicate confidence in your results to stakeholders when you can’t directly verify the “ground truth”?

    I’m interested in hearing how experienced data scientists approach this in production environments, particularly when the results drive high-value business decisions.

Loading more threads