<?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 Kholashams on Medium]]></title>
        <description><![CDATA[Stories by Kholashams on Medium]]></description>
        <link>https://medium.com/@kholashams101?source=rss-ad5ec30b630------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*btaF-Hsoy3YaSTi19j3cVg.png</url>
            <title>Stories by Kholashams on Medium</title>
            <link>https://medium.com/@kholashams101?source=rss-ad5ec30b630------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:32:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kholashams101/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[Shopify’s Billing API Is Not Optional, and Almost Nobody Explains It Properly]]></title>
            <link>https://medium.com/@kholashams101/shopifys-billing-api-is-not-optional-and-almost-nobody-explains-it-properly-b161af261787?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/b161af261787</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ecommerce]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 04:01:01 GMT</pubDate>
            <atom:updated>2026-09-23T04:01:01.862Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What actually happens when a merchant clicks “approve” on your app’s pricing plan, why Shopify forces every charge through its own system, and the real difference between building billing yourself and letting Shopify run it for you.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FdYAZMyLYhm5HBaKca7m_w.png" /></figure><p>A while back I spent several weeks buried inside Shopify’s Billing API for a production app, the kind of stretch where you start dreaming in GraphQL mutations. Going in, I assumed billing would be the easy part. Auth felt like the scary bit: OAuth handshakes, encrypted tokens, HMAC signatures on every webhook. Billing, I figured, was just “charge the customer’s card.” Stripe had already taught me that lesson, so how different could this be?</p><p>Very different, it turns out. Shopify does not let you charge a card at all. You never see a card number, never touch a payment processor, and never decide when money actually moves. Instead you describe a charge, Shopify shows the merchant a page asking them to approve it, and only after they click yes does anything become real, and even then you find out through a webhook, not through the API call that started the whole thing. It is less like building a checkout and more like filing a request with a bank and waiting for a letter back.</p><p>Once that clicked, the rest of the system made a lot more sense. This piece is my attempt to explain it properly: what the Billing API actually does, the three things you can sell through it, the sharp edges that will bite you if you do not know they exist, and the increasingly important second option Shopify now offers, one where you barely write any billing code at all. If you build an app that will live on the Shopify App Store, you will run into this decision early, and it is worth understanding both sides before you commit to one.</p><h3>Why you cannot just use Stripe</h3><p>The first surprising rule: if your app charges a merchant for something inside the Shopify admin, that charge has to go through Shopify’s own billing system. Not Stripe, not Paddle, not a custom checkout you built yourself. Shopify’s Partner Program Agreement requires it for anything listed on the App Store, and Shopify has been direct about this in its own developer documentation, stating plainly that “all charges associated with apps submitted to the Shopify App Store must use Shopify’s billing system.”</p><p>The reasoning is not arbitrary. When a charge goes through Shopify’s billing system, it shows up as a single line item on the merchant’s normal Shopify invoice, the same bill that covers their Shopify plan and their other apps. The merchant never re-enters a card number for your app specifically. Shopify handles the collection, absorbs the payment risk, deals with chargebacks, and pays you out on a schedule. In exchange for giving up direct control of the money, you get merchant trust you could never buy on your own: paying for your app feels exactly like paying for Shopify itself, because technically, it is the same invoice.</p><p>There are two ways to satisfy that requirement, and this is the split the rest of this article is really about. You can build the billing logic yourself using the Billing API, generally called manual pricing. Or you can let Shopify host the entire pricing page and manage the subscription lifecycle for you, a newer option officially called Shopify App Pricing, and known for years before that under its earlier name, Managed Pricing. Same underlying billing engine either way. Wildly different amounts of code.</p><h3>What you can actually sell</h3><p>Whichever path you take, Shopify recognizes three shapes of charge:</p><p><strong>One-time purchases.</strong> A single charge for a single thing: a credit pack, a one-off setup fee, an add-on that does not recur. The merchant approves it once, gets charged once.</p><p><strong>Recurring subscriptions.</strong> A flat fee on a fixed cycle, either every 30 days or annually. This is the classic SaaS tier: Basic, Pro, Enterprise, billed on autopilot until the merchant cancels or switches plans.</p><p><strong>Usage-based charges.</strong> A variable amount tied to consumption, API calls, orders processed, messages sent, whatever your app’s real cost driver happens to be, usually with a capped ceiling so the bill never runs away from the merchant. This can stand alone or ride alongside a recurring base fee in the same subscription.</p><p>Manual pricing gives you all three. Shopify App Pricing, notably, does not support one-time purchases at all. If your business model depends on selling a one-time credit pack or a setup fee, manual pricing is currently your only route, full stop.</p><h3>How manual pricing actually works, step by step</h3><p>Here is the one-time purchase flow, which is the simplest of the three and a good way to see the shape of the whole system.</p><p>Your backend calls the appPurchaseOneTimeCreate mutation with a name, a price, a currency code, and a return URL. Shopify&#39;s response is not a receipt, it is a confirmationUrl, a link to a page Shopify hosts and controls. You redirect the merchant there. They see the charge, they approve or decline it, and either way they land back on your return URL afterward.</p><p>That return-URL redirect is not the moment of truth, and this is the part that trips people up the first time. The redirect just tells you the merchant is done looking at the approval screen. It does not tell you whether they clicked yes. The actual confirmation arrives later, asynchronously, as a webhook: APP_PURCHASES_ONE_TIME_UPDATE, carrying a status of ACTIVE once the charge has genuinely gone through. Build your app so it grants access on that webhook, never on the redirect alone, or you will eventually hand out a paid feature to someone who backed out at the last screen.</p><p>Recurring subscriptions follow the same shape with more moving parts. You call appSubscriptionCreate with one or more line items describing the pricing structure (a flat recurring amount, a usage component, or both), a return URL, optionally a number of free trial days, and again you get back a confirmation URL. Approval settles through the APP_SUBSCRIPTIONS_UPDATE webhook rather than the redirect.</p><p>Usage-based billing adds one more piece. After the merchant approves a subscription that includes a usage line item, you record each unit of consumption yourself with appUsageRecordCreate, referencing the line item and an amount, and Shopify accumulates those records into the merchant&#39;s bill up to whatever cap you set when the subscription was created. Historically this meant you owned the entire metering pipeline: catching every event, writing every usage record, reconciling anything that failed. As of Shopify&#39;s App Pricing update in May 2026, there is now a newer App Events API that can absorb a lot of that bookkeeping for apps using the managed path, which I will come back to shortly.</p><h3>The constraints that will surprise you</h3><p>None of this is exotic once you know it, but nobody hands you this list up front, and it changes how you should design the system from day one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tyq46pJeSvx9-37VJPN9Q.png" /></figure><p>That last point deserves its own paragraph, because it is the one that will actually cost someone money if it is missed. A webhook delivery that returns a 200 tells Shopify the event is fully settled and it will never be sent again. If your handler acknowledges a billing webhook before it has actually finished crediting the merchant’s account, and something fails in between, you have told Shopify the job is done when it is not, and there is no natural retry coming to save you. The safer pattern, and the one I would build again, is to do the real work first and only return success once it has actually landed, so a genuine failure shows up as a retry rather than as silently lost money.</p><h3>Enter Shopify App Pricing, the “normal” path</h3><p>For a long time, manual pricing was the only option, which meant every app on the Store had independently rebuilt some version of the flow above: hosting a plans page, wiring up the mutations, handling the webhooks, tracking state that Shopify does not persist for you. Shopify eventually built a second path to remove that duplicated effort, first shipped as Managed Pricing and rebranded in May 2026 as Shopify App Pricing.</p><p>The idea is simple: you define your pricing plans inside the Partner Dashboard instead of in code, and Shopify hosts the entire plan-selection page, handles the approval flow, manages upgrades and downgrades, prorates changes, and runs trials, all without you writing a subscription mutation. Your app’s job shrinks down to checking whether the merchant currently has an active plan (by querying the Partner API or the admin’s billing status) and redirecting them to Shopify’s hosted pricing page if they do not.</p><p>Support for usage-based pricing under this managed path used to lag behind manual pricing, but that gap closed considerably with the App Events API, which went generally available in May 2026. Instead of you calling appUsageRecordCreate for every billable action, you define metered pricing (flat, graduated, or tiered) in the dashboard and your app just emits events. Shopify aggregates them, calculates the bill, and shows the merchant a running total on their own billing page. It is a meaningful step toward the metering model that Stripe and AWS have offered for years, just arriving on Shopify&#39;s own rails.</p><p>The tradeoff is control. You are working inside whatever the hosted page supports, and as of this writing that still means no one-time purchases, a five-meter cap per plan with a limit of six pricing tiers each, and once you opt into it, no new recurring charges through the manual Billing API on top of it. For a straightforward tiered SaaS app, that is rarely a real limitation. For something with a genuinely unusual pricing model, it can be a wall you hit fast.</p><h3>Manual pricing versus Shopify App Pricing, side by side</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjwPoWqvJGNMfSH-eguXcA.png" /></figure><p>If I were starting a new app today with a conventional tiered pricing model and nothing unusual about it, I would default to Shopify App Pricing and only reach for the manual Billing API if I hit a wall it genuinely cannot clear, like a one-time credit pack. If I already had a mature app with custom billing logic wired throughout the codebase, or a pricing model that does not fit neatly into fixed tiers and metered add-ons, I would stay on manual pricing rather than force a migration for its own sake. Developers switching between the two have reported that Shopify does not require a fresh app review just to make the change, which lowers the cost of getting the decision wrong the first time.</p><h3>What I’d tell someone about to build this</h3><p>The lesson that stuck with me most from actually building this is how much of billing correctness lives outside the API call itself. The mutation that creates a charge is the easy five minutes. The webhook handler that has to be idempotent, the entitlement logic that has to survive a canceled subscription losing its own period-end date, the decision about whether to acknowledge an event before or after the real work is done, that is where the actual engineering is. Shopify gives you a solid, well-documented set of primitives. It does not give you a state machine, and building a correct one is entirely on you.</p><p>The second lesson is smaller but just as practical: read the constraints table before you design your data model, not after. Knowing upfront that a merchant can only ever have one active subscription changes how you structure your database from the very first migration. Finding it out three weeks in means rewriting logic you already shipped.</p><p>And the third, honestly, is not to be intimidated by any of it. Once you see that the whole system boils down to “describe a charge, redirect for approval, wait for a webhook to confirm it really happened,” the rest is just carefully reading which mutation does what. It reads like a lot on the docs page. In practice it is a pattern you will recognize the second time you build it, whichever side of manual versus managed you end up choosing.</p><p><em>Technical details, mutation names, field behavior, and constraints described here were checked against Shopify’s own developer documentation and public community discussions as of September 2026. Shopify’s billing platform has been evolving quickly, most notably the May 2026 rebrand of Managed Pricing to Shopify App Pricing and the general availability of the App Events API, so specifics may shift again. Always check the live documentation before building against it.</em></p><h3>Sources and further reading</h3><p><strong>Official Shopify documentation</strong></p><ul><li>About billing for your app (overview, requirement to use Shopify’s billing system): <a href="https://shopify.dev/docs/apps/launch/billing">https://shopify.dev/docs/apps/launch/billing</a></li><li>Shopify App Pricing (managed pricing, setup, supported models, limitations): <a href="https://shopify.dev/docs/apps/launch/billing/managed-pricing">https://shopify.dev/docs/apps/launch/billing/managed-pricing</a></li><li>About subscription billing, manual pricing (one active subscription per merchant, supported cycles, combined recurring plus usage): <a href="https://shopify.dev/docs/apps/launch/billing/manual-pricing/subscription-billing">https://shopify.dev/docs/apps/launch/billing/manual-pricing/subscription-billing</a></li><li>Create usage-based subscriptions (appSubscriptionCreate, appUsageRecordCreate, cappedAmount): <a href="https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-usage-based-subscriptions">https://shopify.dev/docs/apps/launch/billing/subscription-billing/create-usage-based-subscriptions</a></li><li>Support one-time app purchases (appPurchaseOneTimeCreate, confirmationUrl, APP_PURCHASES_ONE_TIME_UPDATE): <a href="https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases">https://shopify.dev/docs/apps/launch/billing/support-one-time-purchases</a></li><li>AppSubscriptionReplacementBehavior enum reference (STANDARD, APPLY_IMMEDIATELY, APPLY_ON_NEXT_BILLING_CYCLE): <a href="https://shopify.dev/docs/api/admin-graphql/latest/enums/AppSubscriptionReplacementBehavior">https://shopify.dev/docs/api/admin-graphql/latest/enums/AppSubscriptionReplacementBehavior</a></li><li>Pass app review (billing system requirement, test mode rules, common rejection reasons): <a href="https://shopify.dev/docs/apps/launch/app-store-review/pass-app-review">https://shopify.dev/docs/apps/launch/app-store-review/pass-app-review</a></li></ul><p><strong>Industry coverage of the 2026 changes</strong></p><ul><li>Shopify developer changelog, “Shopify App Pricing: charge for usage, recurring subscriptions, or both”: <a href="https://shopify.dev/changelog/shopify-app-pricing-charge-for-usage-recurring-subscriptions-or-both">https://shopify.dev/changelog/shopify-app-pricing-charge-for-usage-recurring-subscriptions-or-both</a></li><li>Weaverse, “Shopify App Pricing: Usage-Based Billing GA via App Events API (May 2026)”: <a href="https://weaverse.io/blogs/shopify-app-pricing-usage-billing-app-events-api-platform-2026">https://weaverse.io/blogs/shopify-app-pricing-usage-billing-app-events-api-platform-2026</a></li></ul><p><strong>Developer community discussion</strong></p><ul><li>“Switching from Managed Pricing to Manual Pricing (Billing API),” Shopify Developer Community: <a href="https://community.shopify.dev/t/switching-from-managed-pricing-to-manual-pricing-billing-api/16280">https://community.shopify.dev/t/switching-from-managed-pricing-to-manual-pricing-billing-api/16280</a></li><li>“Major short-comings with Billing API and Proposed Solutions,” Shopify Community (cancellation state loss, webhook gaps, test mode discrepancies): <a href="https://community.shopify.com/t/major-short-comings-with-billing-api-proposed-solutions/5883">https://community.shopify.com/t/major-short-comings-with-billing-api-proposed-solutions/5883</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b161af261787" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering in 2026: A Field Guide to Every Major Technique (and When to Actually Use Each…]]></title>
            <link>https://medium.com/@kholashams101/prompt-engineering-in-2026-a-field-guide-to-every-major-technique-and-when-to-actually-use-each-f79946fff7d5?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/f79946fff7d5</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 04:01:01 GMT</pubDate>
            <atom:updated>2026-09-21T04:01:01.807Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prompt Engineering in 2026: A Field Guide to Every Major Technique (and When to Actually Use Each One)</h3><h3><strong>Zero-shot, few-shot, chain-of-thought, ReAct, self-consistency, meta-prompting, and the quiet shift toward “context engineering,” explained for people who build with LLMs, not just chat with them.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_boNofDEgrvw6H7kmTX0Wg.png" /></figure><p>Ask ten people what “prompt engineering” means and you’ll get ten different answers. To some, it’s typing “act as an expert” before a question. To others, it’s a rigorous discipline with named techniques, published papers, and measurable benchmark gains. Both are technically correct, which is exactly the problem. The term has been stretched thin enough to cover everything from a lucky ChatGPT trick to the architecture decisions behind production AI agents handling millions of requests.</p><p>I wanted to write the article I wish existed when I first started digging into this properly: something that actually goes through the research-backed categories of prompting techniques, where they came from, what problem each one solves, and, most importantly, when you should reach for one over another. We’ll also get into the elephant in the room. With reasoning models like OpenAI’s o-series and Claude’s extended thinking now doing a version of “thinking step by step” internally, is prompt engineering still a skill worth learning in 2026? Short answer: yes, but the skill has moved up a layer, and I’ll explain what that means.</p><p>Whether you’re a student trying to understand what’s actually being taught in that “AI prompting” course, a working professional trying to get more reliable output from the tools you use every day, or an engineer who wants to sanity-check whether any of this is technically sound, this is written for you.</p><h3>What Prompt Engineering Actually Is</h3><p>At its core, prompt engineering is the practice of designing the input to a language model, its instructions, structure, examples, and framing, to reliably steer the model’s output toward what you actually want, without changing the model’s underlying weights.</p><p>That last part matters a lot. It’s what separates prompt engineering from fine-tuning (which does update model weights on new data) and from retrieval-augmented generation, or RAG (which changes what information the model has access to, not how it reasons over it). Prompt engineering works entirely within the context window, the finite chunk of text the model sees before it generates a response.</p><p>Academic interest in this formalized fast. A widely cited 2024 survey, <a href="https://arxiv.org/abs/2402.07927"><em>A Systematic Survey of Prompt Engineering in Large Language Models</em></a>, catalogued dozens of distinct techniques and organized them by application. An even bigger effort, <a href="https://arxiv.org/abs/2406.06608"><em>The Prompt Report: A Systematic Survey of Prompt Engineering Techniques</em></a> by Schulhoff et al., built a formal taxonomy spanning 58 text-based prompting techniques and 40 more for other modalities, along with a standardized vocabulary so researchers would stop reinventing names for the same idea. That paper is basically the periodic table of this field, and it underpins a lot of the categorization below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVUjhBLhHJKUHdA1wjmgrg.png" /></figure><p>Before we get into individual techniques, it helps to sort them into five functional families, roughly following that taxonomy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dX25raWyyX7ram-V83hScQ.png" /></figure><ol><li>In-context learning: teaching the model a task using the prompt alone (zero-shot, few-shot)</li><li>Thought generation: getting the model to reason explicitly before answering (chain-of-thought and its variants)</li><li>Decomposition: breaking a hard problem into smaller ones (least-to-most, tree of thoughts)</li><li>Ensembling and self-criticism: using multiple attempts or a review pass to catch errors (self-consistency, self-refine)</li><li>Agentic and structural techniques: controlling format, persona, and tool use, or chaining prompts into multi-step pipelines (ReAct, prompt chaining, structured output)</li></ol><p>Let’s go through each one.</p><h3>1. Zero-Shot and Few-Shot Prompting: The Foundation</h3><p>Zero-shot prompting is simply asking the model to do a task with no examples, just an instruction. “Translate this sentence into French.” “Summarize this email in two sentences.” “Classify this review as positive or negative.” Modern large models are trained on such enormous and diverse data that they can often generalize to a new task description without ever having seen a worked example of it.</p><p>Few-shot prompting, introduced in the original GPT-3 paper <a href="https://arxiv.org/abs/2005.14165">“Language Models are Few-Shot Learners,”</a> instead shows the model two, three, or a handful of input-output pairs before asking it to complete a new one. This is in-context learning: the model isn’t being retrained, but it’s picking up on a pattern from the examples in front of it and applying that pattern to your actual query.</p><p>When is zero-shot enough? For general knowledge questions, common formatting tasks, anything close to what the model was heavily trained on already (translation, summarization, basic classification, code explanation). Modern instruction-tuned models are good enough at these that adding examples is often wasted context.</p><p>When do you actually need few-shot? The moment your desired output has an idiosyncratic structure, tone, or edge-case handling that’s hard to describe in words but easy to demonstrate. Classic cases include matching a very specific data-extraction schema, replicating a company’s exact voice in customer replies, or handling ambiguous classification boundaries (is this support ticket “urgent” or just “high priority”? Here are three examples of each). The research on few-shot prompting also flags subtle but real effects: the order of your examples, the balance of labels shown, and even the formatting of the examples all measurably change output. That’s why few-shot prompting is a skill, not just a copy-paste habit.</p><p>The tradeoff is cost and context. Every example eats tokens, and in agentic pipelines processing thousands of requests, that adds up fast in latency and spend. The rule of thumb worth internalizing: start zero-shot, add examples only when zero-shot output demonstrably misses the mark.</p><h3>2. Chain-of-Thought and the Reasoning Family</h3><p>The single most influential prompting discovery of the last few years came from a 2022 Google paper, <a href="https://arxiv.org/abs/2201.11903">Wei et al., “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.”</a> The finding was almost embarrassingly simple. If you show a model a few examples where the reasoning steps are spelled out before the final answer, rather than jumping straight to the answer, the model imitates that structure on new problems, and its accuracy on multi-step math, logic, and commonsense reasoning tasks jumps substantially.</p><p>A follow-up paper by <a href="https://arxiv.org/abs/2205.11916">Kojima et al.</a> found you don’t even need worked examples to get much of this benefit. The now-famous zero-shot chain-of-thought trick of simply appending “Let’s think step by step” to a prompt measurably improved reasoning performance across many models, without a single example provided.</p><p>From this root, a whole family of related techniques grew:</p><p><strong>Self-consistency</strong> (<a href="https://arxiv.org/abs/2203.11171">Wang et al.</a>): instead of generating one chain of reasoning, sample several different reasoning paths for the same question and take the majority-vote answer. This trades compute for reliability and works especially well on tasks with a single verifiable correct answer, like arithmetic or multiple-choice reasoning.</p><p><strong>Step-back prompting</strong>: ask the model to first state the general principle or concept behind a problem before solving the specific instance. Useful for problems that require recalling a formula or rule correctly before applying it.</p><p><strong>Least-to-most prompting</strong>: explicitly decompose a hard problem into an ordered list of easier sub-problems, solve them in sequence, and use each answer to inform the next.</p><p><strong>Tree of Thoughts</strong> (<a href="https://arxiv.org/abs/2305.10601">Yao et al., NeurIPS 2023</a>): rather than one linear chain, the model explores multiple reasoning branches at each step, self-evaluates which branches look promising, and can backtrack. It’s much closer to how a person might actually search through possible solution paths on a genuinely hard puzzle, at the cost of a lot more model calls.</p><p>When do these matter? Any task with multiple logical or arithmetic steps where a single hasty pass tends to produce a plausible-looking but wrong answer: multi-step math word problems, logic puzzles, code debugging, complex extraction with dependent conditions, planning tasks with constraints.</p><p>When do they not help much? Simple factual lookups, straightforward classification, or short generative tasks. Forcing a model to “think step by step” about “what’s a good name for my coffee shop” just wastes tokens.</p><h3>The reasoning-model wrinkle</h3><p>Here’s where 2026 changes the calculus. Since the release of OpenAI’s o-series and Claude’s extended thinking mode, a new class of models performs an internal reasoning process before producing a visible answer, essentially doing chain-of-thought under the hood regardless of how you phrase your prompt. OpenAI’s own <a href="https://developers.openai.com/api/docs/guides/reasoning-best-practices">reasoning best-practices guidance</a> is pretty direct about this: prompting these models to “think step by step” or “explain your reasoning” is often unnecessary and can even interfere with their internal process. Their advice instead is to keep instructions simple and explicit, state your constraints and success criteria plainly, use clear structural delimiters (headers, XML tags) to separate parts of a complex prompt, and default to zero-shot, only adding examples if you have evidence they help.</p><p>Anthropic’s guidance for Claude points in a similar direction. For complex reasoning, extended thinking is now generally recommended over manually engineered chain-of-thought scaffolding, and heavy role-play or excessive structural boilerplate is described as less necessary than it used to be with earlier-generation models.</p><p>The practical takeaway isn’t “chain-of-thought is dead.” It’s that the technique has partially moved from something you write into something the model does natively. Your job as a prompt engineer shifts from manufacturing reasoning to specifying the goal and constraints clearly enough that the model’s own reasoning lands on the right target. You still need CoT-style prompting for non-reasoning or smaller, cheaper models, for reasoning you specifically want to see and audit, and for structuring how intermediate reasoning gets used in a larger pipeline.</p><h3>3. Decomposition and Agentic Techniques: When One Prompt Isn’t Enough</h3><p>Some tasks are too large, or too dependent on external, changing information, to solve in a single prompt-response round trip. Three techniques matter most here.</p><p>Prompt chaining breaks a complex job into a sequence of smaller prompts, where the output of one becomes the input to the next: draft, then critique, then revise; or extract, then classify, then summarize. This is less a “trick” and more basic software design applied to LLM calls. Smaller, well-scoped prompts are individually easier to get right, easier to debug, and easier to swap out than one enormous mega-prompt trying to do everything at once.</p><p>ReAct (“Reasoning and Acting”), from <a href="https://arxiv.org/abs/2210.03629">Yao et al., 2022</a>, interleaves reasoning traces with concrete actions, typically calls to external tools, search, or APIs, in a repeating Thought → Action → Observation loop. The insight was that pure chain-of-thought reasoning is fluent but ungrounded. A model can construct a perfectly logical-sounding chain of reasoning built on a hallucinated fact. ReAct fixes this by letting the model pause, take an action like a web search or database query, observe the real result, and fold that back into its reasoning before continuing. This is the conceptual backbone of most modern “agents,” the coding assistants that can run tests, research agents that can search the web, customer-service bots that can look up an order status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*le7xQwJdWPUN3tFkI-_ZPA.png" /></figure><p>Use ReAct or tool-augmented prompting for anything knowledge-intensive where facts can change or aren’t in the model’s training data, and for any task that genuinely requires interacting with an external system rather than just generating text. Plain CoT is fine on its own for self-contained reasoning problems where all the necessary information is already sitting in the prompt.</p><h3>4. Techniques for Controlling Output, Not Just Reasoning</h3><p>A large share of real-world prompt engineering isn’t about reasoning quality at all. It’s about wrestling the format, tone, and reliability of output into something a downstream system or a human reader can actually use.</p><p>Role and persona prompting (“You are a senior security auditor reviewing this code…”) sets a frame that shifts vocabulary, level of formality, and which details the model foregrounds. It’s genuinely useful for tone-shifting tasks, writing in a specific register, adopting a domain lens, but it isn’t a magic upgrade to reasoning ability, and current guidance from major labs increasingly treats heavy persona scaffolding as optional polish rather than a core reliability lever.</p><p>Style prompting directly specifies tone, formality, and voice constraints without necessarily invoking a persona (“respond in plain, jargon-free English at an 8th-grade reading level”) and tends to be more reliable than persona framing when all you want is style control.</p><p>Structured output prompting, asking for and increasingly enforcing JSON, XML, or a fixed schema, has become essential infrastructure rather than a nice-to-have, because so much LLM output today feeds directly into other software rather than being read by a human. Most major model providers now support constrained decoding or explicit “JSON mode” and structured-output APIs that guarantee schema-valid output, instead of relying purely on the prompt asking nicely for valid JSON. The prompting skill that remains is specifying the schema precisely, giving field-level guidance for ambiguous cases, and deciding what the model should do when a field can’t be filled. Return null? Omit it? Make its best guess and flag it?</p><p>Prefilling, supported by Claude and several other APIs, lets you seed the beginning of the model’s own response, which is a highly reliable way to force a specific format or skip preamble like “Sure, here’s your JSON:” that models otherwise tend to add.</p><p>These matter for any pipeline where output is parsed by code, any customer-facing application where tone consistency matters, and any workflow generating content at scale where a single format break can silently corrupt downstream data.</p><h3>5. Self-Criticism and Ensembling: Letting the Model Check Its Own Work</h3><p>Several techniques exploit a slightly counterintuitive fact: a model asked to evaluate an answer is often better at spotting a flaw than it was at avoiding that flaw in the first place.</p><p>Self-refine generates an answer, then prompts the model, in a follow-up turn, to critique its own output against specific criteria, then revise based on that critique. This can be looped multiple times.</p><p>Chain-of-verification has the model generate a list of fact-checking questions about its own claims after producing an answer, answer them independently, and then revise the original answer based on any discrepancies found.</p><p>Self-consistency and demonstration ensembling, both covered above under reasoning, apply the same “more attempts, then reconcile” logic at the level of full reasoning chains rather than single critique passes.</p><p>These matter for high-stakes generation where an error is costly (legal or medical summarization, financial analysis, factual writing), and where the extra latency and API cost of a second or third pass is worth paying. They’re overkill for low-stakes, high-volume, latency-sensitive tasks, where the marginal accuracy gain doesn’t justify two or three times the cost and response time.</p><h3>6. Meta-Prompting and Automatic Prompt Optimization</h3><p>A newer and increasingly practical category flips the whole exercise around. Instead of a human hand-crafting a prompt, you use one model to generate or optimize prompts for another (or the same) model. The Automatic Prompt Engineer (APE) approach treats prompt design as a search problem: generate candidate instructions, score them against example input-output pairs, keep the best performers, and iterate. Frameworks like DSPy have taken this further, letting developers specify a task and a metric and having the system automatically discover and refine effective prompts, sometimes outperforming hand-written ones on narrow, well-defined tasks.</p><p>This matters for production systems running at scale, where even a 2 to 3 percent accuracy gain across millions of calls is worth the upfront optimization effort, and where you actually have a labeled dataset to optimize against. Manual prompting still wins for exploratory or one-off work, tasks without a clean automatic scoring function, and situations where you need to understand and explain why a prompt works. Automatically optimized prompts can turn into inscrutable “prompt spaghetti” that’s hard for a human to reason about or trust.</p><h3>A Practical Decision Framework</h3><p>Putting it all together, here’s a rough map from task type to technique:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IpdBWQ3dsqZIu88QlSgm7Q.png" /></figure><h3>Pitfalls Worth Knowing About</h3><p>A few things tend to trip people up in practice.</p><p>Over-engineering is the big one. Anthropic’s own 2026 guidance puts it well: the best prompt isn’t the longest or most structurally elaborate one, it’s the one that reliably achieves the goal with the minimum necessary scaffolding. Heavy role-play, redundant instructions, and excessive examples on tasks that don’t need them mostly just burn context and money without moving accuracy.</p><p>Technique non-transferability is another one people learn the hard way. A prompting pattern tuned on one model, or one version of a model, frequently degrades on another, because different models are trained differently and respond to structure differently. What works beautifully on a reasoning model can actively hurt performance on a smaller instruction-tuned one, and vice versa. Treat prompts as configuration that needs re-validation whenever you switch models or model versions, not as portable code you write once and forget.</p><p>Prompt injection is the security issue everyone building with these tools needs to actually understand. Any application that inserts untrusted text (a user message, a scraped webpage, a document, an email) into a prompt alongside your own instructions is exposed to prompt injection, where that untrusted content contains its own instructions designed to hijack the model’s behavior. This has been flagged as one of the top security risks for LLM-integrated applications. Mitigations include clearly delimiting untrusted content, using system-level instructions the model is trained to prioritize, input and output filtering, and, for anything consequential, never letting a model’s output alone trigger an irreversible action without a validation layer.</p><p>And finally, don’t confuse fluent reasoning with correct reasoning. Chain-of-thought output reads as confident and logical whether or not it’s actually right. It’s tempting to trust a well-written reasoning trace, but it is not proof of correctness, especially on problems the model didn’t already have a good internal model of.</p><h3>The Bigger Shift: From Prompt Engineering to Context Engineering</h3><p>If there’s one theme running through the 2026 discourse on this topic, it’s that the unit of engineering effort is moving up a level. Early prompt engineering was largely about clever phrasing within a single, short prompt. As applications matured into agents that maintain state across many turns, pull in retrieved documents, call tools, and manage long conversations, practitioners increasingly talk about context engineering: deciding what information (instructions, retrieved knowledge, conversation history, tool outputs, examples) belongs in the model’s context window at all, and how it should be structured, ordered, and pruned, rather than obsessing over the exact wording of any single instruction.</p><p>This isn’t really a rejection of prompt engineering so much as an expansion of it. The specific techniques covered in this article, few-shot examples, chain-of-thought, ReAct loops, structured output, remain the building blocks. Context engineering is the discipline of assembling those blocks correctly at the system level: retrieving the right documents, summarizing long histories so they fit, deciding when to hand off to a specialized sub-agent, and curating what actually reaches the model rather than dumping everything in and hoping for the best.</p><h3>Closing Thoughts</h3><p>Prompt engineering earned an early reputation as a soft skill, half intuition, half folklore, passed around as screenshots of “magic phrases.” The research since 2022 has mostly dismantled that reputation and replaced it with something closer to an actual engineering discipline: named techniques, published benchmarks, clear tradeoffs between cost, latency, and accuracy, and increasingly, automated tools for optimization.</p><p>At the same time, the frontier keeps moving. Reasoning models absorb some of what used to require careful chain-of-thought scaffolding. Structured-output APIs absorb some of what used to require prompt-level pleading for valid JSON. Context engineering absorbs some of what used to be crammed into ever-longer single prompts. None of this makes the underlying techniques obsolete. It changes where you apply them and how much manual effort each one still requires.</p><p>The practical skill worth building, whether you’re a student encountering this for the first time or an engineer shipping production systems, isn’t memorizing a list of tricks. It’s developing the judgment to look at a task, correctly diagnose why a first-pass prompt is failing (is it a knowledge gap, a reasoning gap, a formatting problem, or an ambiguity in the instructions themselves), and reach for the specific technique built to fix that particular failure mode, instead of throwing every trick at every problem.</p><h3>Further Reading</h3><ul><li>Schulhoff et al., <a href="https://arxiv.org/abs/2406.06608"><em>The Prompt Report: A Systematic Survey of Prompt Engineering Techniques</em></a> (2024)</li><li>Sahoo et al., <a href="https://arxiv.org/abs/2402.07927"><em>A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications</em></a> (2024)</li><li>Wei et al., <a href="https://arxiv.org/abs/2201.11903"><em>Chain-of-Thought Prompting Elicits Reasoning in Large Language Models</em></a> (2022)</li><li>Kojima et al., <a href="https://arxiv.org/abs/2205.11916"><em>Large Language Models are Zero-Shot Reasoners</em></a> (2022)</li><li>Wang et al., <a href="https://arxiv.org/abs/2203.11171"><em>Self-Consistency Improves Chain of Thought Reasoning in Language Models</em></a> (2022)</li><li>Yao et al., <a href="https://arxiv.org/abs/2305.10601"><em>Tree of Thoughts: Deliberate Problem Solving with Large Language Models</em></a> (2023)</li><li>Yao et al., <a href="https://arxiv.org/abs/2210.03629"><em>ReAct: Synergizing Reasoning and Acting in Language Models</em></a> (2022)</li><li>Brown et al., <a href="https://arxiv.org/abs/2005.14165"><em>Language Models are Few-Shot Learners</em></a> (2020)</li><li>OpenAI, <a href="https://developers.openai.com/api/docs/guides/reasoning-best-practices"><em>Reasoning Best Practices</em></a></li><li>Anthropic, <a href="https://claude.com/blog/best-practices-for-prompt-engineering"><em>Prompt Engineering Best Practices for 2026</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f79946fff7d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where LLMs Break on Data: Dates, Joins, and the Illusion of Understanding]]></title>
            <link>https://medium.com/@kholashams101/where-llms-break-on-data-dates-joins-and-the-illusion-of-understanding-04583036fd23?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/04583036fd23</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 04:01:01 GMT</pubDate>
            <atom:updated>2026-09-14T04:01:01.863Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MBazt3AxyuadH1_2TbERdQ.png" /></figure><p>Almost everyone who builds on top of a language model hits the same wall eventually. You ask it something that looks trivial. How many days between these two dates? What’s the average of this column? Join these two tables and tell me who churned. It answers instantly, the writing is clean, the formatting is tidy, and the number is wrong.</p><p>Usually not spectacularly wrong. Wrong by a day. Wrong by one row. Wrong because it quietly counted a duplicate twice. The sort of wrong that slides into a report and sits there for a quarter before anyone notices.</p><p>That’s the whole problem in a sentence. These models are fantastic at sounding analytical and pretty bad at actually being analytical. If you’re going to trust one with real data, you need to know exactly where that gap opens up and why, because otherwise you’ve got a very articulate liability on your hands.</p><p>So this is a tour of how LLMs actually behave once you point them at the data types that show up in real work: plain numbers, dates and date ranges, tables, and the messy multi-table joins that most real analysis is made of. For each one I’ll show what breaks, what the benchmarks found, and what you can do about it.</p><p>Quick caveat before we go. Most of the hard numbers here come from studies run on the GPT-4, Claude 3, and Gemini 1.5 generation. The newer reasoning models that think step by step before answering have closed some of these gaps, especially on arithmetic. But they closed them by doing, more explicitly, the exact things I’m about to recommend: breaking the problem down, working through it, and reaching for tools. The underlying weaknesses are still there. They’ve just been buried under more compute, and they come right back the moment the problem gets big enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJhCgC2hba_Fge-lWC980Q.png" /></figure><h3>The one idea that explains most of it</h3><p>Here’s the mental model that turns all of these failures from surprising into obvious.</p><p>A language model doesn’t compute anything. It predicts the next token. When you ask it to add two numbers, it isn’t running an addition algorithm in the background. It’s generating the most likely continuation of the string “347 + 892 =”. For small, common numbers it has basically memorized the answer, so it looks like arithmetic. For big or unusual ones it’s pattern-matching against things that looked similar in training, which is exactly why the answer tends to be close but not right.</p><p>A few things follow from that, and between them they cause most of what goes wrong.</p><p>First, numbers get chopped up before the model ever sees them. Tokenizers break text into chunks, and they break numbers inconsistently. “1,234,567” might come apart into several arbitrary pieces. The model has no reliable sense that the 8 in some number is sitting in the thousands place. Digit position is genuinely fuzzy to it.</p><p>Second, there’s no scratchpad unless you give it one. A calculator holds intermediate values in memory. A model writing left to right has to carry everything in its head through the same channel it uses to produce words, so multi-step calculation is competing for attention with everything else it’s doing at once.</p><p>Third, attention is not a spreadsheet. A table looks two-dimensional to you. To the model it’s a one-dimensional string of tokens with no built-in idea that the cell three rows down and two columns over is related to the one you asked about. It reconstructs that relationship on the fly, statistically, and that reconstruction breaks down in fairly predictable places.</p><p>Keep those three in mind. You’ll watch them cause damage in every section below.</p><h3>Numbers: confident, fluent, off by a digit</h3><p>Start with the simplest case, because it shows the mechanism most clearly.</p><p>Ask for the sum of three two-digit numbers and the model nails it. Ask it to multiply two large numbers and it comes apart, and it comes apart in a specific way. People who’ve dug into arithmetic errors found that large-number addition tends to fail the same way every time, with one digit landing in the wrong spot, usually somewhere around the thousands place. That’s not random noise. That’s the tokenization-and-position problem showing itself. The model loses the thread of which digit belongs in which column.</p><p>Try 48,273 × 1,946 on a model with no tools attached. You’ll often get back something like 93,899,058. Right ballpark, looks completely plausible, and it’s wrong. The real answer is 93,939,258. Nothing in the output hints at the mistake. It reads with exactly the same confidence a correct answer would.</p><p>The fixes researchers have found are worth knowing, because they basically confirm the diagnosis. Reversing the digit order so the model processes right to left, the way you actually do addition by hand, improves accuracy by around 11%. Right-to-left tokenization with comma grouping gets you roughly 14%. And “abacus embeddings,” which explicitly staple position information onto each digit, pushed accuracy on adding 100-digit numbers up to 97.9%, from the 20 to 30% that standard models were managing.</p><p>None of that is “wait for better architectures someday.” The point is that the weakness is real and structural, and everything that fixes it comes down to handing the model back the positional information the tokenizer stripped out. You don’t get to swap the tokenizer in production, so the practical move is a different one, and we’ll get there: don’t make the model do the arithmetic at all.</p><h3>Dates and date ranges: where “close” quietly means “wrong”</h3><p>Dates are numbers with a nasty catch. The rules are irregular. Months are different lengths, some years have an extra day, and “three weeks before the 5th” means crossing a month boundary the model has to actually reason about rather than look up.</p><p>The Test of Time benchmark ran frontier models (GPT-4, Gemini 1.5 Pro, Claude 3 Sonnet) through synthetic temporal tasks built so the answers couldn’t just be recalled from Wikipedia. The results aren’t pretty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jtRSjl7Nsfx1WDxrHa6lA.png" /></figure><p>Simple lookups are easy. But sorting a set of events by date, something you’d do without thinking, fell to somewhere between 24 and 36%. And duration math, the plain “how long between these two dates” task, came in at 15 to 16% across the board.</p><p>The way they fail tells you what’s going on. The most common mistakes on duration tasks were off-by-one-day errors, which accounted for 21 to 25% of all the wrong answers, followed by botched leap years and direction errors when counting backward in time. Those are exactly the irregular-rule cases, the boundaries where there’s no pattern to match and you have to actually compute.</p><p>There’s a quieter finding in there that matters a lot for how you feed data to these things. Just changing the order you present the facts in swung accuracy by about 27 points. Hand the model events already sorted by entity and start time and it does far better than if you shuffle them. It isn’t reasoning over the dates independent of how they’re laid out. It’s leaning hard on the arrangement you gave it. That’s a shortcut, not reasoning, and it’s a theme that keeps coming back.</p><p>A couple of examples to make it concrete. “A subscription started on 2023–01–31 and renews monthly, what’s the third renewal date?” You’ll get “2023–04–31” often enough, which isn’t a real date. Or “how many days from 2024–02–15 to 2024–03–15?” Watch whether it remembers 2024 is a leap year. The answer is 29, and plenty of answers will say 28 or 30.</p><h3>Tables: where the confidence really outruns the competence</h3><p>This is where it starts costing money, because tables are what most people mean when they say “data.”</p><p>A 2025 study with the blunt title <em>How well do LLMs reason over tabular data, really?</em> found that earlier benchmarks had oversold model ability, partly by using multiple-choice formats that let models guess their way to good scores. Switch to a stricter setup and accuracy dropped by about 30% on averages and 60% on subtraction compared to the friendlier numbers everyone had been quoting.</p><p>The absolute numbers, on tables of a fairly modest 4K tokens:</p><ul><li>Simple lookups landed around 50% for Llama 3.1, up to 68% for GPT-4o-mini.</li><li>Counting and aggregation came in around 29 to 37%.</li><li>Averages: 7 to 32%.</li><li>Correlations: 5 to 20%.</li></ul><p>Averaging a column is the most common analytical operation there is, and for several models it landed in the single digits.</p><p>Three conditions make all of this dramatically worse, and your actual data has all three.</p><p>Missing values roughly halve accuracy, and the models don’t tell you. They “insufficiently acknowledge” the gaps, in the paper’s phrasing, meaning they just compute a wrong number over whatever’s there and hand it to you clean.</p><p>Duplicate rows halve aggregation accuracy again, and again the models fail to flag the duplication. A repeated transaction just quietly pads the total.</p><p>And scale is the real killer. Qwen 2.5’s accuracy on subtraction over a table fell from 63% to 6% as the input grew from 1K to 8K tokens. So a table that fits comfortably inside the context window can still be far too big to reason over reliably.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HmRsdFhqdK_vNhrHEdEVGA.png" /></figure><p>That last effect has a name. The NeedleInATable study found a “lost-in-the-middle-table” pattern: models see cells in the first and last rows reasonably well and struggle with the ones in the middle. GPT-4o’s cell-retrieval accuracy fell from 50% on an 8×8 table to 17% on a 32×32 one, and smaller open models dropped from around 26% to under 3%. They also do better at “find the cell matching this keyword” (31 to 81%) than at “give me the value at row 14, column 3” (as low as 1%), which is the tell that they’re matching on meaning and co-occurrence rather than actually indexing the grid the way a spreadsheet would.</p><p>Here’s the one that should scare you. Paste in a 200-row sales table and ask for the total revenue in the Northeast region. You’ll get back a specific, confident dollar figure. It’s very likely wrong, because the model has quietly sampled some rows, skipped others in the middle, and maybe counted a duplicate. And there’s nothing in the answer to warn you. That combination, an invisible failure wrapped in an authoritative output, is the most dangerous way an LLM behaves around data.</p><h3>Complex joins: the deep end, and the widest human gap</h3><p>Now the hard part, the multi-table relational work that real analysis actually is. “Which customers who signed up in Q1 and used feature X churned within 60 days” isn’t one operation. It’s a join, two filters, a date calculation, and an aggregation, and every one of them has to be right at the same time.</p><p>The BIRD benchmark tests exactly this. Natural-language questions against 95 real databases across 37 professional domains, turned into SQL. The headline numbers define the gap:</p><ul><li>Humans hit 92.96% execution accuracy.</li><li>GPT-4 with domain hints managed 54.89%.</li><li>GPT-4 without hints dropped to 34.88%.</li></ul><p>Two things stand out. Even with help, the best model was nearly 40 points behind humans on realistic relational questions. And pulling the domain hints cost a full 20 points. Those hints were just short sentences explaining what the schema means: what an account type signifies, which column is the real join key. So the failure wasn’t mostly about SQL syntax. It was about not knowing your data’s semantics, the tribal knowledge that “status = 3 means cancelled” or that these two tables actually join on cust_id and not the identically named id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qep35i371jIKryfLc6qFDA.png" /></figure><p>BIRD also surfaces the dirty-data problem. The financial subset, which is the domain closest to accounting and analytics, had roughly a 49% noise rate: misspellings, ambiguous questions, even wrong answers in the gold set. Real databases are a mess, and the model has no special sense of which parts of the mess to ignore.</p><p>An example that shows the join failure in miniature. Ask a model to join orders and customers where the real relationship is orders.buyer_ref to customers.account_no, but both tables also happen to have a column called id. The model will very often join on id = id. It’s syntactically perfect, it runs without an error, it returns a plausible-looking result set, and it’s completely meaningless. Only someone who knows the schema would catch it.</p><h3>The pattern underneath everything</h3><p>Step back and the same signature shows up in every section.</p><p>Test of Time found GPT-4 scored 40% on hard synthetic graphs but 92% on anonymized real-world data, which means it was leaning on memorized facts rather than reasoning over the dates. NeedleInATable found models retrieving by keyword co-occurrence instead of grid coordinates. Test of Time again: shuffle the input and results move 27 points.</p><p>The common thread is that these models solve data problems by finding the shortcut that usually works, not by running the procedure that always works. When your data looks like the training distribution and it’s laid out nicely, the shortcut lands and the model looks brilliant. When the data is big, messy, unfamiliar, or awkwardly ordered, which is to say when it’s real, the shortcut misses, and it misses without saying anything.</p><p>And there’s a ceiling that shortcuts can’t get you past, which is genuine statistical and causal reasoning. On the QRData benchmark, GPT-4 with a code interpreter answered only 57.9% of data-based quantitative questions correctly, against 76% for humans, and just 51% of the causal questions, which is barely better than a coin flip. In some cases handing the model the data actually made its reasoning worse. Correlation versus causation is not something to delegate.</p><h3>What actually works</h3><p>Now the encouraging part, and it really is encouraging. Almost every fix comes from the same principle: stop asking the model to be the computer and start asking it to be the analyst who runs the computer. It’s genuinely good at understanding what you want, picking an approach, and writing code. It’s bad at doing arithmetic in its head. So split those two jobs apart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3lrgx7VfORAtGV8TNnVsA.png" /></figure><p>Give it a calculator. This is the biggest single win, and the QRData numbers make the case on their own. Text-only chain-of-thought scored 36.5% overall and under 10% on numerical questions. The same model using a code interpreter hit 57.9%. Program-of-Thoughts and ReAct-style loops, where the model writes Python, runs it, and reads the actual result, closed most of the gap. When it generates df.groupby(‘region’)[‘revenue’].sum() and executes that, pandas does the arithmetic, exactly and reproducibly, and the model never touches a digit. The reasoning models got better at math largely by doing a talked-through version of this; a real code interpreter just does it properly. If your app does math on data and has no code-execution path, that’s the first thing to build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXzpiwNj1qWlNlQ-kLlZTg.png" /></figure><p>Don’t paste the whole table. Given the lost-in-the-middle and scale findings, dumping 5,000 rows into the prompt and asking for a summary is about the worst thing you can do. Do the aggregation in a real query or dataframe first, and hand the model the small clean result to interpret and explain. Let the database do what databases are good at. The model’s job there is narration, not addition.</p><p>For text-to-SQL, spell out the semantics. BIRD showed a few sentences of schema context were worth 20 points. Give the model a description of the schema, what the key columns and codes mean, and the real join keys. That’s schema linking, and it’s the highest-leverage thing you can add. Then have it work in steps: identify the tables, then the joins, then the filters, then assemble, rather than emitting a big query in one go. And always run the query against the real database and feed any errors back for a retry.</p><p>Normalize dates before they reach the model, and never let it count days itself. Convert everything to unambiguous ISO format like 2024–02–15 so there’s no MM/DD versus DD/MM guessing. For any real date math, durations, “N months later,” business-day counts, route it to a proper date library. It’s the calculator principle applied to the calendar.</p><p>Mind the input order, because it isn’t neutral. Presentation order swung temporal accuracy by 27 points, so don’t hand the model a shuffle. Sort events chronologically, group related records, and put the rows most relevant to the question near the top or bottom instead of buried in the middle. You’re working with the model’s shortcuts instead of against them.</p><p>Make it check for missing values and duplicates on purpose. The models won’t flag these on their own, so build the check in. Dedupe and count nulls in code before the analysis, and have the model report data-quality caveats as part of the answer rather than blithely computing over broken data.</p><p>Verify the important numbers. For anything high-stakes, generate the analysis two independent ways, say a SQL query and a pandas script, and compare. Or have the model critique and rerun its own work. Disagreement between two methods is a cheap, strong signal that something’s off, and it beats a single confident answer you have no way to audit.</p><p>Know the ceiling and keep a person on it. Descriptive work, sums and filters and joins and trends, can be made reliable with the tooling above. Causal inference can’t, at least not yet. That 51% causal score is a warning label. “Does A cause B” and “is this difference real” are questions for a human analyst, not for automation.</p><h3>A quick way to decide</h3><p>When you’re about to point a model at data, run through three questions in order.</p><p>Does this need exact computation? If it’s any arithmetic, any aggregation, any date math, the model must not do it in its head. Route it to code or SQL. Don’t make an exception for “it’s just a small sum,” because small sums over duplicated rows are exactly how wrong numbers get born.</p><p>How big and how messy is the data? If it’s more than a screen of rows, or it has the usual real-world nulls and duplicates, clean it and aggregate it before the model sees it. Give it the clean summary, not the raw pile.</p><p>What does a silent, plausible error cost? This is the one that should shape your whole setup. These models don’t fail loudly, they fail convincingly. If a wrong-by-one-row number landing in front of a customer or an exec is a real cost, then execution, verification, and human review aren’t polish. They’re the product.</p><h3>The takeaway</h3><p>LLMs aren’t bad at data. They’re bad at being a database, and they’re great at being the analyst sitting in front of one. The benchmarks are strikingly consistent about it. Left to reason in plain language, they compute averages in the single digits, calculate durations at 15%, order timelines at 24%, and join real databases at half the human rate, and they do all of it with the same steady confidence they bring to the answers they get right.</p><p>The same studies point straight at the fix, though. Give the model a calculator and its scores jump. Give it clean, small, well-ordered inputs and it stops getting lost. Give it your schema’s meaning and its queries start making sense. Every one of those is really the same move. Let the model decide what to compute, and let a real machine actually compute it. Build it that way and the confident narrator turns into what you wanted in the first place, an analyst whose numbers you can actually trust.</p><h3>Sources</h3><ul><li><a href="https://arxiv.org/pdf/2406.09170">Test of Time: A Benchmark for Evaluating LLMs on Temporal Reasoning (arXiv 2406.09170)</a></li><li><a href="https://arxiv.org/html/2505.07453v1">How well do LLMs reason over tabular data, really? (arXiv 2505.07453)</a></li><li><a href="https://arxiv.org/html/2504.06560">NeedleInATable: Long-Context Capability over Long-Structured Tables (arXiv 2504.06560)</a></li><li><a href="https://beancount.io/bean-labs/research-logs/2026/06/06/bird-benchmark-text-to-sql-real-database-gap">BIRD Benchmark: The Real-Database Gap in LLM Text-to-SQL</a></li><li><a href="https://arxiv.org/html/2402.17644v1">Are LLMs Capable of Data-based Statistical and Causal Reasoning? (QRData, arXiv 2402.17644)</a></li><li><a href="https://essays.johnloeber.com/p/21-everything-we-know-about-llms">Everything We Know About LLMs Doing Arithmetic (John Loeber)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04583036fd23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[There’s No API to Check If You’re Out of Licenses. Here’s How I Built Around That]]></title>
            <link>https://medium.com/@kholashams101/theres-no-api-to-check-if-you-re-out-of-licenses-here-s-how-i-built-around-that-27ed295d92b7?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/27ed295d92b7</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 11:18:32 GMT</pubDate>
            <atom:updated>2026-07-21T11:18:32.662Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZ5VCfZ5NM-r9AEH6KbSBA.png" /></figure><p>Picture this: a client turns on an analytics feature in your product. Somewhere, someone on your ops team is supposed to log into Tableau, search for that client’s email, add them as a user, and assign a Viewer license. Then, months later, the client turns the feature off, and someone has to remember to go back and remove that license, or you’re quietly paying for a seat nobody’s using.</p><p>Now multiply that by every client, every toggle, every day. That was the problem I got handed: turn a manual, easily forgotten checklist into something that just happens on its own.</p><p>I recently built a license automation service that sits between our product and Tableau Cloud’s REST API, listening for one thing: did a client turn analytics on or off? Whatever the answer, it makes sure their Tableau Viewer license matches that reality, automatically, in both directions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aT-iLn89f4z9n5-eV_N8zg.png" /></figure><p>It sounds like a small service. Honestly, it is a small service. But it’s one of those projects where the “simple” version is three lines of pseudocode, and the version that actually survives contact with production is a lot more careful than that. Here’s what I learned building it.</p><p><strong>The Naive Version Breaks Almost Immediately</strong></p><p>My first mental model was: toggle on, add license. Toggle off, remove license. Clean, symmetric, done.</p><p>Reality had other plans.</p><p>What if the client already has a Tableau account because someone gave them Explorer or Creator access for a completely unrelated reason? My automation has no business touching that. If I blindly add them as Viewer, I could downgrade someone who’s supposed to have more access. If I blindly remove access on toggle off, I could strip permissions that have nothing to do with the feature I’m managing.</p><p>So the actual rule became a lot narrower: only move accounts between “no account” and “Viewer.” If an email already holds some other real role, the system just leaves it alone. No upgrade, no downgrade, no interference. It’s a small distinction on paper, but it’s the difference between an automation you can trust to run unattended and one that quietly causes a support ticket six months later, when nobody remembers why an account’s permissions suddenly changed.</p><p><strong>The Problem With Things That Have No API</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qEg0ytMADhqGoFtpE1-ZJg.png" /></figure><p>Here’s a constraint I didn’t expect going in. There is no way to ask Tableau’s REST API how many license seats are left. It’s not a missing feature I overlooked, it genuinely doesn’t exist. No endpoint, no webhook, nothing that fires when your organization’s capacity changes.</p><p>So how do you handle running out of seats?</p><p>You don’t check in advance, because you can’t. You attempt the assignment, and if it fails, you read the failure. Running out of seats isn’t something you catch before it happens, it’s something you catch as it happens, by trying and seeing what Tableau’s error response actually says.</p><p>That reframed how I thought about the whole system. Instead of designing for “detect the problem, then act,” I had to design for “act, then figure out what just happened.” Every response from the provisioning flow gets its own status: created, upgraded, already fine, deliberately skipped, or out of seats. The calling product reacts to that status rather than to some pre-check that simply can’t exist.</p><p><strong>The Bug I Shipped, Caught, and Fixed (and Why It Mattered)</strong></p><p>When seats run out, the system emails the team so a human can go buy more capacity or free one up. Obviously you don’t want to spam that inbox every single time the same client retries, so there’s a dedupe record: “we already alerted about this org and email, don’t do it again.”</p><p>My first instinct was to write that dedupe record before sending the email, then send it. Seemed reasonable enough. Claim the “already notified” state, then notify.</p><p>It was wrong, and it was the kind of wrong that doesn’t show up in testing. If the email send failed for any reason, a flaky SMTP connection, a DNS hiccup, anything transient, the dedupe record was already sitting there saying “handled.” Every future attempt for that same client would see the record, assume someone had already been told, and quietly do nothing. Forever. The team would never actually get an alert, and nobody would know it was missing until a client complained their license had been “pending” for a month.</p><p>The fix was simple once I actually saw it: write the dedupe record only after the notification succeeds. A failed send now leaves no trace behind, so the very next retry tries again instead of assuming the problem was already handled. It’s one of those bugs that costs you nothing to prevent and a lot to discover in production, which is exactly why I’m writing about it instead of the parts of the code that worked fine on the first try.</p><p><strong>Idempotency Isn’t Optional, It’s the Whole Point</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j6ITG7-0aFG5bG_RReIfcg.png" /></figure><p>Because this service reacts to a toggle rather than a one time event, the same request can realistically show up more than once. A retry, a duplicate webhook call, a client flipping the switch twice by accident. If “grant a license” isn’t idempotent, you end up with duplicate side effects: extra emails, confused state, or worse, an accidental downgrade of someone’s legitimate access.</p><p>So every operation had to answer “what if this exact call happens five times in a row?” with the same result every time. Already a Viewer? No op. Already unlicensed? No op. Sounds obvious once it’s written down like that, but it’s the kind of requirement that’s easy to skip when you’re focused on the happy path, and expensive to retrofit once other things start depending on your behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VMtClieeuklm3gV7F59H_A.png" /></figure><p><strong>What “Done” Actually Means for Automation Like This</strong></p><p>The part that surprised me most wasn’t the Tableau API itself. It was realizing how much of “automation” is really about being honest about what you can’t automate. There’s no retry job watching for a freed up seat and finishing the job on its own, because that would need a persistent, always on deployment, and this doesn’t have one yet. So when seats run out, resolving it is still a manual step for a human, on purpose, not by accident. Pretending otherwise in the code would’ve been worse than just admitting the gap and writing it down clearly for whoever touches this next.</p><p>That’s probably the real lesson from this whole project. Good automation isn’t the version that pretends to handle everything. It’s the version that’s precise about exactly what it handles, fails loudly and safely at the edges, and never touches something it doesn’t have the full picture on.</p><p>I didn’t build the surrounding system this plugs into, that part belongs to the team. But building the piece that has to be trustworthy enough to run against a paid, external service with real financial consequences (seats cost money, mistakes cost access) taught me more about defensive engineering than most “bigger” projects I’ve worked on.</p><p>If you’re building something similar, anything that syncs state with a third party billing or licensing API, here’s my one piece of advice: assume the third party API will fail you in the most annoying way possible, and design your dedupe and retry logic around that assumption from day one. It’ll save you a very awkward incident report later.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27ed295d92b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Taught a Chatbot to Read Our Data. Then It Started Teaching Me.]]></title>
            <link>https://medium.com/@kholashams101/i-taught-a-chatbot-to-read-our-data-then-it-started-teaching-me-a86170f19b06?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/a86170f19b06</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 05:53:58 GMT</pubDate>
            <atom:updated>2026-07-07T05:53:58.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qr43Z_itQHRlVG2A8KkLdA.png" /></figure><p>Imagine typing a question the way you’d ask a coworker, something like “How many conversations did we have last month?” and getting a real, specific answer back in seconds. No dashboard. No filters to click through. No waiting on a data analyst to run a query for you.</p><p>That’s the product I spent the last stretch of my time building at work: a natural language analytics chatbot that sits on top of our Tableau data and actually understands what people are asking.</p><p>I didn’t design the whole system from scratch, and I won’t pretend I did. The architecture belongs to the company I work for, and a lot of smart people had a hand in it before I ever touched it. What I want to share instead is what it was actually like to build inside something like this. The decisions, the dead ends, and the moments where I learned more about how large language models really behave than any course ever taught me.</p><h3>The Problem That Started It All</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E_8hA_K6HVUsDDL3UUGYbQ.png" /></figure><p>Every company sits on a pile of dashboards nobody outside the analytics team fully understands. Ours was no different. Support agents, managers, even executives would ping us with the same question over and over. “Can someone just tell me the numbers?”</p><p>The idea was simple on paper. Let people ask in plain English, have the system translate that into a real query against our data, and then explain the answer back in plain English too. Simple on paper. Not simple in practice.</p><p>I remember the first internal demo we ran. Someone typed a completely reasonable question, one we thought we had covered, and the bot came back with something confidently wrong. Not broken, not an error message, just wrong in a way that sounded right. That was the moment I understood what kind of project this actually was. It wasn’t a coding problem. It was a trust problem wearing a coding costume.</p><h3>Where It Got Hard</h3><p>The first thing I learned is that natural language is deceptively messy. “Last month” means something different depending on when you ask it. “Compare this to before” assumes the system remembers what “before” was. People don’t ask questions in isolation. They ask follow ups, and if your system doesn’t hold context, every conversation feels like talking to someone with no short term memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHeyHw71QN4WnP5wxlPWEw.png" /></figure><p>Getting the system to classify what someone actually wants, whether they’re asking for data, reporting an issue, trying to schedule something, or just making small talk, turned out to be its own small research project. And once it knows what you want, it still has to build a query that’s actually correct. Not close enough. Correct. Because the moment the numbers are wrong, nobody trusts the tool again, and you don’t get a second chance to earn that trust back.</p><p>Dates were their own quiet nightmare. Ask any data person and they’ll tell you, half of all bugs in an analytics system live in how you handle date ranges. Inclusive versus exclusive boundaries, timezones, whether “this month” includes today or not. I spent more hours than I’d like to admit chasing off by one day errors that only showed up when someone asked about a very specific week. There was one afternoon where I stared at a report that was quietly missing an entire day of data, and it took me embarrassingly long to realize the bug wasn’t in the query at all, it was in how the boundary date was being interpreted before it ever reached the query.</p><p>There was also the problem of typos and inconsistent naming. Real users don’t type the exact label a dashboard uses. They type a shorthand, a nickname, sometimes a plain misspelling. Getting the system to gently correct itself instead of returning an empty, confusing “no data found” answer took a surprising amount of trial and error. Small thing on paper, huge difference in how human the whole experience felt.</p><h3>The Part Nobody Warns You About</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4M_Yg6E4uHYEhu69OynExw.png" /></figure><p>Working with a language model in production is not like working with one in a notebook. The moment real users get access, you have to assume someone will try to break it. Ask it to reveal internal details, pretend to be something it’s not, or slip in something that looks like a normal question but isn’t. Building the checks that catch that before the model even gets involved was some of the most interesting engineering I did. It’s a strange kind of problem solving. You’re not just building for the question someone will ask, you’re building for the question you hope they never ask.</p><p>It also taught me patience in a way I didn’t expect. You cannot brute force your way through a language model’s quirks. You have to sit with it, test it, break it yourself before someone else does, and slowly build trust in your own system one edge case at a time. Some days that meant asking the same question fifty different ways just to see where it would slip.</p><h3>What I Actually Learned</h3><p>A few things stuck with me more than the code itself.</p><p>Trust is the real feature. The most impressive model in the world is useless if a user gets one wrong number and stops believing anything it tells them after that.</p><p>Context is everything, literally. A chatbot that can’t remember the last question isn’t an assistant, it’s a search bar with extra steps.</p><p>The boring parts are the hard parts. Nobody gets excited about date handling or matching filter values against messy real world data, but that’s where most of the actual bugs live.</p><p>You learn architecture by living inside someone else’s decisions. I didn’t design this system, but working inside it taught me more about how these decisions get made than building something from scratch ever could. Every constraint I hit was a lesson in why someone before me chose it that way, or occasionally, a lesson in what they’d probably change if they got to do it again.</p><p>Small failures teach faster than big successes. Every wrong answer the bot gave me during testing taught me more about how it thinks than any feature that worked correctly on the first try.</p><h3>Final Thought</h3><p>There’s something quietly satisfying about watching a non technical teammate type a real question and get a real answer. No ticket, no waiting, no “let me pull that for you.” That’s the whole point of this kind of work. Not the model, not the pipeline, not the architecture diagram. Just someone getting an honest answer to a question they actually had.</p><p>That’s the part I keep coming back to. The tech is temporary. The trust you build with the people using it, that’s the thing worth getting right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a86170f19b06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built My First Full-Stack Shopify App, and It Taught Me More Than a Year of Studying]]></title>
            <link>https://medium.com/@kholashams101/i-built-my-first-full-stack-shopify-app-and-it-taught-me-more-than-a-year-of-studying-c5a71ff12b32?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5a71ff12b32</guid>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[omnichannel]]></category>
            <category><![CDATA[shopify-development]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Mon, 18 May 2026 04:01:00 GMT</pubDate>
            <atom:updated>2026-05-18T04:01:00.566Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From AI pipelines to OAuth flows to a live chat widget on a real storefront. Here’s what that transition actually looked like.</em></p><p>I have a confession. When my company told me I’d be building a Shopify app, my first reaction wasn’t nervousness. It was excitement. Pure, unfiltered, <em>finally</em> excitement.</p><p>I had been doing data science work: pipelines, analytics, and AI agent flows. Real work, meaningful work. But this was different. This was end-to-end. A backend I’d build. A widget that would live on someone’s actual store. Real merchants. Real customers typing real questions into something I wrote.</p><p>I said yes immediately. Then I opened the codebase and realized I had no idea where to start.</p><h3>The Problem Wasn’t Shopify. It Was Everything Around It.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWuaMtMS3_99Uabr5e6xzQ.png" /></figure><p>Here’s the thing no one tells you about joining a product mid-flight: the hardest part isn’t the new thing you’re being asked to build. It’s understanding the system that already exists, the one everyone else on the team has been living in for months.</p><p>The platform I was adding to wasn’t a blank repo. It was a living, breathing omnichannel product. Multiple services. A frontend. Sessions are managed in memory. Different layers talking to each other over HTTP in ways that weren’t always obvious from the outside.</p><p>I had to understand all of that before I could add anything to it.</p><p>So that’s what I did. I traced requests. I read service boundaries. I asked questions that probably seemed basic to everyone else. I mapped out what owned what: which layer handled AI routing, which one called external APIs, where merchant data lived, who encrypted what, and why.</p><p>It took time. It wasn’t glamorous. But the moment I could hold the whole system in my head, when I could close my eyes and trace a single customer message from the widget all the way through the backend and back, that was when I knew I could actually build this.</p><p>You can’t plug something new into a system you don’t understand. That lesson cost me a week, and it was worth every hour.</p><h3>OAuth: The Thing I Had Used a Hundred Times But Never Built</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Apl19QiNln2gRPBGHsMUVw.png" /></figure><p>Once I understood the architecture, the actual Shopify work began. And the first real challenge was OAuth.</p><p>I had used “Login with Google” my whole life. I had never been on the other side of it.</p><p>The mental model that finally made it click was this: our platform is Google. The merchant is the user. When a merchant connects their Shopify store, they’re taken to a consent screen. <em>This app wants to read your products, check your inventory, and create checkouts on your behalf. Do you approve?</em> They click yes. Shopify gives us a token unique to that merchant’s store. We encrypt it and store it. And from that point on, we can act on their behalf without ever asking again.</p><p>Simple in theory. The implementation has edges.</p><p>There’s CSRF protection to handle. A state parameter is generated on the way in and validated on the way back. An HMAC signature to verify on the callback. The token itself needs to be encrypted before it touches the database. AES-256 key derived from our own API secret, because that token is essentially a key to someone’s entire store, and treating it like a password is the only sane approach.</p><p>Getting that full flow working, every step, every edge case, no silent failures, was one of the more satisfying things I’ve built.</p><h3>Webhooks Taught Me That Order of Operations Is Everything</h3><p>After a merchant connects, we register webhooks with Shopify. Product updated? Shopify notifies us. Inventory changed? Shopify notifies us. We update our cache. No polling. Clean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4h9nf85HdytN9keZ2zayw.png" /></figure><p>What I didn’t expect was how unforgiving one specific implementation detail would be.</p><p>To verify a webhook is actually from Shopify and not someone spoofing our endpoint, you compute an HMAC signature over the raw request body and compare it to the signature Shopify sends in the headers. Straightforward.</p><p>Except if your JSON body parser middleware runs <em>before</em> your HMAC check, the raw bytes are already gone. Consumed. You’re computing a signature over nothing, and every webhook silently fails verification.</p><p>The fix is one line of ordering. I only understood why it mattered after I understood what was happening underneath.</p><p>That’s the kind of thing that doesn’t exist in any beginner tutorial. It exists in the gap between “understanding a concept” and “shipping it in production.”</p><h3>Seeing It Live and Immediately Looking for What Was Wrong</h3><p>There was a moment when the widget appeared on a storefront for the first time. The chat bubble, sitting in the corner of the page, exactly where it was supposed to be. A customer could type a question. The AI would respond. Products would come back. A cart could be created.</p><p>It worked.</p><p>I looked at it for maybe thirty seconds. Then I opened the logs.</p><p>I think that’s just what this kind of work does to you. The excitement of it working gets immediately replaced by the awareness of everything that could still break. An edge case that would silently fail for any App Store reviewer clicking install without going through the proper signup funnel. Rate limiting that didn’t exist yet on the chat endpoint. A CORS header that was too permissive. A token refresh path that wasn’t built yet.</p><p>The widget worked. The work wasn’t done.</p><h3>What This Project Changed for Me</h3><p>I came into this as someone who had worked with data, built AI agent flows and dashboards, and written pipelines. I understood systems from the data layer up. What I didn’t have was experience owning the full stack, from an OAuth handshake with an external platform all the way to a JavaScript widget loading on a stranger’s website.</p><p>Now I do.</p><p>And the thing I keep thinking about is this: the skills weren’t that far apart. Understanding how data flows through a system, how services talk to each other, and how to trace a bug across multiple layers, that’s the same instinct whether you’re debugging a pipeline or tracing why a webhook signature is failing. The domain was new. The thinking wasn’t.</p><p>If you’re a data person wondering whether you can cross over into this kind of work, full-stack, integrations, production backend, I’d say the gap is smaller than it looks. What it requires isn’t starting over. It’s being willing to sit with a codebase you don’t understand yet, trace it until you do, and then build something that fits.</p><p>That week, I spent just reading before writing a single line of code. That was the work. Everything after was just execution.</p><p><em>Building something similar or figuring out where to start? I’m always happy to talk through it. Drop a comment or connect.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5a71ff12b32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Stopped Coding Alone. Here Is What Happened Next.]]></title>
            <link>https://medium.com/@kholashams101/i-stopped-coding-alone-here-is-what-happened-next-8474a9e009c3?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/8474a9e009c3</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Thu, 14 May 2026 07:35:56 GMT</pubDate>
            <atom:updated>2026-05-14T07:35:56.200Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From copying ChatGPT snippets to having an AI that actually understands my production codebase. This is what the switch to Claude Code really felt like.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZsfZBV56W4v9hlju" /></figure><p>Let me be upfront about something. For a long time, I used AI the way most developers do. I had a tab open with ChatGPT. Sometimes Gemini. I would paste a function, ask what was wrong, get an answer that looked right, drop it into my editor, and watch it break in a completely different way than before.</p><p>Rinse. Repeat.</p><p>It was still faster than Googling everything. But it was also exhausting in a way I couldn’t quite name. I was constantly babysitting the conversation. Re-explaining context I had already explained. Getting confident answers that turned out to be wrong. Copying code that worked in isolation but had no idea what the rest of my codebase looked like.</p><p>I wasn’t collaborating with an AI. I was prompting a very fast autocomplete that sometimes got lucky.</p><p>Then I switched to Claude Code and everything about how I work changed.</p><h3>The First Thing I Noticed Was How Differently I Had to Think</h3><p>With ChatGPT or Gemini, my mental model was: describe the problem, get the code, fix the code, and repeat.</p><p>With Claude Code, that model broke immediately. Not because it was worse. Because it was capable of something those tools weren’t, and I had to learn how to actually use that.</p><p>The first thing I started doing was writing briefs. Not prompts. Briefs. Like I was onboarding a new developer to the team.</p><p>Here is the architecture. Here is what this service owns. Here is how it talks to this other service. Here is what we are trying to build and why. Here are the constraints.</p><p>Once I started doing that, something shifted. I wasn’t getting generic code anymore. I was getting code that fit. Code that respected the patterns already in the repo. Code that knew why certain decisions had been made.</p><p>That took me a while to understand. The quality of what Claude Code gives you is almost entirely a function of how well you explain the world in which it is working. Once I figured that out, I stopped thinking of it as a code generator and started thinking of it as someone I needed to properly onboard before handing them a task.</p><h3>What ChatGPT and Gemini Could Never Do</h3><p>Working on a production-level product means multiple repos. Real complexity. Services that depend on other services in ways that aren’t obvious from any single file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BDrLKYue85lmPrT4yBX4qg.png" /></figure><p>The older tools I used couldn’t hold that. Midway through a conversation, they would lose the thread. I would have to re-explain something I had already explained three messages ago. Or worse, they would confidently write code that contradicted something they had acknowledged ten minutes earlier.</p><p>It felt like pair programming with someone who had the memory of a goldfish and the confidence of someone who absolutely has no idea of what was happening.</p><p>What broke me was realizing I was spending more time managing the AI than actually solving the problem. The cognitive overhead of keeping the conversation coherent had become its own job.</p><p>Claude Code does not do that. I can describe a problem that spans multiple files across four to five repos, and it holds the whole thing. It asks the right questions when it needs to. It does not hallucinate a solution and present it as fact. When it is not sure, it says so.</p><p>That alone was worth switching for.</p><h3>The Moment That Actually Surprised Me</h3><p>I expected Claude Code to be better at following instructions. I did not expect it to catch things I had missed.</p><p>It has happened more than once now. I ask it to look at a piece of code, intending to fix one specific thing, and it comes back with something like, &quot;This will work, but there is also this other issue here that you might want to look at.&quot; And it is right. Every time.</p><p>I asked it to optimize a service once, not fix anything, just optimize. What came back was not just faster code. It was cleaner architecture, better error handling, patterns I had not thought to use, and a note explaining why each change was made.</p><p>That last part matters more than I expected. Because I was learning while it was building. I was not just getting output. I was getting an explanation of the thinking behind the output. And slowly, those patterns started becoming part of how I think about code.</p><p>The guilt I felt early on, the quiet voice asking whether I was even really coding anymore, started to quiet down. Because I was not just getting things done faster. I was getting better at understanding what good code looks like.</p><h3>What My Role Actually Looks Like Now</h3><p>I will be honest. The line is still a little blurred. I do not think that is a bad thing anymore, but it took me some time to get there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpY1y359XBODOG1I-iEcfA.png" /></figure><p>What I know is this: I am the architect. Claude Code is the builder. I decide what needs to be built, why it needs to be built, and what constraints it has to respect. I write the brief. I review what comes back. I push back when something does not fit. I make the calls.</p><p>Claude Code writes the code, runs the diagnostics, catches the edge cases, writes test scripts, and optimizes what I have already built.</p><p>That division of labor has made me more productive than I have ever been. I am getting more done. The code is better than it would have been if I had written it alone. And I am still learning, actually learning, because I am constantly reading what it produces and understanding why it made the choices it did.</p><p>Is it strange to feel like a senior developer when I am not technically one yet? Maybe. But that is what this tool has done. It has given me a collaborator that does not judge the question, does not get tired, and does not lose context.</p><p>What I bring is the vision and the judgment. What it brings is the execution and the breadth.</p><p>That combination, I have found, is genuinely powerful.</p><h3>What I Would Tell Anyone Still on the Fence</h3><p>If you are still using ChatGPT or Gemini for real development work and feeling like something is missing, you are probably right.</p><p>Those tools are useful. I still think they have their place. But if you are working on anything with real complexity, multiple files, real stakes, and you need something that can actually hold the context of what you are building, the switch is worth making.</p><p>The learning curve is not in the tool. It is in learning to communicate differently. To think of yourself less as someone asking for code and more as someone delegating to a capable collaborator who needs to understand the full picture before they can do their best work.</p><p>Once I made that mental shift, everything else followed.</p><p><em>Using Claude Code on a production codebase? I would love to hear how your workflow compares. Drop a comment or connect.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8474a9e009c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Do Shoppers Abandon Their Carts? I Analyzed 12,000 Sessions to Find Out]]></title>
            <link>https://medium.com/@kholashams101/why-do-shoppers-abandon-their-carts-i-analyzed-12-000-sessions-to-find-out-61f743c7e1df?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f743c7e1df</guid>
            <category><![CDATA[data-mining]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[random-forest]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Sat, 15 Mar 2025 18:42:32 GMT</pubDate>
            <atom:updated>2025-03-15T18:42:32.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5QwMI7qVf1kJ5Tl4.png" /></figure><p><em>You’re shopping online. You add a few items to your cart, but at the last second, you hesitate. Maybe you leave the site, maybe you get distracted, or maybe you just don’t feel like buying today. But have you ever wondered — why do some people buy while others don’t?”</em></p><p><em>“I wanted to crack this mystery, so I analyzed over </em><strong><em>12,000 online shopping sessions</em></strong><em> using the </em><a href="https://archive.ics.uci.edu/"><em>Online Shoppers Purchasing Intention Dataset</em></a><em>. My goal? To uncover the hidden patterns that determine whether a visitor will complete a purchase — or leave empty-handed.</em></p><h3>The Data: A First Look</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9K9ahZFxOML-kqzDBxQpZw.png" /></figure><p>The dataset contained <strong>12,330 records</strong> of user sessions on an e-commerce website. Each session was characterized by <strong>18 numerical and categorical attributes</strong>, such as:</p><ul><li><strong>PageViews &amp; Duration:</strong> How long a user spent browsing different types of pages (Informational, Product-Related, etc.).</li><li><strong>Bounce &amp; Exit Rates:</strong> Measures of engagement and drop-off behavior.</li><li><strong>SpecialDay Indicator:</strong> Whether the visit was close to a holiday or major shopping event.</li><li><strong>Visitor Type &amp; Weekend Indicator:</strong> New vs. Returning visitors and if they browsed on weekends.</li><li><strong>Revenue (Target Variable):</strong> Whether the session resulted in a purchase (1) or not (0).</li></ul><p>Before diving into machine learning, I had to <strong>clean and preprocess</strong> the data.</p><h3>Cleaning &amp; Preprocessing: Turning Raw Data into Gold</h3><h3>1. Handling Missing Values &amp; Duplicates</h3><p>First, I checked for missing data and duplicates. Fortunately, there were no missing values, but I found <strong>125 duplicate records</strong>, which I promptly removed to avoid bias.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CvyUT_sWCWY-FGoOKAEV9Q.png" /></figure><h3>2. Encoding Categorical Variables</h3><p>To make the data usable for models, I converted categorical features like <strong>Month</strong> and <strong>VisitorType</strong> into numerical values. Boolean fields like <strong>Weekend</strong> and <strong>Revenue</strong> were also transformed into 0s and 1s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VZktNFKgUKMr4t9ZrkquA.png" /></figure><h3>3. Feature Scaling for Better Accuracy</h3><p>Many numerical features had vastly different scales (e.g., session durations vs. bounce rates). I applied <strong>MinMax Scaling</strong> to normalize them between 0 and 1, ensuring fair treatment by machine learning models.</p><h3>Exploring the Data: What Patterns Emerged?</h3><h3>1. Who’s More Likely to Buy?</h3><p>I discovered that users who spent more time on <strong>Product-Related pages</strong> and had <strong>higher PageValues</strong> (a metric indicating valuable pages) were far more likely to make a purchase.</p><h3>2. The Impact of Bounce &amp; Exit Rates</h3><p>High <strong>BounceRates</strong> (leaving after viewing just one page) and <strong>ExitRates</strong> (leaving the site from a specific page) strongly correlated with <strong>no purchase behavior</strong>. This reinforced the need for engaging landing pages and optimized checkout experiences.</p><h3>3. Special Days Influence Shopping Behavior</h3><p>Visits occurring around <strong>Special Days (e.g., Black Friday, Christmas sales)</strong> showed a significant increase in purchases. This highlighted the power of time-sensitive promotions.</p><h3>4. Returning Visitors = Higher Conversions</h3><p>Returning visitors were more likely to convert than first-time visitors. This insight suggested the importance of remarketing strategies and personalized recommendations.</p><h3>Applying Machine Learning: Predicting Shopper Behavior</h3><p>I applied multiple <strong>data mining and machine learning techniques</strong> to classify and cluster user behavior.</p><h3>1. Clustering: Understanding Customer Segments</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*pvXHEHtfFgctPxvHKBV3_g.png" /></figure><p>Using <strong>K-Means and DBSCAN Clustering</strong>, I found three distinct shopper types:</p><ul><li><strong>Cluster 1:</strong> Highly engaged users with high purchase intent.</li><li><strong>Cluster 2:</strong> Moderately engaged users who could be swayed with the right offer.</li><li><strong>Cluster 3:</strong> Low engagement users, likely just browsing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*y08w-CecJGpqyPyfhPOnjQ.png" /></figure><h3>2. Classification: Can We Predict Purchases?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*w0bDjSfq291aH3mR2NP3PQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*ms3LVn1nJd7x4byjPeolCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*j4vFPHrdTyGyao_sQhh-zA.png" /></figure><p>I trained several models to predict whether a user would make a purchase:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*u68zWxuOMwJQYCyMa5f8Yg.png" /></figure><p><strong>Key Takeaway:</strong> <strong>XGBoost</strong> outperformed the other models, making it the best choice for predicting customer purchases.</p><h3>3. Regression: What Drives Page Values?</h3><p>I used <strong>Linear Regression</strong> to predict the <strong>PageValues</strong> metric. The most influential factors were:</p><ul><li><strong>Product-related page duration</strong></li><li><strong>Exit rates</strong></li><li><strong>Bounce rates</strong></li></ul><p>This confirmed that <strong>users who engage more deeply with the site are assigned higher values, increasing their likelihood of conversion</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*1JfhLpxhCtfbTXqzTpnawg.png" /></figure><p><strong>Key Takeaway:</strong> <strong>XGBoost</strong> outperformed the other models, making it the best choice for predicting customer purchases.</p><h3>Insights from the Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CRdn27qVNeU_EGim.jpg" /></figure><p>Here are the key takeaways from this deep dive into online shopper behavior:</p><h3>1. Customer Behavior Patterns Matter</h3><ul><li>Users who spend more time on <strong>Product-Related pages</strong> are more likely to convert.</li><li><strong>PageValues</strong> is a strong predictor of whether a session results in a purchase.</li></ul><h3>2. High Exit &amp; Bounce Rates Reduce Sales</h3><ul><li>Sessions with <strong>high ExitRates and BounceRates</strong> correlate with lower conversions.</li><li>Optimizing landing pages and checkout processes is crucial to reducing drop-offs.</li></ul><h3>3. Returning Visitors Are More Valuable</h3><ul><li>Returning visitors <strong>convert at a higher rate</strong> than first-time visitors.</li><li>This highlights the need for <strong>remarketing and loyalty strategies</strong>.</li></ul><h3>4. Special Days Influence Shopping Behavior</h3><ul><li>Purchases <strong>increase significantly around major shopping events</strong> (e.g., Black Friday).</li><li>Businesses should time their promotions accordingly.</li></ul><h3>5. Machine Learning Can Predict Shopper Intent</h3><ul><li><strong>XGBoost and Random Forest</strong> models performed the best in predicting purchases.</li><li>Clustering helped identify high-potential customers who may convert with targeted offers.</li></ul><h3>Recommendations for E-commerce Businesses</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tumlysKrOe2tTwnb" /></figure><p>Based on these insights, here are some <strong>actionable recommendations</strong> to improve conversion rates and boost sales:</p><ol><li><strong>Personalized Promotions:</strong></li></ol><ul><li>Offer discounts or special deals to users with high <strong>PageValues</strong> but no purchases.</li><li>Use recommendation engines to display <strong>related products</strong> based on browsing history.</li></ul><p><strong>2. Optimize Product Pages:</strong></p><ul><li>Since <strong>Product-Related page engagement drives purchases</strong>, improve product descriptions, images, and reviews.</li><li>Add customer testimonials and interactive media to increase trust.</li></ul><p><strong>3. Reduce Exit &amp; Bounce Rates:</strong></p><ul><li>Improve landing page design to grab attention <strong>within the first few seconds</strong>.</li><li>Ensure a smooth, <strong>frictionless checkout process</strong> with fewer steps.</li></ul><p><strong>4. Leverage Special Days for Promotions:</strong></p><ul><li>Increase ad spend and create <strong>time-sensitive deals</strong> around holidays.</li><li>Highlight limited-time offers to create a <strong>sense of urgency</strong>.</li></ul><p><strong>5. Retarget Potential Buyers:</strong></p><ul><li>Since <strong>returning visitors</strong> are more likely to convert, <strong>retarget past visitors</strong> with personalized ads.</li><li>Use <strong>email marketing</strong> and push notifications to re-engage interested users.</li></ul><h3>Final Thoughts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*nHwrSqQG40-nbp-X" /></figure><p>This project reinforced an essential truth: <strong>understanding user behavior is the key to e-commerce success</strong>. By leveraging machine learning and data analytics, businesses can <strong>predict and influence</strong> customer decisions, boosting sales and improving user experiences.</p><p>Next time you shop online, think about the digital breadcrumbs you leave behind — chances are, an algorithm is analyzing them in real time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f743c7e1df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Insights: How FlyingWhale Airline Can Improve Customer Retention and Loyalty]]></title>
            <link>https://medium.com/@kholashams101/unlocking-insights-how-flyingwhale-airline-can-improve-customer-retention-and-loyalty-a06ca3e3afe4?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/a06ca3e3afe4</guid>
            <category><![CDATA[insights]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-report]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 09:15:19 GMT</pubDate>
            <atom:updated>2024-10-06T09:15:19.449Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s competitive aviation industry, customer loyalty is more critical than ever. FlyingWhale Airline, like many others, aims to keep its passengers returning for more flights while maintaining an effective loyalty program that provides value to customers. This report presents an in-depth analysis of FlyingWhale’s customer flight activities, loyalty program performance, and cancellation trends, and suggests actionable steps to drive improvement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*LAAWgOCubB5UG35tYYxkGw.png" /></figure><h3>A Snapshot of Flight Activity</h3><p>July stands out as the peak month for FlyingWhale Airline’s flight bookings, particularly in 2017 and 2018, with 246,298 flights booked during this period. Digging deeper, we find that customers with Star loyalty cards booked the most flights (112,219), followed by Nova (81,772), and Aurora (51,307). The data suggests that July, driven by seasonal travel trends, represents a prime opportunity to engage loyalty members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*A2roIh-21eCXL2gG0ceeRA.png" /></figure><p>Another significant insight is the strong correlation between flight distance and loyalty points accumulated. Customers flying longer distances accumulate more points, incentivizing them to opt for lengthier journeys. This finding demonstrates that FlyingWhale’s loyalty program is working well, particularly for frequent long-haul travelers. However, there’s room to refine how this program engages other customer segments, especially casual flyers.</p><h3>The Role of Companions in Loyalty Points</h3><p>Interestingly, traveling with companions dramatically increases loyalty point redemption. Groups of ten redeem an average of 139.73 points, far exceeding solo travelers, who redeem just 0.67 points on average. This finding underscores the value that companion travelers bring to the airline, suggesting that FlyingWhale should capitalize on this behavior by encouraging more group travel through exclusive promotions or loyalty incentives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vY1PiH6CAjhHJ6cgipK8Sw.png" /></figure><h3>Who Are FlyingWhale’s Loyal Customers?</h3><p>FlyingWhale’s loyalty program skews slightly towards male travelers, with men booking marginally more flights than women, especially with the Star loyalty card. Married individuals and bachelor students also form a large portion of the loyalty program members. These insights offer a clear direction: FlyingWhale can optimize its marketing efforts to further engage these key customer groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wSiPtEfd56CqGOF82_Nfzg.png" /></figure><p>When examining customer lifetime value (CLV), we find that those in the Star loyalty tier contribute the most revenue, with higher CLVs compared to other tiers. This presents an opportunity for FlyingWhale to increase engagement from lower-tier loyalty members (Nova and Aurora) through personalized offers and program enhancements, potentially driving more value from these segments.</p><h3>A Worrying Trend: Cancellations Are on the Rise</h3><p>While the loyalty program offers many benefits, an alarming trend is the rise in membership cancellations. The data reveals that cancellations peak in December, August, and November, aligning with key travel seasons when customers may evaluate the program more critically. Married individuals and bachelor students, two of FlyingWhale’s key customer segments, are also the most likely to cancel their memberships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VknyjSmFSDZtPT5OMa2KDg.png" /></figure><p>Geographically, New Brunswick members tend to remain enrolled in the loyalty program the longest, while other provinces exhibit faster cancellation rates. This points to potential regional differences in customer expectations or service experiences, and it presents an opportunity for tailored retention strategies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYYCpmtELzsZVjDw3YHnmQ.png" /></figure><h3>Key Recommendations for FlyingWhale Airline</h3><p>FlyingWhale can address these insights by focusing on the following key areas:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*zkC7pZqaoBa_eYtH-xvfDw.png" /></figure><ol><li><strong>Enhancing Loyalty Program Benefits</strong>: The airline should improve perks for Nova and Aurora loyalty members to boost their engagement. Offering more attractive incentives, such as exclusive travel deals or bonus points for lower-tier members, could drive higher participation and loyalty.</li><li><strong>Targeted Marketing Campaigns</strong>: Gender-specific promotions could help increase flight bookings by women, particularly in the Star loyalty tier. Additionally, group travel offers could further boost points redemption among companion travelers, capitalizing on this high-value segment.</li><li><strong>Mitigating Seasonal Cancellations</strong>: Implementing preemptive retention programs before peak cancellation months (December, August, November) could help reduce the number of customers leaving the loyalty program. Gathering and acting on customer feedback during these periods would also provide valuable insights into improving the program.</li><li><strong>Regional Retention Strategies</strong>: FlyingWhale should focus on provinces with faster cancellation rates by tailoring marketing and retention programs to regional preferences. Simultaneously, the airline can leverage best practices from regions like New Brunswick, where members show higher loyalty and longer enrollment durations.</li><li><strong>Customer Experience Enhancement</strong>: Consistently delivering high-quality service and effectively communicating loyalty program benefits are critical to keeping members engaged. These efforts should be coupled with clear communication about program updates to ensure that customers fully understand and appreciate the value they receive.</li></ol><h3>Conclusion: The Path to Greater Customer Loyalty</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*ljfeBamHh6Squ0zK2GNqPg.png" /></figure><p>FlyingWhale Airline’s customer and loyalty program data offer deep insights into traveler behaviors, preferences, and trends. By focusing on enhancing its loyalty program, targeting key customer segments, and implementing strategies to reduce cancellations, the airline can significantly improve its customer retention rates. With these changes, FlyingWhale stands to not only enhance the customer experience but also strengthen its competitive position in the market.</p><p>Ultimately, customer loyalty is about delivering value — and with the right strategies, FlyingWhale can ensure its passengers continue to fly high.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a06ca3e3afe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essentials of a Data Analyst: A Beginner’s Journey]]></title>
            <link>https://medium.com/@kholashams101/essentials-of-a-data-analyst-a-beginners-journey-1917183a832a?source=rss-ad5ec30b630------2</link>
            <guid isPermaLink="false">https://medium.com/p/1917183a832a</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[skills]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[journey]]></category>
            <dc:creator><![CDATA[Kholashams]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 12:43:42 GMT</pubDate>
            <atom:updated>2024-09-21T12:43:42.677Z</atom:updated>
            <content:encoded><![CDATA[<p>As I approach the end of Bachelors in Data Science at COMSATS, the excitement of stepping into the world of data analytics is palpable. With years of study behind me, I’m now gearing up to transition from a student to a professional. My recent enrollment in a Data Analytics Bootcamp at atomcamp has been a pivotal part of this journey, sharpening my skills and igniting my passion for data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*tbCkhg0szV5oa99YaPa00g.jpeg" /></figure><p>Through this experience, I’ve realized that becoming a successful data analyst involves more than just learning tools; it’s about applying them to solve real-world problems. Here are the essentials I wish I’d known when starting out.</p><h3>The Essentials: What Every Beginner Should Know</h3><h4>1. Understanding the Basics of Data</h4><p>Data can often be messy and disorganized. While it might look perfect in theory, real datasets are usually filled with missing values and errors. I quickly learned that <strong>data cleaning</strong> is one of the most critical steps in the analytical process. Before diving into analysis, you need to ensure your data is accurate and well-structured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oIRqsQXGOZ5R0pV7" /><figcaption>Photo by <a href="https://unsplash.com/@purzlbaum?utm_source=medium&amp;utm_medium=referral">Claudio Schwarz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In my bootcamp, we dedicated a significant amount of time to mastering this skill. It was eye-opening to see how much clearer insights became once the data was properly cleaned and organized.</p><h4>2. Mastering the Tools of the Trade</h4><p>While it’s tempting to think you need to know every tool available, the reality is that proficiency in a few key tools can be incredibly effective. My favorites include <strong>Excel, SQL, and Python</strong>. Excel is fantastic for quick calculations and visualizations, SQL helps in querying and managing large datasets, and Python is invaluable for data manipulation and analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*by0B50UZKjqA7Nrn" /><figcaption>Photo by <a href="https://unsplash.com/@hiteshchoudhary?utm_source=medium&amp;utm_medium=referral">Hitesh Choudhary</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Focusing on Python, I found it to be powerful for data analysis, allowing me to automate tasks and conduct more complex analyses. Starting with one or two tools and gradually expanding your toolkit is a practical approach that has worked well for me.</p><h4>3. Learning to Tell a Story with Data</h4><p>One crucial lesson I’ve learned is that data alone doesn’t tell a story — <em>you</em> do. Companies hire data analysts to provide insights and make data understandable to others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qGgW02hKP_Y4g9-u" /><figcaption>Photo by <a href="https://unsplash.com/@lukechesser?utm_source=medium&amp;utm_medium=referral">Luke Chesser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For instance, during a project analyzing a Ramadan digital marketing campaign, I had to extract meaningful insights from a sea of metrics. It was about connecting the dots and answering questions like: What trends are emerging? How can these insights drive decisions? Developing the ability to communicate findings effectively is a skill that will set you apart.</p><h4>4. Critical Thinking and Problem-Solving</h4><p>Data analytics is fundamentally about <strong>problem-solving</strong>. Every dataset represents a real-world challenge. You need to view problems from multiple angles and determine the best way to approach them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yOS4l1scoKqVJv69" /><figcaption>Photo by <a href="https://unsplash.com/@mjessier?utm_source=medium&amp;utm_medium=referral">Myriam Jessier</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In one of our case studies, we analyzed market share data for major brands. I had to ask the right questions: Why is this brand losing market share? What external factors might be at play? This kind of critical thinking is essential for uncovering valuable insights.</p><h4>5. Embrace Lifelong Learning</h4><p>The field of data analytics is ever-evolving. New tools and techniques emerge regularly, and staying ahead of the curve is crucial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c8gSb5dr3E24FPvj" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>My advice to any beginner is to <strong>never stop being curious</strong>. Every project, every dataset is an opportunity to learn something new. During my bootcamp, I discovered new features in Python that allowed me to analyze data more efficiently, and it opened up new possibilities for my projects.</p><h3>The Journey Ahead</h3><p>As I prepare for the next chapter in my career as a data analyst, I feel equipped with a solid foundation. The combination of skills I’ve developed, the projects I’ve completed, and the community I’ve engaged with at COMSATS and atomcamp has prepared me well for the challenges ahead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RvV0k1oyUCqx2Hnv" /><figcaption>Photo by <a href="https://unsplash.com/@kmuza?utm_source=medium&amp;utm_medium=referral">Carlos Muza</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For anyone embarking on this journey, my advice is simple: <strong>start small, stay curious, and embrace the messiness of data</strong>. Whether you’re a student, bootcamp participant, or career-changer, focusing on these essentials will guide you as you navigate the world of data analytics. Remember, the most important thing is to keep learning, keep experimenting, and enjoy the process!</p><p>If you’re also on this path to becoming a data analyst, I’d love to hear your thoughts! What challenges have you faced, and what skills have helped you the most?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1917183a832a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>