Modeling and Retrieving a Fantasy Beverage Knowledge Base: A Content Engineering Practice
This article presents a general content engineering approach for turning a list-style fantasy beverage catalog into a structured, queryable knowledge base. It covers a three-tier classification (category, style, entry), a field schema for each drink, controlled vocabularies for flavor and risk, multi-value audience tags, separately modeled pricing and rarity, and a three-way retrieval strategy (keyword, filter, association) with default ranking rules. It also explains how to keep content, numbers, and display text in separate columns so they can evolve independently, plus a versioning and proofreading workflow and a practical rollout checklist. Readers will learn how to model worldbuilding data so that downstream systems read structured results rather than parsing free text.
Background and Goals
In fantasy settings, beverages are rarely just a list of drinks; they are part of the world. Origin hints at geography and trade, taste hints at racial preferences, and strength and side effects hint at the boundaries of the rules. Source material is usually a set of short lines listing names, mixing methods, aromas, and prices—good for quick lookup but poor for retrieval, reuse, and ongoing revision. Entries lack unified fields: the same drink might be written as a base spirit, a mixed drink, and a regional specialty all at once; price units are mixed; and effects such as “nauseating,” “extremely strong,” or “repulsive” have no computable tags.
This article discusses a general content engineering practice: turning a beverage catalog into a knowledge base rather than promoting any particular game, platform, or brewing product. There are four goals. First, express each drink with stable categories and fields. Second, break flavor, ingredients, audience, and risk into filterable tags. Third, support scenario-based retrieval, such as “cheap port ale,” “crisp floral light beer,” or “unsuitable for non-goblin characters.” Fourth, let copy, numeric values, and display text evolve separately without overwriting one another.
Abstract First, Then Expand
With list-style source material, rewriting sentence by sentence is not the right move. A more robust approach is to extract the implicit structure and then rewrite against that structure.
Several kinds of information can be distilled from the material:
- Base spirits and mixing: rum with water, optionally citrus; sediment mixed with water; tea blended with brandy.
- Races and origins: goblins, orcs, dwarves, elves, and halflings have different preferences, and mountains, valleys, ports, and deserts yield different flavors.
- Styles: ale, wine, bitter, dark beer, light beer, mead, cordial, spirit, and brandy.
- Sensory notes: nutty, floral, golden and stimulating, musty odor, crisp, and strong but not refined.
- Rule effects: nausea, a tendency to rage, instability in sunlight. These should be treated as narrative tags, not real chemical formulas.
- Economic information: priced by the cup, the jug, or the bottle, with both cheap and rare options coexisting.
After this abstraction, the article no longer restates the original list. Instead, it explains how this information enters the data model and how editors and retrieval use it.
Classification System
A three-tier classification is recommended to avoid piling all names at a single level.
The first tier is the beverage category: malt-fermented drinks, grape-fermented drinks, honey or floral-nectar brews, distilled spirits, mixed drinks, and non-alcoholic or low-alcohol teas. Categories are used for navigation and inventory statistics.
The second tier is style: pale ale, dark bitter, everyday dark beer, ordinary table wine, fortified wine, fruit brandy, herbal mixed drinks, and so on. Style is used to filter similar substitutes.
The third tier is the specific entry: a displayable name with optional aliases. Aliases solve the problem of the same drink having different names in different regions; during search, aliases hit equally with the primary name, while display highlights only the primary name.
Racial preferences should not be modeled as mutually exclusive categories. One ale can be accepted by both warriors and dwarf settlements, and one spirit can be “generally not drunk neat but suitable as a base.” Use multi-value tags, not a single-select field.
Model price separately and do not write it into the style name. The source contains both “some silver coins per cup” and “some gold coins per bottle.” Record the pricing unit (cup, jug, bottle), the currency tier (silver, gold), and the relative rarity (cheap, ordinary, fine vintage, rare), and format it into a sentence at the display layer. This way, adjusting the economic system does not require rewriting all the copy.
Field Design
Each drink entry should contain at least the following fields, with types expressed using generic data.
- Identifier: a stable primary key that does not change with the display name.
- Name and aliases.
- Category and style.
- Summary: one or two sentences for list display.
- Sensory: color, aroma, palate, and finish, each a list of phrases.
- Ingredient hints: grain, grape, honey, citrus, spice, dairy, tea, and so on. Record only ingredient categories within the world; do not write operable real brewing steps or parameters.
- Mixing relations: whether it is a base spirit, whether it is often watered down, and which citrus or tea it pairs with. Express these by referencing another entry rather than hard-coding them into the body text.
- Audience tags: recommended races, discouraged races, and common scenes (daily, port, banquet, ritual).
- Narrative effects: for example, gastrointestinal discomfort, emotional agitation, or a container that must be kept away from light and heat. Effects must carry a “narrative” flag and an intensity enum (none, mild, significant) to avoid confusion with real medical advice.
- Economics: unit, tier, and rarity.
- Origin note: abstract origins such as mountain grapes, valley gardens, port bulk, and forest gathering; do not bind to unconfirmed external partnerships or specific commercial brands.
- Status: draft, reviewed, or archived, plus a version number and last-updated time.
The sample structure below is only an example of field organization, not the API definition of any cloud product:
{"id": "ale-nutty-halfling-style","name": "坚果风味棕麦酒","aliases": ["谷地家酿麦酒"],"category": "malt","style": "brown-ale","summary": "半身人聚落常见的日常麦酒,坚果香明显,酒体适中。","senses": {"color": ["棕"], "aroma": ["坚果"], "palate": ["顺口"]},"ingredients": ["麦芽", "当地水源"],"audience": {"favored": ["halfling"], "scenes": ["daily"]},"narrativeEffects": [],"price": {"unit": "cup", "tier": "silver", "rarity": "common"},"status": "reviewed"}
A semantic short name is enough for the primary key, but once published it must not change just to polish the copy. The display name can change while the identifier stays stable, so references from tasks, dialogues, and archives do not break.
Flavor and Risk Tags
Sensory descriptions easily drift into literary sentences, but retrieval needs a controlled vocabulary. Maintain a small vocabulary: color (pale gold, golden, deep red, near-black), aroma (citrus, floral, nutty, spice, honeyed, stale), and palate (crisp, stimulating, heavy, sweet, bitter). New words enter a candidate pool first and join the official vocabulary only after proofreading. This lets “floral crisp light beer” and “nutty brown ale” be cross-filtered instead of depending on editors’ ad-hoc wording.
Risk tags should be used with restraint. The material contains strong odors, post-drinking discomfort, container instability in sunlight, and possible rage. These are suitable as in-game narrative effects and must satisfy three conditions: they take effect only within fictional rules; they provide no real preparation, ratios, or enhancement methods; and the display strategy for minor audiences is configured separately by product policy, for example, collapsing high-strength entries by default. The knowledge base stores only tags and display levels, not operation steps.
Price and rarity should not imply real-world transactions either. Currency is only an in-world unit. If a store or numeric system is integrated later, the economic module reads the tier and the content library does not handle settlement.
Retrieval and Association
Retrieval works along three complementary paths.
Keyword search covers names, aliases, and summaries, handling the case where a player remembers only half a name. Filter search covers category, style, aroma, audience, rarity, and whether an entry has narrative effects. Association search answers “what to mix this with.” For example, a red-purple strong base spirit can be tagged “rarely drunk neat” and associated with citrus, tea, or a mild diluent, where the diluent is itself another record. Querying for “suitable as a base” returns the base and its common pairings rather than writing the pairings into every repeated paragraph.
The suggested default ordering is: first by scene match, then by rarity from common to rare, and finally by name. Rare elven-style mead, moon-dew, and sun-extracted spirits should not bury everyday port ale unless the user explicitly filters for “rare” or “banquet.”
A simple query convention can be defined while staying neutral and not binding to any specific search engine syntax: a filter condition of style equals light beer AND aroma contains floral; OR narrative effect contains gastrointestinal discomfort AND audience is not goblin-type. This can be implemented with a generic inverted index plus tag filtering, without introducing a proprietary query language.
Versioning, Proofreading, and Multi-Channel Display
Beverage copy is repeatedly rewritten by worldbuilding revisions. Store the body, tags, and price in separate columns. Tag changes go through proofreading, and price changes can be published separately. Each publish generates a read-only version; the dialogue system and client read only published versions, while the editor reads and writes drafts. This makes it possible to roll back a mistaken edit such as “rewrote an ordinary red wine as a fine vintage.”
The display layer trims fields by channel. A catalog page shows sensory notes, origin, and price; combat or status systems read only narrative effects and intensity; and character-creation background descriptions take only the summary. Do not let downstream systems parse natural-language sentences to decide “whether it causes nausea”—that decision must come from structured fields.
The proofreading checklist can be fixed: whether the name conflicts with aliases; whether category and style are consistent; whether real brewing parameters were written into the ingredient field; whether narrative effects are missing intensity; whether a price unit is missing; and whether real-world brands, domains, or unconfirmed partnership statements appear. The last item is especially important: the content library serves a fictional catalog and should not carry third-party product promotion or claim that a cloud vendor built something custom for an external client.
Implementation Steps
Step 1: Inventory existing entries, keep only verifiable short descriptions, and discard duplicate sentences.
Step 2: Apply the three-tier classification and fill in the identifier, style, and rarity for each entry.
Step 3: Rewrite aromas, palate, and side effects into vocabulary tags, and rewrite long original sentences into summaries, avoiding large verbatim copies.
Step 4: Establish mixing relations: watering down, adding citrus, tea blending, and serving as a base.
Step 5: Set publish versions and display levels. First make list retrieval usable, then add regional stories.
Step 6: Run a regression on a dozen or so typical samples: cheap port ale, nutty brown ale, golden stimulating fermented drink, strong but not delicate wine, crisp floral light beer, rare mead, a base spirit not meant to be drunk neat, and an herbal tea mix. Covering the categories is enough; there is no need to enter all aliases at once.
After these steps, the catalog goes from “a readable list” to “queryable setting data.” Adding new drinks later only requires following the same vocabulary and fields; the copy can keep its literariness, while the system and rules always read the structured results.
