Multilingual Enrichment - Entity Enricher Documentation

Multilingual Enrichment

Entity Enricher can produce enrichment results in up to 40 languages simultaneously. Multilingual fields are stored as language-keyed JSON objects — a format that is portable, queryable, and compatible with every major database.

Workflow Editor: Multilingual Toggle

In the schema editor, toggle the multilingual flag on any string or array-of-strings property. When enabled, the LLM returns values wrapped in a language-keyed object instead of a plain value.

How It Works

1
Mark fields as multilingual
In the schema editor, check the multilingual checkbox on string or array properties. The flag is stored as multilingual: true in the JSON schema.
2
Select target languages
In the sidebar options, pick one or more languages from the 40 supported languages. The enrichment prompt instructs the LLM to produce values in each selected language. The first selected language is the primary language: it is highlighted with a “Primary” badge and is used for all non-multilingual string fields (descriptions, names, etc. that are not marked multilingual: true). Use the button on any other chip to promote it as primary. The backend also filters out any stray language keys the LLM might emit that aren’t in your selection.
3
LLM returns language-keyed output
The dynamic Pydantic model wraps multilingual fields as dict[str, T], where keys are ISO 639-1 language codes and values match the field type.

Data Format

Multilingual values are stored as JSON objects with language codes as keys. This format was chosen over alternatives for its portability, queryability, and storage efficiency.

Multilingual String
Schema property
"description": {
"type": "string",
"multilingual": true
}
Enrichment output
"description": {
"en": "A global pharma company",
"fr": "Une entreprise pharma mondiale",
"ar": "شركة أدوية عالمية"
}
Multilingual Array
Schema property
"indications": {
"type": "array",
"items": { "type": "string" },
"multilingual": true
}
Enrichment output
"indications": {
"en": ["pain relief", "fever"],
"fr": ["anti-douleur", "fièvre"],
"ar": ["تخفيف الألم", "حمى"]
}
Non-Multilingual Fields

Fields without multilingual: true are returned as plain values. Identifiers, codes, URLs, dates, and numbers typically stay non-multilingual.

"atc_code": "N02BE01",
"founded_year": 1973,
"website": "https://example.com"

Why This Format?

Two approaches exist for multilingual arrays. Entity Enricher uses Format A (language-keyed object) because it is the only format that works as-is across all major databases without transformation.

CriteriaA Language-keyed objectB Array of localized items
Structure{"en": [...], "fr": [...]}[{"en": "x", "fr": "y"}, ...]
Query one languageDirect access
data -> 'field' -> 'en'
Requires iteration
jsonb_array_elements + extract
Add a languageAdd one key to the objectUpdate every item in the array
Consistent with scalarsYes — same {"en": "...", "fr": "..."} patternNo — different shape for strings vs arrays
Database portabilityAll major databasesAll major databases

Database Query Examples

The language-keyed format is natively queryable in all major databases that support JSON columns.

PostgreSQL
-- Get English description
SELECT structured_output -> 'description' -> 'en' FROM enrichment_records;
-- Search within a multilingual array
SELECT * FROM enrichment_records
WHERE structured_output -> 'indications' -> 'en' ? 'pain relief';
MySQL 8+
-- Get French description
SELECT JSON_EXTRACT(structured_output, '$.description.fr') FROM enrichment_records;
MongoDB
// Project only Arabic values
db.records.find({}, { "description.ar": 1, "indications.ar": 1 })
SQL Server
-- Get German description
SELECT JSON_VALUE(structured_output, '$.description.de') FROM enrichment_records;

Supported Languages

40 languages are available. Select any combination when running an enrichment.

Global Languages
enEnglish
zhChinese
hiHindi
esSpanish
arArabic
frFrench
bnBengali
ptPortuguese
ruRussian
jaJapanese
deGerman
urUrdu
viVietnamese
trTurkish
koKorean
taTamil
mrMarathi
teTelugu
paPunjabi
yueCantonese
itItalian
European Languages
plPolish
ukUkrainian
roRomanian
nlDutch
elGreek
csCzech
huHungarian
svSwedish
srSerbian
bgBulgarian
hrCroatian
skSlovak
daDanish
fiFinnish
noNorwegian
ltLithuanian
slSlovenian
lvLatvian
etEstonian

Which Fields Should Be Multilingual?

Mark as multilingual
  • Names and labels (city, country, product name)
  • Descriptions and summaries
  • Medical/scientific terms
  • Status labels (“Approved”, “Active”)
  • Category labels and tags
  • Instructions and recommendations
Keep non-multilingual
  • Preserved fields (marked preserve)
  • Technical identifiers (UUIDs, IDs)
  • Standardized codes (ATC, CAS, ISO)
  • Acronyms (FDA, EMA, WHO)
  • Numbers, dates, percentages
  • URLs, emails, phone numbers
  • Boolean flags

The multilingual flag cannot be combined with the preserve flag: a preserved value passes through untranslated, in a single language. The schema editor disables the conflicting toggle, and the API rejects schemas carrying both flags. Key fields (natural or database keys) can be multilingual — entity identity then uses the schema's locked key language.

Valid Field Types

The multilingual flag is only valid on certain property types. The schema editor enforces this automatically.

Property TypeMultilingual?Output Format
stringYesdict[str, str]
number / integerYesdict[str, float]
booleanYesdict[str, bool]
array of primitivesYesdict[str, list[str]]
objectNoMark individual fields inside the object instead — unless the object is one row per language, see below
array of objectsNoMark individual fields inside items instead
$refNoMark fields inside the referenced entity instead

What multilingual cannot combine with

A multilingual value is a map of languages, not a single value — so attributes that constrain a single value cannot apply to it. These conflicts are resolved when the schema is generated and refused when you save one by hand, rather than failing later at enrichment.

Closed vocabularies win

A property restricted to a fixed set of members cannot also be multilingual: the members are canonical tokens, and a consumer database constrains a column against them. Translated labels belong in a lookup table of your own, keyed on the token.

Format and pattern do not apply

A date, a UUID or a regex-checked code has one machine-readable form, not one per language. Saving a property that is both is rejected.

Preserve wins over multilingual

A preserved value is your data returned untouched, so there is nothing to translate.

Keys may be multilingual

This one is allowed. Identity is resolved in one language — fixed for the schema the first time it is published to a database — so a name can be translated without its identity moving.

When the language is data, not a translation

Some sources model language as rows: a list where each item carries a language code and its own values, one per language. That is a different shape from a multilingual property, and the two must not be mixed. Generation recognises such a property as the object's language axis — only if every observed value really is a language code — and then turns the integrated mechanism off for that whole subtree. Marking individual fields inside the item, the usual advice for objects, is exactly the wrong remedy here: it would give you translations of rows that are already one per language.

One more distinction worth keeping straight: the languages you enrich into are a per-run choice; the language a schema's own prose is written in (its descriptions and labels) is fixed on the schema; and the language identity resolves in is fixed per database. Three separate settings that all sound like “the language”.

Enrichment Pipeline Integration

Multilingual support is woven into every stage of the enrichment pipeline.

Schema
multilingual: true
on selected fields
Prompt Builder
Injects language
instructions + examples
Dynamic Model
str → dict[str, str]
Pydantic validation
JSONB Storage
Language-keyed
objects in output
Multi-expertise: When using the multi-expertise strategy, each expertise domain receives the multilingual instructions in its own prompt. Fields are translated independently per expertise, then merged into the final output.

Multilingual Fields in Fusion

When fusing results from multiple models, multilingual fields are compared per language.

ScenarioResolution
Models agree on English but differ on FrenchNot a disagreement. Identity is judged in the run's primary language, so this counts as agreement: English passes through, and French is settled by the per-language merge rule. Translation variance is never sent to an arbiter — paying a model to choose between two correct translations would be spending on nothing
One model has Arabic, another doesn'tPrefer the non-null value (Arabic is kept)
Multilingual arrays differ in length per modelUnion of all items per language