<?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 Parv Oberoi on Medium]]></title>
        <description><![CDATA[Stories by Parv Oberoi on Medium]]></description>
        <link>https://medium.com/@parv.oberoi?source=rss-6b5d19666358------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7bDwnmEA2LdFFbt9</url>
            <title>Stories by Parv Oberoi on Medium</title>
            <link>https://medium.com/@parv.oberoi?source=rss-6b5d19666358------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 09:53:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@parv.oberoi/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[Upgrading Python from 3.9 to 3.11: Leveraging AI Tools for a Smooth Transition]]></title>
            <link>https://medium.com/techmindtickle/upgrading-python-from-3-9-to-3-11-leveraging-ai-tools-for-a-smooth-transition-f502d5da3944?source=rss-6b5d19666358------2</link>
            <guid isPermaLink="false">https://medium.com/p/f502d5da3944</guid>
            <category><![CDATA[windsurf]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[cursor-ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Parv Oberoi]]></dc:creator>
            <pubDate>Wed, 02 Apr 2025 06:14:16 GMT</pubDate>
            <atom:updated>2025-04-02T06:14:16.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEXhBLSobQJUQj6CWSyqlg.png" /></figure><p>Upgrading Python versions unlocks significant performance improvements and introduces exciting new features. As we well know every software engineer truly dreams of spending their days untangling cryptic dependency errors and decoding obscure deprecation warnings. and thus version upgrade projects are the most sought after and overfunded projects in every company. Jokes aside, handling such tasks can genuinely be challenging and cumbersome, especially in extensive codebases without unit tests.</p><p>Thankfully, powerful AI-driven IDE tools, like <strong>Cursor</strong> and <strong>Windsurf</strong>, with their agentic capabilities, have made this notoriously tedious process far more manageable — and dare I say, enjoyable.</p><h3>Why Upgrade to Python 3.11?</h3><p>Python 3.11 brings multiple benefits:</p><ul><li><strong>Faster Execution:</strong> Significant performance improvements compared to 3.9.</li><li><strong>Enhanced Features:</strong> Improved error messages, better typing, and more intuitive syntax.</li></ul><p>But upgrading isn’t just clicking a button — especially without tests.</p><h3>Scope of the Challenge</h3><p>Before diving into the <strong>How</strong>, it’s worth outlining the scope of the challenge we faced:</p><ul><li><strong>Repository 1:</strong> ~700 lines of code across 18 files — <strong>Number of unit tests: 0</strong></li><li><strong>Repository 2:</strong> ~6000 lines of code across 150+ files — <strong>Number of unit tests: 0</strong></li></ul><h3>Our Approach to Solving the Problem</h3><p>To tackle the challenge effectively, we adopted a phased strategy:</p><ol><li><strong>Add unit tests to increase test coverage to 90%+ using the current Python version</strong>.</li><li><strong>Upgrade to Python 3.11 and resolve any dependency conflicts</strong></li><li><strong>Re-run the test suite post-upgrade</strong> — Any failing tests now directly point to upgrade-related issues, which we fixed by updating the underlying code.</li></ol><p>This structured approach ensured that the upgrade was both efficient and low-risk.</p><h3>Step 1: Establishing Unit Test Coverage</h3><p>Our first goal: achieve over 90% unit test coverage to facilitate a reliable and smooth transition.</p><h3>Using Cursor</h3><p>For a small repository (~700 lines, 8–9 files), we chose <strong>Cursor</strong>, an IDE powered by GPT models, utilizing its single-file chat mode:</p><ul><li><strong>Process:</strong> Directly prompted Cursor to generate isolated pytest-compatible unit tests.</li><li><strong>Outcome:</strong> Achieved rapid success, effortlessly reaching our coverage targets.</li></ul><p>The simplicity was exceptional:</p><blockquote><strong>Important takeaway:</strong> Cursor excels in straightforward, manageable codebases, making tedious manual testing nearly obsolete. (Note: This testing was conducted before Cursor added its agentic support.)</blockquote><h3>Scaling Up with Windsurf’s Agentic Automation</h3><p>However, our next repository involved over 6000 lines across 150+ files. Clearly, the manual approach wouldn’t cut it.</p><p>Enter <strong>Windsurf</strong>, an agentic IDE tool designed precisely for this kind of challenge.</p><h4>Agentifying the Requirements</h4><p>We codified our manual process into an actionable Windsurf prompt:</p><pre>source .venv/bin/activate &amp;&amp; coverage run --source &lt;folder_1&gt; -m pytest tests &amp;&amp; coverage report --show-missing</pre><pre>use the missing coverage information to find the file with the highest number of uncovered lines and write unit tests for them under ./tests/&lt;folder_1&gt;/</pre><pre>write the unit tests compatible with pytest, ensuring isolation using appropriate setup and teardown. Do not alter existing code; iterate solely on tests to ensure successful execution.</pre><h4>Windsurf’s Results:</h4><ul><li>Automatically prioritized files based on uncovered lines.</li><li>Generated isolated, comprehensive unit tests.</li><li>Dramatically reduced manual intervention, quickly hitting the desired coverage mark.</li></ul><blockquote><strong>Important takeaway:</strong> Windsurf effectively automates testing at scale, efficiently handling complex codebases.</blockquote><h3>An Unexpected Discovery: Python Coverage Tool</h3><p>Interestingly, during this upgrade journey, we discovered that Python’s coverage tool is smarter than we initially thought — perhaps even too smart. It identifies and displays coverage for code that might execute during startup, even without explicit unit tests targeting those lines. This nuance can make interpreting coverage reports slightly misleading, highlighting the importance of careful review and understanding of what the tool actually reports.</p><p>To drive greater confidence in our coverage numbers, we use the `dynamic_context` option within the python coverage tool to validate that the coverage numbers being reported are powered by actual tests.</p><h3>Step 2: Performing the Upgrade</h3><p>With robust tests in place, upgrading from Python 3.9 to 3.11 became straightforward</p><h3>Identifying and Resolving Issues</h3><p>Our comprehensive test suite quickly highlighted:</p><ul><li><strong>Deprecated APIs and syntax adjustments</strong> required by Python 3.11<br>- <em>TypeError: Passing coroutines is forbidden, use tasks explicitly</em> was deprecated since 3.8 but removed in 3.11</li><li><strong>Dependency version conflicts</strong> needing resolution.</li></ul><h3>AI vs Traditional Approaches: A Side-by-Side Comparison</h3><p>To fully appreciate the impact of this AI-powered workflow, it’s worth contrasting it with how things would typically unfold using a conventional, non-AI approach.</p><h3>🚀 AI-Powered Workflow:</h3><ul><li>Completed the upgrade of both repositories in <strong>under one week</strong>.</li><li>Required <strong>no prior knowledge</strong> of the codebase or collaboration with original developers.</li><li>Used AI not just for generating code, but also for understanding local testing setups, including external dependencies like <strong>RabbitMQ</strong>.</li><li>Enabled a single engineer to perform a large-scale upgrade with minimal context or support.</li></ul><h3>🐢 Traditional Workflow:</h3><ul><li>Likely a <strong>multi-month project</strong>, requiring multiple sprints and dedicated engineering time.</li><li>Dependent on <strong>deep domain expertise</strong> and intimate familiarity with code structure.</li><li>Would need manual exploration, documentation review, and trial-and-error to configure test environments.</li><li>Involves multiple rounds of coordination with original code owners to ensure accuracy.</li></ul><blockquote><strong><em>Key takeaway:</em></strong><em> AI tools are not just accelerators — they’re enablers. What was once only feasible by domain experts is now accessible to any motivated engineer with a good prompt.</em></blockquote><h3>Tools Used</h3><p>Throughout this process, several tools and models played a critical role in making the upgrade painless and successful:</p><h3>IDEs &amp; Utilities:</h3><ul><li><strong>Cursor</strong></li><li><strong>Windsurf</strong></li><li><strong>uv</strong></li><li><strong>ruff</strong></li><li><strong>black</strong></li></ul><h3>Models Leveraged:</h3><p>In order of their effectiveness and performance for test generation</p><ul><li><strong>OpenAI o3-mini</strong></li><li><strong>DeepSeek R1</strong></li><li><strong>Claude Sonnet 3.5</strong></li></ul><h3>Future Work</h3><h4>Validating Quality of Tests</h4><p>While achieving 90%+ unit test coverage was a major milestone, coverage alone doesn’t always reflect test quality. To further validate and enhance the effectiveness of our tests, our next step involves <strong>mutation testing</strong> to build greater confidence in our coverage metrics.</p><h4>Static Analysis</h4><p>Use mypy for static analysis to fix any legacy code smell patterns that exist in our projects.</p><h3>Some AI Idiosyncrasies Faced</h3><p>While AI tools significantly accelerated our upgrade journey, they weren’t without quirks. To highlight a few issues that cropped up during the process:</p><ul><li><strong>Imaginary Dependencies:</strong> The LLM occasionally tried to install packages that didn’t exist — for example, it confidently recommended ddtrace==1.25.0, which is not a valid version.</li><li><strong>Unwanted Dependency Substitutions:</strong> The LLM persistently suggested replacing our optimized orjson dependency with ujson, as a pure-Python alternative, likely due to popularity bias in training data.</li></ul><p>While minor, these missteps highlight the importance of maintaining human oversight, even when AI is doing the heavy lifting.</p><h3>Conclusion: AI Tools — Turning Dread into Delight</h3><p>While wrestling with dependency issues and compatibility might not be what we envisioned when choosing software engineering, tools like Cursor and Windsurf have truly transformed the experience.</p><p>Not only did we successfully upgrade our Python versions, but we also substantially improved our project’s reliability and maintainability. That’s an upgrade story genuinely worth celebrating!</p><p><strong>Did you know about Python’s coverage tool behaviour?</strong></p><p>If you’ve encountered this or have insights, please leave a comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f502d5da3944" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techmindtickle/upgrading-python-from-3-9-to-3-11-leveraging-ai-tools-for-a-smooth-transition-f502d5da3944">Upgrading Python from 3.9 to 3.11: Leveraging AI Tools for a Smooth Transition</a> was originally published in <a href="https://medium.com/techmindtickle">Mindtickle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamlining LLM Evaluations: Introducing Mindtickle’s LLMOps Platform]]></title>
            <link>https://medium.com/techmindtickle/streamlining-llm-evaluations-introducing-mindtickles-llmops-platform-a9a8880554bf?source=rss-6b5d19666358------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9a8880554bf</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llmops]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[platform]]></category>
            <dc:creator><![CDATA[Parv Oberoi]]></dc:creator>
            <pubDate>Mon, 06 Jan 2025 04:49:15 GMT</pubDate>
            <atom:updated>2025-01-06T07:51:04.633Z</atom:updated>
            <content:encoded><![CDATA[<p>The advent of <strong>Large Language Models (LLMs)</strong> have undeniably revolutionised how businesses build, communicate, and interact with their customers. At <strong>Mindtickle</strong>, we’ve embraced this revolution by integrating LLMs across our product stack, powering features that our customers engage with daily. However, with great power comes great responsibility — and a fair share of challenges.</p><p>One of the most significant hurdles we have faced is the regular evaluation and monitoring of these LLM-powered features. The rapid pace of development in the LLM ecosystem means new models are released constantly, each claiming superior performance in specialised or general capabilities. In such a dynamic landscape, relying on a single LLM model, version, or vendor could result in a subpar experience for our customers.</p><p>So, how do we stay ahead of the curve?</p><h3>The Challenge: Navigating a Fast-Paced LLM Landscape</h3><p>In a world where LLM vendors are in a constant race to outdo one another, it’s crucial to ensure that the models we deploy are truly the best fit for our real-world problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mY32v8c7cjolYpDYjXRHOQ.png" /><figcaption>source: <a href="https://arxiv.org/html/2406.00515v1">https://arxiv.org/html/2406.00515v1</a></figcaption></figure><p>The question we grappled with was:</p><p><strong>How can we compare the performance of various LLM models, prompts, vendors, and configurations on problems relevant to Mindtickle? And when we decide to ship a change involving LLMs into our production ecosystem, how can we be confident that we’re improving the system as a whole?</strong></p><h3>The Solution: Enter LLM Flow — Our In-House LLMOps Platform</h3><p>To tackle this challenge, we developed <strong>LLM Flow</strong>, a centralized platform designed to simplify the process of evaluating usecases powered by LLMs. Built using the open-source <strong>Apache Airflow</strong>, LLM Flow allows us to reimagine our product features as pipelines, akin to any standard machine learning problem:</p><p>Using Airflow we are able to map these pipelines to Directed Acyclic Graphs or DAGs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*KO5znZ00YRFU9oj5O2wcfg.png" /></figure><h3>Tailoring Pipelines for Diverse Use Cases</h3><p>Each product team at Mindtickle can map their specific use cases into this pipeline. Thanks to the flexibility of Airflow, we can define utility operators to ingest data from any source — be it S3 buckets, direct API invocations, MySQL/Postgres databases, etc. Custom data transformation operators ensure we mimic production environment processes as closely as possible.</p><h3>A Library of LLM Vendor Integrations</h3><p>We’ve also developed a library of LLM vendor integrations. By standardising input and output schemas for LLM executions, product teams can seamlessly test their use cases across a variety of LLM models, vendors, and configurations. This uniformity accelerates the evaluation process and fosters consistency across different teams and projects.</p><h3>Metrics That Matter: Evaluating Performance and Cost</h3><p>Peter Drucker famously stated, “<strong>If you can’t measure it, you can’t improve it.</strong>” LLM Flow is designed not only to simplify model experimentation but also focusses on crucial measurement aspects.</p><p>The platform automatically calculates vital core metrics:</p><ul><li><strong>Tokens Consumed and Generated</strong>: Understanding token usage helps optimise prompts and manage costs.</li><li><strong>Latency</strong>: Measuring response times ensures the models meet our performance standards.</li><li><strong>Cost</strong>: Keeping track of expenses is crucial, especially when scaling up.</li></ul><p>Whenever a job is executed on LLM Flow, these metrics will be computed and presented out of the box to our users.</p><h3>Custom Evaluation Operators</h3><p>Beyond these standard metrics, product teams can build operators to evaluate the outputs generated by the LLM models. These evaluation operators range from simple tasks — like verifying if the output is a valid JSON — to complex assessments using LLM judge/jury prompts. By modularising these evaluations into operators, we maintain flexibility and adaptability in our assessment processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*skfu0IFIYt_lHDgUu4xJFg.png" /><figcaption>Sample DAG for Classification</figcaption></figure><h3>Speed and Efficiency: Evaluating New Models in Under 24 Hours</h3><p>One of the standout benefits of LLM Flow is the speed at which we can integrate and evaluate new models. With our comprehensive library and standardized processes, whenever a vendor releases a new model, we’re able to incorporate it and assess its performance on our suite of use cases in <strong>less than 24 hours</strong>.</p><p>This rapid turnaround is pivotal in ensuring that we consistently provide our customers with the best possible experience, leveraging cutting-edge technology without delays.</p><h3>The Complexity of Evaluating LLM Outputs</h3><p>Evaluating machine learning models has always been challenging, but LLMs introduce an even greater level of complexity and ambiguity. Traditional ML models often involve classification or regression tasks where outputs can be directly compared to known correct values. With LLMs, we’re dealing with large streams of generated text — like summaries or conversational answers — where exact matches are rare.</p><h3>Leveraging LLMs for Evaluation: The Judge and Jury Approach</h3><p>In these cases, instead of seeking exact matches, we employ other LLMs in a <strong>judge or jury setup</strong> to evaluate the outputs. This method allows us to assess the quality of the generated content more accurately, considering factors like coherence, relevance, and correctness, which are difficult to quantify otherwise.</p><p>With LLM Flow we are able to build dynamic DAGs which provide support for such evaluations.</p><h3>Comparing Evaluation Jobs</h3><p>If you are with us so far you would have realised a problem, its great that we are able to run all these evaluations but now we are faced with an unenviable task of comparing the results from each of the evaluation runs and identifying the best one.</p><p>We have streamlined this activity by exporting all the outputs generated by each operator within an experiment run to Snowflake. On Snowflake we have built dashboards powered by python notebooks and custom procedures which take in as input a single or list of LLM Flow run_ids and create a comparison view of the results simplifying the process of selecting the best option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blb5V47hWtdm-CcdY7GvLw.png" /><figcaption>Single Run Comparison</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_JnfwRVe-wDF86EArOgdw.png" /><figcaption>Batch Run Comparison</figcaption></figure><h3>Realtime Monitoring of LLM Powered Features</h3><p>Anyone who has deployed ML applications knows that ensuring your model performs as expected in Production is a similar if not a bigger challenge than building the POC. With LLM models realtime monitoring of problems such as data drift, model prediction distribution are even more complicated due to the unstructured nature of the inputs that these models work on.</p><p>In production where we use LLM we log the inputs sent to the LLM as well as the outputs generated by it, we can then sample this traffic and run evaluation pipelines already built in LLM Flow during the evaluation stage. This gives us the ability to understand how are features are performing for our end customers and thus catch any issues in terms of model performance degradation or data drift before it become a problem visible to our end users.</p><h3>Extending LLM Flow to Multi Modal Flow</h3><p>Initially, our platform development centered on unstructured text data, as our primary product features revolved around it. However, during this process, we discovered that significant errors in our system were stemming from our Automatic Speech Recognition (ASR) model, which frequently resulted in inaccurate transcriptions of calls, submissions, and other audio sources. Reflecting on the adage <strong>“Garbage In, Garbage Out,”</strong> it became clear that we needed to benchmark various ASR solutions using our data to identify the most suitable model for our needs.</p><p>Our team rapidly constructed an ASR benchmarking pipeline within LLM Flow, enabling us to integrate and evaluate multiple ASR vendors as well as self-hosted models (which warrants a separate blog post). This initiative allowed us to seamlessly extend LLM Flow into LMM Flow, significantly enhancing our platform’s capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vUj6IE6chavWAZjeXiV-nA.png" /></figure><h3>Looking Ahead: The Future of LLMs at Mindtickle</h3><p>The integration of LLMs into our products has opened up incredible possibilities at Mindtickle. However, ensuring these models perform optimally and deliver value to our customers requires robust evaluation and monitoring systems. <strong>LLM Flow</strong> has empowered us to navigate the fast-evolving LLM landscape confidently, enabling rapid testing and deployment of the best models for our needs.</p><p>As we continue to refine LLM Flow and adapt to new advancements, we’re excited about the future of LLMs and their potential to transform businesses and customer interactions even further.</p><p>Co-written by: <a href="https://medium.com/u/dae41b103190">Vyankatesh Deshpande</a>, <a href="https://medium.com/u/55abccea7560">Mayank Kumar</a>, <a href="https://medium.com/u/6b5d19666358">Parv Oberoi</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9a8880554bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techmindtickle/streamlining-llm-evaluations-introducing-mindtickles-llmops-platform-a9a8880554bf">Streamlining LLM Evaluations: Introducing Mindtickle’s LLMOps Platform</a> was originally published in <a href="https://medium.com/techmindtickle">Mindtickle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>