Tips on PDF & Report Page for Rainbird Integration

Tips on PDF & Report Page Rainbird integration

An overview of the different ways you can retrieve data required for the reports from Rainbird.

When to use

This method is required for retrieving singular or plural inferred facts from the knowledge map. It does give the option for further questions to be asked by Rainbird where they have not previously been asked or inferred.


Upon ‘Start ‘ in the Rainbird API a sessionID (example below) will be generated, this sessionID should be stored to be used for subsequent queries.


When running a query against the model using the generated sessionID Rainbird will use responses from question, inferred facts and data provided or stored in the map; all of this information will be available within the session if the relevant query is then run against it.

Any relationships requiring further information may return a question rather than a result if the model is configured to do so (plurals or missing facts). If this is not desired, the model should be configured to be “Askable: None”. Rainbird cannot ask the a question it has already asked in the same session.

When to use When a facts can be inferred in different ways, with multiple possible rules in a model it may be difficult to know which other facts to query to show the reasoning. With the Evidence tree API you can see which conditions, facts and answers where used to produce an answer. For example: A person can be rejected for an application two ways:
  1. They are rejected if they are under 18, or
  2. They are rejected if they are not a UK resident.
The result show would be “Rejected”. Using the Evidence Tree API we can see the reason for the specific “Rejected” result, rather than needing to build logic around the which fact to query (age or residency). Method Each fact (Subject, Relationship, Object) created in Rainbird has a unique fact ID (example below) associated with it.
This fact ID can be queried using the Evidence Tree API and it will return further facts IDs that were used to produce this fact, this will include the instances, relationships, method (asked, inferred etc) as well as any alternative way of stating the fact configured in the model (Alt Text).

When to use

When a model is using a Rainbird led user interaction it is possible to capture the interaction as it goes back and forth from the Rainbird API. This is best used when there are certain questions that are asked every time that may be required as part of a transcript, or when the report involves the a copy of whatever has been said throughout the interaction. This is different to the evidence tree as not all facts collected in an interaction are be used in the final result, meaning they will not available after the interaction via the evidence tree interaction.


The Rainbird API allows responses from both the Rainbird Model and the User to be sent in a JSON format. With this method you can either capture all required information from each response, e.g.,

Subject, relationship, object, or only certain relationships you are looking out for by defining them in your code.

When to use

If the data required for a report or rule is large in volume but structured against a single instance it may be better to provide a single, CSV response from the model.

An example may be:

The report must show the last six months of outgoings from an account, in our model we have a relationship of each of these months;

  1. Account, shows January outgoing, X
  2. Account, shows February outgoing, X
  3. Account, shows March outgoing, X
  4. Account, shows April outgoing, X
  5. Account, shows May outgoing, X
  6. Account, shows June outgoing, X

The person the report is about has 2 accounts, this now becomes 12 queries for the report if we were to query each relationship for each Account (subject) individually, and would soon become unmanageable if there were more accounts.


We will instead build a rule into the Rainbird Model that outputs the data in a known structure to be used by the report generating software.

We use string concatenation in the model and produce CSV sting for each of the accounts. As Rainbird can deal with plural outputs this then becomes a single query (with 2 results).





ACCOUNT 1100200150400500200
ACCOUNT 2200500150 150300200

Article Feedback form
Did you find this article useful?

Version 1.02 – Last Update: 25/03/2021