Implementing a Knowledge Base
This page describes how to implement your own Knowledge Base given a data source.
There are three approaches to implement your own Knowledge Base:
- Java
- REST Developer API
- Knowledge Mapper (based on a Python client)
- JavaScript client
Implementing your own Knowledge Interaction
When you receive a request for data via an ANSWER or REACT Knowledge Interaction, you should return the expected results, e.g. by retrieving data from an API.
If you do not have a response, then you should send an empty binding set. Also, when your REACT Knowledge Interaction has no result graph pattern, you should always return an empty binding set to the Knowledge Engine.
If an error occurs while responding, you can either return an empty BindingSet (although this does not give any information about the error occurring) or call the (in case you are using the asynchronous handler methods of the Java Developer API) future.completeExceptionally(...) method.