Swaran Soft
Enterprise AI

AI Model Evaluation: How to Assess the Accuracy, Reliability and Value of an AI Model

November 5, 20267 min readBy Yogesh Huja, Founder & CEO
AI Model Evaluation: How to Assess the Accuracy, Reliability and Value of an AI Model

AI model evaluation

Often the decision to implement an AI system is made following a successful demonstration. Members of a team test an AI model, and are convinced by its ability to answer questions appropriately. Yet, 3 months later, users begin to experience strange outputs. There is no consensus on whether the model has improved or worsened, and demonstrating its value to the business can also be challenging.

Whilst many organisations assess models in simplistic terms (often just providing an overall accuracy figure), a robust process is required to determine if a model is accurate enough, reliable and manages exceptional circumstances in a safe manner. Evaluation should also ensure that a model provides the intended business value.

Three evaluation areas

Good evaluation considers:

  • Accuracy – is the model frequently able to provide the correct output for the given application?
  • Reliability – is behaviour uniform for different users, data and exceptional situations? Does it also manage exceptional circumstances safely?
  • Value – are there benefits in terms of cost savings, quicker decision making, increased revenues or reduced risk versus the previous method?

Whilst many teams focus on the first of these, a model may have excellent average accuracy yet underperform in certain regions, product ranges or customer bases. Similarly, even a very accurate model will have no value if it is not adopted.

Evaluating traditional machine learning models

Depending on the nature of the model (prediction and/or classification), different evaluation measures apply.

ModelIndicatorsConsiderations
Classification (fraud, churn, faults)Precision, recall, F1 score and AUCWhether false negatives or false positives are more costly
Regression (prediction, pricing)MAE, RMSE and MAPEWhether errors are more significant for high value items
Ranking (search, recommendations)Precision at k and NDCGWhether top ranked outputs are shown first
Computer Vision (inspection)Detection and false rejection ratesAbility to detect and reject correctly, particularly for uncommon faults

Whilst overall accuracy can be deceptive, for example, if only 1% of transactions are fraudulent then a model which never identifies fraud will have excellent 99% accuracy, but will be utterly ineffective. For a fraud detection model it is important to strike the correct balance between recall (the proportion of actual fraud which is detected) and precision (the proportion of alerts which are genuine). This is a business rather than a purely technical consideration.

Evaluating generative AI and language models

Although it can be more complex to evaluate generative AI due to often being open-ended (for example, good summary and email drafting can be achieved in various ways), evaluation can still be effectively performed.

Firstly, compile a test data set of real queries or activities. Ideally this will contain 150-300 items and will be accompanied by correct responses or clear assessment guidelines, developed by subject matter experts. Where a model draws information from corporate content, assessment points include the ability to identify the appropriate content, to remain true to this and to fully address a query. An AI should also correctly decline to respond where information is not available.

Assessment can be undertaken manually, automatically or by another language model which follows a defined assessment framework. Although model based assessment is quick and economical, it should periodically be cross-referenced with manual assessment since it too is subject to bias.

Additionally, assess that a model does not provide unsafe information such as private data, incorrect policy information, or unsafe guidance. You should also verify that it resists prompt injection (hidden prompts within content). These assessments should be conducted for each model release.

Assessing reliability

In addition to analysing average performance, sub-segment analysis should be carried out for example by region, language, product range, customer base and/or type of content. Ensure that no sub-segment is poorly addressed. Where a model is used for decision making (such as in recruitment or lending), analyse if there are unjust variations in outcomes between sub-segments.

Proactively assess how the model deals with exceptional scenarios. How does it respond to incomplete or atypical data? To lengthy inputs? And to queries in Hindi where content is in English? Also confirm that the model produces the same result for identical queries – otherwise confidence in it will rapidly erode.

Finally, analyse real-life system operation. This includes assessing speed, cost per query and behaviour when a linked system is unavailable. Even if a model is highly accurate it cannot be deemed reliable if it regularly exceeds time-out limits during busy periods.

Connecting evaluation to business value

Whilst technical evaluation data is important, it needs to be related to business outcomes. Firstly, identify the business metric that the AI system is designed to affect. Secondly, establish the present value in relation to this. For an HR assistant this may relate to query resolution speed; for a predictive model it could involve days of stock in hand and frequency of stock-outs; and for an invoicing system, cost and invoicing cycle time.

After implementation, analyse the variation in these metrics – ideally contrasting performance with either a control group or historical data. For example, our MonaWork HR agent was assessed according to both query resolution speed (which reduced to under 4 minutes from around 2 days) and the proportion of queries resolved without HR intervention (which rose to c.70%). These are easily understood business figures.

Evaluation continues post-implementation

As time passes, models can become less effective. Customers’ behaviour, products and content updates all evolve and data streams can also alter. Production environment monitoring should therefore involve analysis of data evolution, sample assessment of model predictions or responses, user comments and corrections and review of the relevant business metric.

Before any new development is implemented (for example, a new model, prompting and/or data source), it should be assessed using the same test data set. In this way, evaluation becomes an ongoing regression testing function.

Establishing an evaluation process

Action
Identify success criteriaDecide on the relevant business metric, desired minimum accuracy and non-negotiable error avoidance points.
Compile test dataCompile a test set containing real data and confirmed responses. Include both challenging and exceptional circumstances.
Establish comparative points of referenceAssess existing processes and also deploy and assess a basic model to provide a baseline for more sophisticated models.
AutomateEnsure that evaluation is automatically performed for all developments and that historical evaluation data is maintained.
Periodically reviewMonthly analyse data relating to quality, evolution, user comment and business impact.

Swaran Soft has been delivering enterprise software solutions for over 25 years. From week 2 of an 8 week AI pilot, we embed evaluation within our AI implementations. This enables clients to precisely understand their AI systems’ performance.

Typical evaluation errors

Using test data which is overly similar to that on which a model was trained will give falsely optimistic results. To avoid this, prevent the inclusion of recently obtained data and add test items which refer to new customers, products and/or content.

Secondly, many teams select test queries which they believe will be well suited to an AI. Ideally, however, test data should embrace challenging, unclear and poorly worded queries as these are typically those which users actually submit.

Thirdly, several developments are often implemented simultaneously. If a new model, prompting and/or content source are introduced together then it will be impossible to discern which development positively or adversely affected performance. Instead, test individual developments using the same test data set.

Fourthly, evaluation frequently remains solely a technical function. Business owners should, however, also contribute to test data compilation and definition of what constitutes a correct response. They will best understand which errors are truly problematic.

Next steps

Select either an existing or proposed AI system. Note down the specific business metric that it should influence and the current value in relation to this. Then compile a test data set of 50 real items with confirmed responses. This will enable you to effectively evaluate an AI.

To find out more about how to effectively evaluate your AI systems please book a free 45 minute AI Pilot Assessment. Contact us on info@swaransoft.com, +91 9220-313-650 or visit www.swaransoft.com.

Frequently asked questions

Free 45-minute AI Pilot Assessment

Share this article:
Yogesh Huja — Founder & CEO, Swaran Soft
Yogesh HujaFounder & CEO

AI Architect and Entrepreneur building India's Edge AI ecosystem. 25+ years in enterprise technology. Founder of Swaran Soft, Gignaati, and Copilots.in.

Published: ⏱ 7 min read