Close Menu
    Facebook LinkedIn YouTube WhatsApp X (Twitter) Pinterest
    Trending
    • Roam Rider twin-slide pop-up pickup camper
    • Airwallex founder Jack Zhang is offering $100,000 to AI startup founders under 25
    • How Elon Musk Squeezed OpenAI: They ‘Are Gonna Want to Kill Me’
    • Resorts World NYC opens first full casino in New York City with live table games in Queens
    • Sony’s Latest PlayStation Update Sparks DRM Fears: What We Know
    • System Design Series: Apache Flink from 10,000 Feet, and Building a Flink-powered Recommendation Engine
    • 15-second semicylinder air tent unboxes from the cube
    • Emergency First Responders Say Waymos Are Getting Worse
    Facebook LinkedIn WhatsApp
    Times FeaturedTimes Featured
    Thursday, April 30
    • Home
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    • More
      • AI
      • Robotics
      • Industries
      • Global
    Times FeaturedTimes Featured
    Home»Artificial Intelligence»How to Analyze and Optimize Your LLMs in 3 Steps
    Artificial Intelligence

    How to Analyze and Optimize Your LLMs in 3 Steps

    Editor Times FeaturedBy Editor Times FeaturedSeptember 12, 2025No Comments9 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email WhatsApp Copy Link


    in manufacturing, actively responding to consumer queries. Nonetheless, you now wish to enhance your mannequin to deal with a bigger fraction of buyer requests efficiently. How do you method this?

    On this article, I talk about the situation the place you have already got a working LLM and wish to analyze and optimize its efficiency. I’ll talk about the approaches I exploit to uncover the place the LLM works and the place it wants enchancment. Moreover, I’ll additionally talk about the instruments I exploit to enhance my LLM’s efficiency, with instruments similar to Anthropic’s immediate optimizer.

    In brief, I observe a three-step course of to shortly enhance my LLM’s efficiency:

    1. Analyze LLM outputs
    2. Iteratively enhance areas with essentially the most worth to effort
    3. Consider and iterate

    Desk of Contents

    Motivation

    My motivation for this text is that I typically discover myself within the situation described within the intro. I have already got my LLM up and working; nonetheless, it’s not performing as anticipated or reaching buyer expectations. By way of numerous experiences of analyzing my LLMs, I’ve created this straightforward three-step course of I all the time use to enhance LLMs.

    Step 1: Analyzing LLM outputs

    Step one to enhancing your LLMs ought to all the time be to research their output. To have excessive observability in your platform, I strongly suggest utilizing an LLM supervisor software for tracing, similar to Langfuse or PromptLayer. These instruments make it easy to assemble all of your LLM invocations in a single place, prepared for evaluation.

    I’ll now talk about some totally different approaches I apply to research my LLM outputs.

    Handbook inspection of uncooked output

    The best method to research your LLM output is to manually examine lots of your LLM invocations. You need to collect your final 50 LLM invocations, learn via your complete context you fed into the mannequin, and the output the mannequin supplied. I discover this method surprisingly efficient in uncovering issues. I’ve, for instance, found:

    • Duplicate context (a part of my context was duplicated attributable to a programming error)
    • Lacking context (I wasn’t feeding all the data I anticipated into my LLM)
    • and so on.

    Handbook inspection of knowledge ought to by no means be underestimated. Completely trying via the info manually offers you an understanding of the dataset you might be engaged on, which is difficult to acquire in some other method. Moreover, I additionally discover that I ought to manually examine extra knowledge factors than I initially wish to spend time evaluating.

    For instance, let’s say it takes 5 minutes to manually examine one input-output instance. My instinct typically tells me to possibly spend 20-Half-hour on this, and thus examine 4-6 knowledge factors. Nonetheless, I discover that you need to normally spend so much longer on this a part of the method. I like to recommend at the least 5x-ing this time, so as a substitute of spending Half-hour manually inspecting, you spend 2.5 hours. Initially, you’ll assume this can be a lot of time to spend on handbook inspection, however you’ll normally discover it saves you loads of time in the long term. Moreover, in comparison with a whole 3-week venture, 2.5 hours is an insignificant period of time.

    Group queries in response to taxonomy

    Typically, you’ll not get all of your solutions from easy handbook evaluation of your knowledge. In these cases, I’d transfer over to extra quantitative evaluation of my knowledge. That is versus the primary method, which I contemplate qualitative since I’m manually inspecting every knowledge level.

    Grouping consumer queries in response to a taxonomy is an environment friendly method to higher perceive what customers anticipate out of your LLM. I’ll present an instance to make this simpler to grasp:

    Think about you’re Amazon, and you’ve got a customer support LLM dealing with incoming buyer questions. On this occasion, a taxonomy will look one thing like:

    • Refund requests
    • Discuss to a human requests
    • Questions on particular person merchandise
    • …

    I’d then take a look at the final 1000 consumer queries and manually annotate them into this taxonomy. This can inform you which questions are most prevalent, and which of them you need to focus most on answering accurately. You’ll typically discover that the distribution of things in every class will observe a Pareto distribution, with most gadgets belonging to some particular classes.

    Moreover, you annotate whether or not a buyer request was efficiently answered or not. With this data, now you can uncover what sorts of questions you’re scuffling with and which of them your LLM is nice at. Perhaps the LLM simply transfers buyer queries to people when requested; nonetheless, it struggles when queried about particulars a few product. On this occasion, you need to focus your effort on enhancing the group of questions you’re scuffling with essentially the most.

    LLM as a decide on a golden dataset

    One other quantitative method I exploit to research my LLM outputs is to create a golden dataset of input-output examples and make the most of LLM as a decide. This can assist once you make modifications to your LLM.

    Persevering with on the shopper assist instance from beforehand, you possibly can create an inventory of fifty (actual) consumer queries and the specified response from every of them. Everytime you make modifications to your LLM (change mannequin model, add extra context, …), you possibly can robotically check the brand new LLM on the golden dataset, and have an LLM as a decide decide if the response from the brand new mannequin is at the least pretty much as good because the response from the previous mannequin. This can prevent huge quantities of time manually inspecting LLM outputs everytime you replace your LLM.

    If you wish to be taught extra about LLM as a decide, you possibly can learn my TDS article on the topic here.

    Step 2: Iteratively enhancing your LLM

    You’re achieved with the first step, and also you now wish to use these insights to enhance your LLM. On this part, I talk about how I method this step to effectively enhance the efficiency of my LLM.

    If I uncover vital points, for instance, when manually inspecting knowledge, I all the time repair these first. This could, for instance, be discovering pointless noise being added to the LLM’s context, or typos in my prompts. Once I’m achieved with that, I proceed utilizing some instruments.

    One software I exploit is immediate optimizers, similar to Anthropic’s prompt improver. With these instruments, you usually enter your immediate and a few input-output examples. You possibly can, for instance, enter the immediate you employ to your customer support brokers, together with examples of buyer interactions the place the LLM failed. The immediate optimizer will analyze your immediate and examples and return an improved model of your immediate. You’ll probably see enhancements similar to:

    • Improved construction in your immediate, for instance, utilizing Markdown
    • Dealing with of edge instances. For instance, dealing with instances the place the consumer queries the shopper assist agent about fully unrelated subjects, similar to asking “What’s the climate in New York right this moment?”. The immediate optimizer may add one thing like “If the query isn’t associated to Amazon, inform the consumer that you simply’re solely designed to reply questions on Amazon”.

    If I’ve extra quantitative knowledge, similar to from grouping user queries or a golden dataset, I additionally analyze these knowledge, and create a worth effort graph. The worth effort graph highlights the totally different out there enhancements you can also make, similar to:

    • Improved edge case dealing with within the system immediate
    • Use a greater embedding mannequin for improved RAG

    You then plot these knowledge factors in a 2D grid, similar to beneath. You need to naturally prioritize gadgets within the higher left quadrant as a result of they supply a number of worth and require little effort. Usually, nonetheless, gadgets are contained on a diagonal, the place improved worth correlates strongly with larger required effort.

    This determine reveals a worth effort graph. The worth effort graph shows totally different enhancements you can also make to your product. The enhancements are displayed within the graph in response to how priceless they’re and the trouble required to construct them. Picture by ChatGPT.

    I put all my enchancment solutions right into a value-effort graph, after which regularly choose gadgets which can be as excessive as potential in worth, and as little as potential in effort. This can be a tremendous efficient method to shortly clear up essentially the most urgent points together with your LLM, positively impacting the biggest variety of clients you possibly can for a given quantity of effort.

    Step 3: Consider and iterate

    The final step in my three-step course of is to guage my LLM and iterate. There are a plethora of strategies you need to use to guage your LLM, a number of which I cowl in my article on the topic.

    Ideally, you create some quantitative metrics to your LLMs’ efficiency, and guarantee these metrics have improved from the modifications you utilized in step 2. After making use of these modifications and verifying they improved your LLM, you need to contemplate whether or not the mannequin is nice sufficient or in the event you ought to proceed enhancing the mannequin. I most frequently function on the 80% precept, which states that 80% efficiency is nice sufficient in virtually all instances. This isn’t a literal 80% as in accuracy. It fairly highlights the purpose that you simply don’t must create an ideal mannequin, however fairly solely create a mannequin that’s ok.

    Conclusion

    On this article, I’ve mentioned the situation the place you have already got an LLM in manufacturing, and also you wish to analyze and enhance your LLM. I method this situation by first analyzing the mannequin inputs and outputs, ideally by full handbook inspection. After making certain I actually perceive the dataset and the way the mannequin behaves, I additionally transfer into extra quantitative metrics, similar to grouping queries right into a taxonomy and utilizing LLM as a decide. Following this, I implement enhancements primarily based on my findings within the earlier step, and lastly, I consider whether or not my enhancements labored as meant.

    👉 Discover me on socials:

    🧑‍💻 Get in touch

    🔗 LinkedIn

    🐦 X / Twitter

    ✍️ Medium

    Or learn my different articles:



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Editor Times Featured
    • Website

    Related Posts

    System Design Series: Apache Flink from 10,000 Feet, and Building a Flink-powered Recommendation Engine

    April 30, 2026

    Agentic AI: How to Save on Tokens

    April 29, 2026

    4 YAML Files Instead of PySpark: How We Let Analysts Build Data Pipelines Without Engineers

    April 29, 2026

    Ensembles of Ensembles of Ensembles: A Guide to Stacking

    April 29, 2026

    How AI Policy in South Africa Is Ruining Itself

    April 29, 2026

    PyTorch NaNs Are Silent Killers — So I Built a 3ms Hook to Catch Them at the Exact Layer

    April 28, 2026

    Comments are closed.

    Editors Picks

    Roam Rider twin-slide pop-up pickup camper

    April 30, 2026

    Airwallex founder Jack Zhang is offering $100,000 to AI startup founders under 25

    April 30, 2026

    How Elon Musk Squeezed OpenAI: They ‘Are Gonna Want to Kill Me’

    April 30, 2026

    Resorts World NYC opens first full casino in New York City with live table games in Queens

    April 30, 2026
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    About Us
    About Us

    Welcome to Times Featured, an AI-driven entrepreneurship growth engine that is transforming the future of work, bridging the digital divide and encouraging younger community inclusion in the 4th Industrial Revolution, and nurturing new market leaders.

    Empowering the growth of profiles, leaders, entrepreneurs businesses, and startups on international landscape.

    Asia-Middle East-Europe-North America-Australia-Africa

    Facebook LinkedIn WhatsApp
    Featured Picks

    Injecting domain expertise into your AI system | by Dr. Janna Lipenkova | Feb, 2025

    February 1, 2025

    How FWaaS is Redefining Perimeter Defense in the Cloud Era

    December 3, 2025

    No iOS 26 Public Beta Yet but It Could Land on Your iPhone Soon

    July 23, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    Copyright © 2024 Timesfeatured.com IP Limited. All Rights.
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us

    Type above and press Enter to search. Press Esc to cancel.