« All posts

Same input yielded different translations each time. The bug was unexpected.

If the same input gives different outputs, check for close scoring ties in translations.

In a translation app, running the same input repeatedly resulted in the word "machines" translating variably. Initially suspected a race condition, the real issue lay in the close scoring between candidate translations. The model's slight preference for either "machine" or "your PC" was influenced by rounding noise in floating-point operations. The solution was to change the input from "machines" to "equipment," which had a clearer meaning, eliminating the inconsistency.