Skip to main content

Local semantic routing

File: config/system/system-semantic.json. Side: server. A missing file is read after being copied from the file of the same name under the JAR's defaults.

FieldTypeRequiredDefaultDescription
modeStringno"enforce"off disables it, shadow computes in the background, enforce actually uses it for decisions; lowercase.
maxCharactersIntegerno240Text length budget for local matching, positive integer.
minCoverageNumberno0.9Lexical coverage threshold, 0–1.
defaultThresholdObjectno{"score":0.9,"margin":0.15}Default score / margin, both 0–1.
languagesArrayno["zh","en"]List of supported base language codes, such as zh and en.
lexicalThresholdsObjectno{}Overrides thresholds by workflow ID or ID@language.
examplesObjectno{}Workflow ID → language → array of example utterances.
cacheEntriesIntegerno1024Capacity of the global routing cache.
cacheSecondsIntegerno300Number of seconds a cache entry stays valid.
entriesPerPlayerIntegerno32Number of cache entries per player.
modeScoresObjectno{"functions":-0.1,"freeChat":0.03}Score offset for functions and freeChat, range -1 to 1; the final threshold is clamped to 0–1.

Similarity and the gap between candidates are not probabilities. Function mode uses the functions offset to match locally as much as possible, while free chat, when allowed, uses the freeChat offset to raise the matching bar. See Local routing for details.

Bundled default file​

config/system/system-semantic.json
{
"mode": "enforce",
"maxCharacters": 240,
"minCoverage": 0.9,
"defaultThreshold": {
"score": 0.9,
"margin": 0.15
},
"languages": [
"zh",
"en"
],
"lexicalThresholds": {},
"examples": {},
"cacheEntries": 1024,
"cacheSeconds": 300,
"entriesPerPlayer": 32,
"modeScores": {
"functions": -0.1,
"freeChat": 0.03
}
}