<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sujit Singh on Medium]]></title>
        <description><![CDATA[Stories by Sujit Singh on Medium]]></description>
        <link>https://medium.com/@sujitkumarsingh29?source=rss-453b6885834e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RUBHOrii2pAVhGy1mW_odA.jpeg</url>
            <title>Stories by Sujit Singh on Medium</title>
            <link>https://medium.com/@sujitkumarsingh29?source=rss-453b6885834e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:43:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sujitkumarsingh29/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Data to Insight: Helpshift’s Journey with ML Observability]]></title>
            <link>https://medium.com/helpshift-engineering/from-data-to-insight-helpshifts-journey-with-ml-observability-9680e27d1d01?source=rss-453b6885834e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9680e27d1d01</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Sujit Singh]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 14:00:15 GMT</pubDate>
            <atom:updated>2025-11-26T14:00:15.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXRRIPO4gFvMmVTupmCGOA.png" /></figure><h3>Introduction</h3><p>In an age where artificial intelligence (AI) and machine learning (ML) are integral to almost every aspect of our lives, ensuring the effectiveness, fairness, and reliability of ML models is paramount. Observability plays a crucial role in maintaining the performance of these models, allowing us to detect and resolve issues promptly. At Helpshift, we recognized the need for robust ML observability to keep our models running smoothly and efficiently.</p><p>This blog post explores our journey in building a custom ML observability solution tailored to our specific needs. We’ll delve into the concept of ML observability, discuss the limitations of existing tools, and share how we implemented our own solution based on the idea of “Wide Events.”</p><h4>Understanding ML Observability</h4><p>ML observability is the ability to monitor and understand the performance, behavior, and outputs of machine learning models in real-time. It enables us to proactively identify potential issues and anomalies, facilitating timely interventions and mitigating risks. ML observability encompasses several key components:</p><ul><li><strong>System Monitoring</strong>: Tracking the performance of the infrastructure where ML services are deployed, including metrics like CPU and memory usage, network traffic, disk space, and service performance.</li><li><strong>Inference Monitoring</strong>: Evaluating and auditing the real-time performance of deployed ML models in production by tracking incoming requests and the accuracy of model predictions.</li><li><strong>Model Monitoring</strong>: Observing the long-term accuracy of ML models by monitoring key metrics such as accuracy, precision, recall, and F1-score, and detecting any drift over time.</li></ul><h4>Why Observability Matters</h4><p>If you’ve ever played <strong>Age of Empires</strong>, you know how crucial it is to explore the map to manage resources proactively and strategize effectively. Similarly, ML observability is about exploring properties and patterns not determined in advance. It allows us to be proactive in debugging and improving our systems, ensuring that our ML models remain reliable and efficient.</p><p>As my colleague @<a href="https://medium.com/u/9f0a9ecd0a2b">Utkarsh</a> aptly put it, observability is like having a comprehensive map of your ML environment, enabling you to navigate challenges and seize opportunities before they impact your system.</p><h4>The Limitations of Existing Observability Tools</h4><p>The market offers a variety of observability tools, ranging from traditional telemetry solutions to the latest language model (LLM) monitoring systems, as well as system monitoring and logging tools like Kibana. While these tools are powerful and feature-rich, they come with complexities and challenges:</p><ul><li><strong>Complexity and Overhead</strong>: Many solutions require significant setup and maintenance, adding complexity to the observability process.</li><li><strong>Cost</strong>: High licensing and operational costs can be a burden, especially for small to mid-sized companies.</li><li><strong>Flexibility</strong>: Off-the-shelf solutions might not align perfectly with specific needs, leading to either overkill or insufficient coverage.</li><li><strong>Data Silos</strong>: Different tools for metrics, logs, and traces can lead to fragmented data, making it difficult to correlate events and gain holistic insights.</li></ul><h3>Embracing Wide Events: A New Approach to Observability</h3><p>Inspired by the concept discussed in the article <a href="https://isburmistrov.substack.com/p/all-you-need-is-wide-events-not-metrics">“All You Need is Wide Events, Not ‘Metrics, Logs and Traces’”</a>, we realized that logging wide events provided the granularity and context needed for effective monitoring and debugging.</p><h4>What Are Wide Events?</h4><p><strong>Wide events</strong> are comprehensive, structured logs that capture a broad set of key-value pairs, encompassing all relevant information about an event or operation in your system. Unlike traditional metrics or logs, wide events are designed to include as much context as possible, making them highly versatile for analysis.</p><p>For example, a wide event for an ML prediction might include:</p><ul><li><strong>Timestamp</strong></li><li><strong>Model Version</strong></li><li><strong>Input Features</strong></li><li><strong>Predicted Output</strong></li><li><strong>Actual Output (if available)</strong></li><li><strong>Latency</strong></li><li><strong>User ID</strong></li><li><strong>Request ID</strong></li><li><strong>System Metrics (CPU, Memory usage at the time)</strong></li></ul><p>By capturing detailed information in each event, we can perform granular analyses, correlate different aspects of our system, and uncover insights that might be missed with traditional observability approaches.</p><h4>Advantages of Wide Events</h4><ul><li><strong>Granularity</strong>: Provides detailed context for each event, enabling deep dives into system behavior.</li><li><strong>Flexibility</strong>: Allows for dynamic querying and filtering without the need for predefined metrics.</li><li><strong>Simplification</strong>: Eliminates the need to manage separate systems for logs, metrics, and traces.</li></ul><h3>Why We Built Our Own Observability Solution</h3><p>Recognizing the limitations of existing tools and the benefits of wide events, we decided to build our own observability solution based on simple logging. This approach provided several key benefits:</p><ul><li><strong>Simplicity and Control</strong>: By leveraging a logging-based approach with wide events, we gained complete control over our observability processes, tailoring the system precisely to our needs without the overhead of complex telemetry tools.</li><li><strong>Focused Use Case</strong>: Our main objective was to efficiently monitor ML observability events. A focused, logging-based solution allowed us to design the system specifically for our requirements.</li><li><strong>Cost-Effectiveness</strong>: By utilizing our existing infrastructure and open-source tools, we maintained low costs while achieving robust observability.</li><li><strong>Unified Data</strong>: Storing all observability data as wide events in a single system eliminated data silos, making it easier to correlate events and gain holistic insights.</li></ul><h3>How We Implemented Our Observability Pipeline</h3><h4>Architecture Overview</h4><p>Our observability pipeline consists of three main components:</p><ol><li><strong>Application Services Generating Wide Events</strong>: Our ML services generate detailed observability logs as wide events, capturing all relevant data points about each prediction or operation.</li><li><strong>Logging in a Distributed Event Store and Stream-Processing Platform (Kafka)</strong>: We use Kafka to handle the high volume of logs generated, efficiently ingesting and distributing ML observability events in real-time.</li><li><strong>Consuming and Storing in Cloud Storage (Secor and S3)</strong>: We utilize Secor to consume logs from Kafka, process them as needed, and store them in Amazon S3 for durable, scalable storage.</li></ol><h4>Data Visualization and Analysis</h4><p>To derive insights from the stored logs, we use <strong>Amazon Athena</strong>, which allows us to query and analyze data directly from S3 using standard SQL. This setup eliminates the need for complex processing pipelines and enables us to create dashboards, generate meaningful metrics, and perform deep dives into our observability data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZvfS_TPst8wOtrff81Qgg.png" /><figcaption><em>Figure: High-level architecture of our observability pipeline.</em></figcaption></figure><h4>Implementation Details</h4><ul><li><strong>Kafka Integration</strong>: Our application services publish wide events to Kafka topics dedicated to ML observability. Kafka’s scalability and fault-tolerance ensure that we can handle large volumes of data without loss.</li><li><strong>Secor Processing</strong>: Secor consumes events from Kafka, partitions them appropriately (e.g., by date or event type), and writes them to S3 in a structured format like Parquet or JSON, optimizing for query performance.</li><li><strong>Athena Queries</strong>: We define schemas for our wide events in Athena, allowing us to run ad-hoc SQL queries, create views, and integrate with visualization tools like Amazon QuickSight or Grafana.</li></ul><h4>What We Log: Data and Events</h4><p>Our logging focuses on capturing detailed ML observability events as wide events. Key types of data and events include:</p><ul><li><strong>Prediction Results</strong>: Details of each prediction made by our ML models, including input features, predicted outputs, and confidence scores.</li><li><strong>Performance Metrics</strong>: Metrics such as latency, throughput, and error rates at the time of each prediction.</li><li><strong>Anomalies and Exceptions</strong>: Any detected anomalies, exceptions, or errors encountered during model execution.</li><li><strong>User Feedback</strong>: Feedback from users, such as corrections or satisfaction ratings, which can be correlated with model performance.</li></ul><h4>Example of a Wide Event</h4><pre>{<br>  &quot;timestamp&quot;: &quot;2023-10-01T12:34:56Z&quot;,<br>  &quot;model_name&quot;: &quot;intent_classifier_v2&quot;,<br>  &quot;model_version&quot;: &quot;2.3.1&quot;,<br>  &quot;input_text&quot;: &quot;How do I reset my password?&quot;,<br>  &quot;predicted_intent&quot;: &quot;password_reset&quot;,<br>  &quot;confidence_score&quot;: 0.92,<br>  &quot;actual_intent&quot;: null,<br>  &quot;user_feedback&quot;: null,<br>  &quot;latency_ms&quot;: 45,<br>  &quot;request_id&quot;: &quot;abc123xyz&quot;,<br>  &quot;user_id&quot;: &quot;user_789&quot;,<br>  &quot;cpu_usage&quot;: 55.3,<br>  &quot;memory_usage&quot;: 1024,<br>  &quot;host&quot;: &quot;ml-service-1&quot;<br>}</pre><p>By capturing all relevant information in a single event, we enable comprehensive analysis and debugging capabilities.</p><h4>Benefits of Our Approach</h4><ul><li><strong>Scalability</strong>: Kafka and S3 ensure the pipeline handles large data volumes without bottlenecks.</li><li><strong>Flexibility</strong>: Wide events allow for dynamic querying and analysis without the need for predefined metrics.</li><li><strong>Cost-Effectiveness</strong>: Utilizing open-source tools and existing infrastructure keeps costs low.</li><li><strong>Improved Debugging</strong>: Detailed logs enable us to quickly identify and resolve issues, maintaining model reliability.</li><li><strong>Enhanced Insights</strong>: The ability to slice and dice data in Athena allows us to uncover patterns and insights that inform model improvements.</li></ul><h3>Overcoming Challenges</h3><h4>Versioning and Schema Evolution</h4><p>One of the challenges we faced was managing versioning and schema changes in our logs. As our models and logging requirements evolved, we needed a strategy to handle changes without disrupting analysis.</p><p><strong>Solution</strong>:</p><ul><li><strong>Schema Versioning</strong>: We include a schema_version field in each wide event, allowing us to track changes and apply appropriate parsing logic.</li><li><strong>Flexible Schemas</strong>: By using formats like JSON and tools that support schema-on-read (like Athena), we can handle missing or additional fields gracefully.</li></ul><h4>Data Quality and Consistency</h4><p>Ensuring the quality and consistency of the logged data is crucial for accurate analysis.</p><p><strong>Solution</strong>:</p><ul><li><strong>Validation</strong>: Implement validation checks in our application services to ensure that all required fields are present and correctly formatted.</li><li><strong>Monitoring</strong>: Set up alerts for anomalies in the logging pipeline, such as sudden drops in event counts or unexpected field values.</li></ul><h3>How It Benefits Helpshift</h3><p>Our custom observability solution has brought significant benefits to Helpshift:</p><ul><li><strong>Derived Metrics</strong>: We can derive meaningful metrics from logged events, such as model accuracy over time, latency distributions, and error rates.</li><li><strong>Enhanced Debugging</strong>: Detailed, contextual logs enable rapid identification and resolution of issues, minimizing downtime and impact on users.</li><li><strong>Continuous Improvement</strong>: Incorporating user feedback into our logs allows us to refine our models continuously, enhancing user satisfaction and engagement.</li><li><strong>Proactive Monitoring</strong>: Real-time analysis capabilities enable us to detect anomalies and address them before they escalate into larger problems.</li></ul><h3>Conclusion</h3><p>At Helpshift, our journey to building a robust ML observability solution was driven by the need for simplicity, control, and cost-effectiveness. By focusing on logging wide events, we created a scalable and flexible pipeline that meets our needs and helps us maintain the reliability and performance of our ML models.</p><p>Our approach demonstrates that with thoughtful design and leveraging existing open-source tools, small to mid-sized companies can implement effective observability solutions tailored to their specific needs.</p><h3>References</h3><ul><li><a href="https://isburmistrov.substack.com/p/all-you-need-is-wide-events-not-metrics">“All You Need is Wide Events, Not ‘Metrics, Logs and Traces</a>’” by Charity Majors</li><li><a href="https://jxnl.github.io/blog/writing/2024/02/28/levels-of-complexity-rag-applications/#level-3-observability">“Levels of Complexity in RAG Applications”</a></li></ul><h3>Join the Conversation</h3><p>We’d love to hear about your experiences with ML observability. Have you implemented a similar solution or faced challenges in monitoring your ML models? Share your thoughts and let’s learn together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9680e27d1d01" width="1" height="1" alt=""><hr><p><a href="https://medium.com/helpshift-engineering/from-data-to-insight-helpshifts-journey-with-ml-observability-9680e27d1d01">From Data to Insight: Helpshift’s Journey with ML Observability</a> was originally published in <a href="https://medium.com/helpshift-engineering">helpshift-engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>