Onaji Sara: Same Plate, Safe Plate

A small AI that reads ingredient lists, flags allergens, and helps children with food allergies eat the same dish as their friends.

Prototype. Not a medical or labeling tool. The AI is trained on a small set of ingredient lines written by the author, and it can miss allergens. Always read the real label and ask staff before eating. Trained in your browser: no server, no API key, no data leaves this page.

1. Who is at the table?

Tick the foods each person must avoid. The example values are for illustration.

3. Try your own ingredient text

Type or paste an ingredient list in English or Japanese. The probabilities update as you type.

AllergenModel probabilityKeywordFlagWords that pushed the model

No flag from this tool is not a guarantee of safety. It can miss allergens, including allergens outside these eight classes. Always check the real label and ask staff.

4. How the model was trained and tested

Independent test: calculating recall and missed labels…

These synthetic test lines are separate from the training set and are never used to fit vocabulary, IDF or model weights, or to select the threshold. They were written for this review, including known spelling gaps; they are not a blind or external validation set. Counts refer to allergen labels, not dishes. Recall = detected expected labels / all expected labels.

SystemDetected labelsMissed labelsFalse flagsMicro recallMicro precision
Inspect every test line and the combined system's misses
Ingredient textExpected labelsMissed labelsFalse flags

Keyword matches are prompts to check ingredients, not proof that an allergen is present. Sauce and miso recipes vary; generic flour, bread and noodle names are flagged for wheat as a precaution. Broad matches can also flag non-wheat flour or plant-based substitutes.

Training loss (average over the 8 allergen models)

5-fold cross-validation on the author-labeled set

Each ingredient line was predicted by a model that never saw it during training. F1 is shown per allergen. Higher is better.

AllergenLines with itModel F1Keyword F1Model + keyword F1

Limitations: the training set is small and written by one person, so the scores are a demo of the method, not a clinical accuracy claim. The model has low F1 on rare allergens; combined results largely come from keyword matching. The threshold and training settings were chosen using the same training data, so cross-validation does not independently validate those choices. Real use needs a labeled dataset from product labels and a review by allergy specialists.