NLPCraft is an open source library for adding a natural language interface to any applications. Think Amazon Alexa that is developer friendly, can work with any private data source, and has no hardware or software lock-in while giving you more NLP powers.
It's important to note that NLPCraft is a pure software library and doesn't require any specific hardware. It also doesn't deal with voice-to-text conversion as we consider this problem solved outside of this project - NLPCraft simply accepts textual input irregardless of where it came from.
How does it work in a nutshell?
When using NLPCraft you will be dealing with three main components:
NLPCraft employs model-as-a-code approach where data model is simply an implementation of
NCModel Java interface that can be developed using any JVM programming language like Java, Scala, or Groovy. Data model implementation defines how to interpret user input, how to query or control a particular data source, and finally how to format the result back to the user. Model-as-a-code natively supports any software life cycle tools and frameworks in Java eco-system.
Typically, declarative portion of the model will be stored in a separate JSON or YAML file for simpler modifications. There are no practical limitation on how complex or simple a model can be, or what other tools it can use. Most data models will also use intent-based matching provided by NLPCraft out-of-the-box.
Here's an example of the absolutely minimal data model that simply returns the same answer back for any user input:
NCModelBuilder.newModel("id", "description", "1.0") .setQueryFunction(ctx -> NCQueryResult.text("Hello World!")) .build()
To use data model it has to be deployed into data probe.
Data probe is an application designed to securely deploy and manage data models. Each probe can deploy and manage multiple models and many probes can be connected to the REST server. The main purpose of the data probe is to separate data model hosting from managing REST calls from the clients. While you would typically have just one REST server, you may have multiple data probes deployed in different geo-locations and configured differently.
Data probes can be deployed and run anywhere as long as there is an outbound connectivity, and are typically deployed in DMZ or close to your target data sources: on-premise, in the cloud, etc. Data probe uses strong 256-bit encryption and ingress only connectivity for communicating with the REST server.
REST server (or a cluster of REST servers behind a load balancer) provides URL endpoint for user applications to securely query data sources using NLI via data models deployed in data probes. Its main purpose is to accept REST-over-HTTP calls from user applications, manage connected data probes, and route user requests to and from requested data probes.