Slowlanterns
Categories
Artificial Intelligence

Test an On Device Text Classifier With Household Labels

Use a dozen invented descriptions to find where a local sorting tool needs better examples, clearer labels, or an explicit pass to a person.

Labeled cardboard boxes set out to sort household items
In this article

A little sorting tool can guess that “tape for a parcel” belongs with wrapping supplies. The same tool may put “tape to hold a loose drawer pull” in the same box, although the writer was describing a repair. If you only try the examples you used while setting up the tool, both results can look fine. The interesting part is what happens when the right category depends on the job, instead of the first object named in the sentence.

Test the tool with a miniature collection before making it responsible for real sorting. Use imaginary descriptions of harmless objects and give yourself permission to leave uncertain cases unassigned. A small evaluation helps even when the model runs locally and the stakes are low. The aim is to discover the kinds of mistakes you can expect, and to decide which ones deserve a better category definition or a human check.

Give the category a job a person can understand

Choose three small sections for a pretend supply cupboard: packing, minor household repair, and watering or potting plants. Write each definition in terms of purpose. “Packing” means preparing an item to move, store, or send as a package. “Minor repair” means helping an ordinary household object function again. “Plant care” means tending pots, soil, and water. Those are deliberately narrow meanings. You can add a review pile for cases where the statement has two purposes or none.

Decide what the tool sees. If the input is a short description, a label like “roll of tape” can be genuinely underspecified. A person with the same description would also have trouble. Give that description a review label if the intended job is unknown. If your actual household wants a default shelf for a generic tape roll, write down that convention instead. An evaluation is only useful when the expected choice reflects a rule the people using the system accept.

Keep the exercise away from sensitive material. The notes do not need addresses, serial numbers, names, real receipts, or private inventories. An on-device model can use locally available computation for inference, but an interface may still send analytics, back up files, or call a remote service for other features. If the location of processing matters, check the app’s documentation and its settings. An offline trial with a pretend sentence can tell you whether the prediction feature remains usable without a connection. Use the invented examples even if you are satisfied with the setup.

Write clear examples and keep a separate set

For setup, use phrases that make the proposed category easy to see. “Bubble wrap around a parcel,” “replace the screw in a door handle,” and “potting soil for a balcony seedling” are reasonable starting examples. Add another variety of phrasing for each category, but reserve descriptions you intend to score. If the model accepts written instructions instead of conventional training examples, the same distinction applies. Text the tool already saw in its setup gives little evidence of how it handles different wording later.

Create twelve fresh descriptions. Include uncomplicated cases, such as “fold the flaps on a shipping carton,” “tighten the bracket on a shelf,” and “water the hanging pot.” Add cases where a noun points in one direction and a purpose points in another. “Use the small shovel to lift a label from the outdoor storage bin” may be a repair or review case depending on your rules. “Put masking tape around the box before sending it” gives the same tool an unambiguous packing purpose. Include two descriptions too vague to classify and write down that expectation.

Label each description before running the model. Write the short reason beside it. A friend can do the same for a few of them without seeing your answer. If the two of you cannot agree on a category, check the definition before treating the model’s disagreement as an error. Sometimes a muddled case reveals that users need a second tag or a field for intended use. A model cannot reliably implement a convention that the people have yet to choose.

Compare a simple rule before giving the model credit

Make a crude keyword baseline by hand. It might send a sentence mentioning parcel to packing, a sentence mentioning a screw to repair, and a sentence mentioning soil to plant care. Use one priority or send conflicting matches to review. This rule will fail for many wordings. Its purpose is to give you a recognizable comparison. A capable language model should handle at least some descriptions where the intended job is expressed without the obvious noun.

Run both approaches on the same held-back items. Record expected label, returned label, and whether a person would have to intervene. Keep a record of the tool’s version or chosen model and the label definitions. If it exposes a score, record it as an output value instead of describing it as a trustworthy probability. If it supplies only words such as “very confident,” you can still count what happened. The experiment works whenever the predictions are observable and the expected labels are stable.

Check the off-category examples too. A sentence about putting a book on a chair may have no place in the pretend cupboard. A system that selects the best of three labels will still pick something. That may satisfy the model’s output contract and fail your workflow. Decide whether to recognize an explicit review label, add a separate filter, or ask the person to confirm every prediction. Choose the amount of automation according to the cost of a wrong move.

Read the mistakes, then read the total

Suppose the tool gets nine of twelve cases right. Three errors can have different implications. One might be a tape description sent to packing because “parcel” appears in an irrelevant example, another a watering tool sent to repair because the text includes “broken,” and the third an underspecified item given a confident category. Write expected and returned labels side by side. Even without calculating a metric, you can see whether one category attracts examples from several others.

You can also ask category-specific questions. Of everything the system said belonged to packing, how many really did under your rules? That resembles precision for that label. Of everything that truly belonged to packing, how many did it find? That resembles recall. Both can matter, but they answer different questions. With twelve examples, give raw counts as well as any percentages. Two additional guesses can make a very small percentage change dramatically.

Look for errors a person would tolerate and errors that defeat the purpose. A suggested label that someone can see and correct in one click may be acceptable. Sending an object to an unavailable location or erasing its existing label would be a more costly action. A local household tool can remain useful as a suggestion system even if many borderline descriptions go to review. An explicit gap in coverage may be exactly what makes the rest pleasant to use.

Test the review rule on a fresh batch

If the interface lets you set a confidence cutoff, try it on a small development set. Track which items it leaves for review, then score a different untouched batch. Repeatedly changing the cutoff after seeing the same cases can make the numbers improve while teaching you little about unfamiliar phrasing. A higher cutoff may reduce some incorrect automatic labels and also leave more correct items undecided. Whether that trade is worthwhile depends on how easily a person can clear the review pile.

If no score is exposed, use phrases or categories you know are difficult. Ask for review on descriptions that name more than one intended job or do not say what the object is for. Verify that the tool actually honors that behavior on new sentences. A model that ignores the review instruction under some conditions still needs a person to see the suggestions before they are used.

Check one ordinary source of drift before calling the evaluation done. Ask how the sentences are likely to arrive in practice. You may type complete descriptions in a test but usually dictate half sentences while holding a box. Make a tiny extra batch in that style, without changing the intended labels. A sentence beginning “for the hanging pot” can place its purpose later than the more formal examples did. Keep these results distinct from the original score so you can see whether the input style matters. If the tool repeatedly loses the purpose, prompt users for that one piece of information instead of collecting a much larger description.

Leave a short note describing where the test worked. For example, “The model found plain packing and plant cases and often guessed on descriptions without a purpose.” Keep the twelve examples with the final label definitions and build a new set before a major change. The next time you are attracted by a polished sorting demo, you have something better than the demo’s first three examples. You know what the tool does with familiar objects in unfamiliar sentences, and you know where it should stop and hand the decision back.

Related articles