NLU Facade
General description
The NLU Facade is a component designed to streamline and manage Natural Language Understanding (NLU) operations. It acts as an intermediary between the application and the NLU pipeline, which in turn interacts with various NLU services.
Main responsibilities:
- constructing and sending requests to the NLU pipeline for training and classification,
- implementing autocorrection mechanisms to improve the accuracy of NLU processes.,
- collecting and consolidating responses from the NLU pipelines,
- managing and applying various NLU settings to customize and optimize NLU operations.
API
Default port: 5751
The application has got HTTP API which is not secured by any mechanism, therefore should NOT be visible from outside the Kubernetes cluster.
There are default endpoints for monitoring purposes. They are described in Components monitoring section.
Databases
SQL
The component has its own SQL Database for storing NLU and autocorrect settings. Main tables:
- nlu_settings - contains NLU settings used during phrase classification,
- autocorrect_settings - contains autocorrect settings used for autocorrecting phrase.
RabbitMQ
The component reads data from the queues:
- automate.nlu.train - used for consuming NLU train requests,
- automate.nlu.stop.train - used for consuming NLU stop train request.
The component writes data to the queues:
- automate.pipeline.process - used for passing train request to NLU pipeline,
- automate.pipeline.stop - used for passing train stop request to NLU pipeline.
Communication
This service communicates with the following services:
Application | Config to URL | Auth |
---|---|---|
nlu-pipeline | chatbots.nlu-pipeline-api.url | None |
Also this service communicates with different components via RabitMQ's queues as described above
Config
Application's config
chatbots.nlu-facade {
db {
url: "jdbc:postgresql://HOST:PORT/chatbots-nlu-facade",
user: "USER",
password: "PASSWORD"
max-connections: 20
}
client-timeout: 60m
pipeline-request-message-timeout: 30s
// configuration of NLU services
nlu-services {
default: {
inferrer: {
url: "http://inferrer:12416"
}
duckling: {
url: "http://sentiduck:2012"
}
intentizer-classify {
url: "http://intentizer-multi:6543"
buffering {
level-change-threshold: 4
levels: [{limit: 36, interval: 100ms}]
max-concurrent-requests: 8
}
}
intentizer-train {
url: "http://intentizer-fitter:6544"
async: {
status-interval: 5s
timeout: 120m
}
}
keywords: {
url: "http://keywords:11234"
}
pcre: {
url: "http://pcre:5000"
},
pattern: {
url: "http://pattern:5000"
},
tokenizer: {
url: "http://tagger-multi:9200"
},
ner: {
url: "http://ner-multi:5000"
},
emerging-intents: {
url: "http://emerging-intents:5000"
}
}
pl: {
ner: {
url: "http://ner-pl:5000"
}
tokenizer: {
url: "http://tokenizer-pl:9300"
}
}
de: {
tokenizer: {
url: "http://tagger-de:9200"
}
}
en: {
tokenizer: {
url: "http://tagger-en:9200",
}
}
}
}
API config
chatbots.nlu-facade-api {
// supported languages are pl, en, de
autocorrect-languages: []
}
Job execution
None
Updated 4 months ago