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.

Schema 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 (company, product, city, country)
  • Descriptions and summaries
  • Medical/scientific terms
  • Status labels (“Approved”, “Active”)
  • Category labels and tags
  • Instructions and recommendations
Keep non-multilingual
  • Technical identifiers (UUIDs, IDs)
  • Standardized codes (ATC, CAS, ISO)
  • Acronyms (FDA, EMA, WHO)
  • Numbers, dates, percentages
  • URLs, emails, phone numbers
  • Boolean flags

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
array of objectsNoMark individual fields inside items instead
$refNoMark fields inside the referenced entity instead

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 FrenchEnglish passes through; French resolved per-language via majority vote or arbitration
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