{
  "id": 5253321,
  "title": "Modeling 恋みくじ Results as Structured Content, Not Random Strings",
  "url": "https://urgent.news/2026/09/03/modeling-results-as-structured-content-not-random-strings",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-03T05:18:45.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/keyoneok/modeling-lian-mikuzi-results-as-structured-content-not-random-strings-42i1"
  },
  "original_language": "en",
  "account": "Building fortune application architecture beyond random strings involves treating each fortune as structured content rather than a flat array of strings. This approach separates the different components of a fortune, such as headline, interpretation, action, and reflection, allowing for greater coherence and cultural understanding. The challenge lies in modeling emotional content so that each result remains appropriate, understandable, and safe to present.\n\nA flat string array becomes cumbersome and difficult to manage as the number of results grows. It can lead to unsuitable results appearing in various contexts, making localization, testing, and maintenance challenging. The focus shifts from simply choosing a random sentence to modeling emotional content in a way that ensures coherence and cultural understanding.\n\nThe proposed architecture includes defining types for relationship situations, fortune tone, and fortune objects. Each fortune object contains an ID, an array of applicable situations, a tone, a headline, interpretation, action, reflection, weight, and locale. This structure allows for more flexibility and easier management of fortune content.\n\nThe selection process is divided into two stages: determining eligibility based on the visitor's situation and locale, and then randomly selecting a result from the eligible set. This prevents inappropriate results from being presented. Weighting can be used to control the frequency of certain results, ensuring that broadly applicable fortunes are presented more often than highly specific ones. However, weighting should not be used to manipulate visitors emotionally, and it should not be used to increase the likelihood of positive results after the visitor has viewed an advertisement.\n\nA simple method to prevent immediate repetition and make the experience feel more natural is to store a small number of recent result IDs in local storage. This approach allows for a more personalized experience without compromising privacy or security.",
  "summary": "Disclosure: I am involved in the project discussed in this article. I am sharing the content-modeling lessons behind it rather than presenting this as an independent review. The first version of a fortune application is usually built around an array of strings: javascript const fortunes = [ \"A new relationship may begin soon.\", \"Be patient and wait for the right moment.\", \"Someone may be thinking…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}