Improve AI Basics - Scoring

painting of a student receiving an A grade
"painting of a student receiving an A grade" by DALL-E

Scoring is another tool for optimization and recommendations that can reduce latency and decrease costs.

Scores are useful in a couple of ways. First, scores can be pre-computed and stored as a column in a database. This makes it easy to query items and sort them by their scores, saving precious milliseconds from doing a separate ranking step.

Scores are also useful for estimating statistics that can be input into further steps in a multi-stage recommendation system. For example scoring models could estimate click through rates, conversions, or any other metric that might be useful to a personalization or recommendation process. Since scoring is executed locally against the model, no network latency is incurred and additional systems for gathering statistics, such as Redis, don’t need to be deployed or managed.

Scoring is simple:

scores = sommelierModel.score(wines)

Scoring is useful for persisting scores in advance in a database and sorting queries by those scores.


scores = DecisionModel["recommendations"].score(items)

Rewards are not tracked via the score interface. which(), rank(), or decide() must be used to train models for scoring.

Recent Posts

2 minute read

Making Decisions with Ranker

1 minute read

In this tutorial, we’ll walk through how to use the Ranker class to make decisions, specifically choosing a discount to offer from a list of discounts. We’ll...