Rainbird
  • 🏃‍♂️Getting started
    • What is Rainbird?
    • How does Rainbird work?
    • Example use cases
      • 📈Investment suitability assessment
      • 🤖Digital tax consultant
      • 🏥Covid risk assessment
      • 🚗Insurance claims liability
      • 💰Fraud identification
    • Hosting options
    • Quickstart guide
    • Onboarding with Rainbird
  • 🧠Knowledge Modelling
    • What is knowledge modelling?
    • What is a query?
    • Modelling
      • Concepts
        • Concept instances
      • Relationships
        • Question Configuration
        • Rules
          • Match, Infer, Ask process
          • Expressions List
      • Facts
      • Datasources
      • Other features
        • Markdown
        • Import/Export Knowledge Maps
      • Troubleshooting Tips
    • Testing
      • Manual tests
      • Automated tests
      • External User Acceptance Testing (UAT)
    • Versioning
    • Publishing
      • API Management
      • Setting a live version
      • Publishing an agent
    • Stats and Reporting
    • Managing your data
    • The library
      • How to: update a template
  • 🔍Evidence
    • What is evidence?
    • The Evidence Tree
      • The Salience Chart
  • 👩‍💻Developer guides
    • Overview
    • API Guide
      • API request flow
      • Run example queries
      • Environments
      • Error codes
      • Skipping an answer to a question
      • Retrieving a full Evidence Tree for use with a custom UI or application
      • Building an Evidence Tree URL
    • API interactive documentation
    • SDKs
  • Rainbird Labs
    • Overview
    • Consult
    • Generate from documentation
    • Co-author
    • /interact
    • /explain
Powered by GitBook
On this page
  1. Developer guides
  2. API Guide

Retrieving a full Evidence Tree for use with a custom UI or application

By utilising the evidence endpoint, it is possible to retrieve the full evidence tree behind a decision (a result of a query). The tree can be navigated by making additional requests to the evidence endpoint using factIDs returned in previous responses. Therefore, in order to retrieve the whole tree, you should expect to make a set of recursive requests.

Here is an example:

  1. By using the factID found in the result object of a Rainbird query, an initial request can be made to the evidence endpoint.

  2. The response will contain the information about the fact which the factID represents.

  3. If the source of this fact was a rule, the response object will contain a rule object. Within the rule object, a conditions array will contain information about how each condition was satisfied.

  4. Loop through each condition.

  5. If the condition contains subject, relationship and object properties, it will also contain a factID property. In order to follow this branch of the Evidence Tree, you should now make an additional request to the evidence endpoint using the condition's factID and continue to step 2. If the condition doesn't contain a factID property, you are at the end of this branch.

This endpoint is optionally secured with a key, which can be configured via the Rainbird Studio. This key must then be provided in the x-evidence-key header to access evidence.

Last updated 1 year ago

👩‍💻