Relationship Attributes – Question Types
Question Types (configuration)
Rainbird matches facts or infers a solution to generate a result by asking questions to the end-user. The questions Rainbird asks are always about the relationship between two concepts and can either be asked as:
firstFormQuestion (Yes/No answer)
- The subject and object sides of the relationship are known and the user needs to confirm Rainbird’s assumption is correct, by selecting either Yes or No
secondFormQuestion (Rainbird is asking for a Subject/Object instance)
- Second form questions allow the user to select an answer (or answer(s) if the relationship is plural). There are two types of second form questions, dependent on whether Rainbird knows the subject or object of a query.
The example below is a map used for travel advice. An advisory board has provided information about what destinations are safe to travel to. A Person will be asked a firstFormQuestion, if they wish to Ignore Travel Advisory (yes/no), before being asked a follow-up secondFormQuestion, which will show different travel destinations depending on the answer to the first question.
Figure 1: Example travel advice map
If a relationship does not ask a questions in a query, because the answer is already known, you should select ‘None’ in the Question configuration!
First form questions function like boolean concepts. Rainbird already knows about the Subject and Object in the Relationship and asks a Yes/No question
Figure 2: A first form question
The question wording can be changed when editing the relationship:
Figure 3: Changing the First Form Question
The subject of the question is shown in brackets (in the above example, “Person and will be replaced with the Instance the user will create (their name) when running the query. The question can be rephrasedby opening the relationship where the question will be asked (in the above example, “choose to ignore travel advisory”) and changing the text under the First form section.
A firstFormQuestion can only be asked if Rainbird knows both the object and subject of a relationship, requiring the User to confirm with a ‘Yes’ or ‘No’ answer.
A second form subject question is used when Rainbird knows the object of the relationship but requires the subject:
Figure 4: Second form subject question
A second form object question is used when Rainbird knows the subject of a relationship but requires the object of a relationship:
Figure 5: The user can select answers from a drop down
In the example above, Rainbird knows the subject as it was provided by the user’s answer to the first question, asking for a Name of the User.
Figure 6: Changing the text of the Second Form (Object) question
Note: For plural relationships, second form questions will allow the user to select more than one answer. It’s also possible that the user will be asked a second form question even if relationship instances pertaining to the relationship exists. In these circumstances, the information Rainbird already knows about will be greyed out and unavailable for selection.
Click on the ‘Export.rbird’ button to download the ‘Question Types’ map used in this example. The knowledge map can then be imported into your Rainbird Studio.
Query and Results
When viewing the knowledge map generated by the RBLang below, please run the query on the relationship ‘person choice of travel’ to see different question types in action.
Version 1.01 – Last Update: 16/02/2021