Facts
Last updated
Last updated
A fact in Rainbird is when two concept instances are connected together by a relationship and expressed with the percentage of certainty.
E.g. Given your knowledge map has a relationship of
(Country) > has a national language of > (Language)
a fact for this relationship could be
England > has a national language of > English
This is a way of expressing knowledge that is generally referred to as a fact, but in some cases it may be referred to as a relationship instance, a relinst or a triple.
In Rainbird, every fact also comes with a percentage certainty, so the fact may look like
England > has a national language of > English > 100%
What is the purpose of facts?
Facts are central to the Rainbird reasoning engine being able to provide a decision. When you query a knowledge map, the engine will try to gather the necessary facts, from a variety of sources, that enables it to provide a decision with a degree of certainty.
Facts can be generated in different ways. This is described as the source of a fact.
Fact source | Description | Scope |
---|---|---|
The scope of a fact refers to how it can be reused:
A global fact is one that is available to all sessions made to that knowledge map, because they are hard-coded within the knowledge map. This is only recommended for data that is unlikely to change.
A local fact is one that is provided or generated within a specific session. This is recommended for contextual and dynamic data that is "local" to that decision.
A session refers to the session in which a decision or decisions are made. When you query Rainbird, you first start a session, then make a query, you may respond to questions and then you get a result.
You could think of a session as like starting a conversation with Rainbird. Some knowledge (facts) will be available across all conversations (the knowledge of a countries national language) and some are local to a particular conversation (the country a person was born).
Creating global facts (facts that are available in every session) is suitable for fixed data that will rarely change.
However it can also be suitable for creating test data, to accelerate running test queries. The knowledge map can be seeded with contextual data that might be provided in other ways in a final solution that may not be readily available yet (i.e. injected from an internal system, or requested from an external datasource).
Global facts can be created in the studio by opening a concept and clicking on one of its instances.
For each instance a list of valid relationships is provided. Facts are created by selecting an object-side instance. The certainty of this fact can be adjusted, which is set to 100% by default.
The selector for the object instance will change depending on the data type of the concept. E.g. a date concept will display a date picker. Likewise, if the relationship is plural you will be able to multi-select instances. This is only supported on string concepts currently. If plural date or number facts need to be created, this must be done in RBlang within the code editor.
Knowledge map
A fact hard-coded directly into the knowledge map. They are classified as global facts and are available for any session against that knowledge map. Learn more about creating global facts
Global
Inject
A fact injected into the session by a user or a system.
Local
Datasource
A fact generated from the response of a datasource configured in the knowledge map. Learn more about setting up a datasource
Local
Rule
A fact inferred from a rule configured in the knowledge map Learn more about rules
Local
Answer
A fact provided by a user or system, as a response to a question from Rainbird. Learn more about setting up questions
Local
Synthesised
A fact automatically generated by the engine for optional conditions where no other route to the goal exists.
Local