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
  • Getting Started
  • Best Practice
  • Important Information
  • Data Security
  • Accuracy
  1. Rainbird Labs

/explain

Last updated 4 months ago

/explain translates causal reasoning chains () into clear, natural language descriptions.

By providing a fact ID from your results, receive a detailed explanation of how the reasoning engine reaches its decision and display these to end-users, embed into reports or store for audit.

All features delivered by Rainbird Labs are beta. They may contain bugs, are subject to change and are not covered by our platform SLAs. Your feedback can help shape development.

Getting Started

/explain is in open beta and details can be accessed from our . From here you download the OpenAPI specification to import into Postman, for example.

  1. From a result from the Core endpoints (/query or /response) or NL endpoints (/interact) you can obtain a FactID

"results": [
        {
            "subject": "Jeff",
            "object": "Repair",
            "certainty": 100,
            "factID": "WA:KF:3d48671baa046851f47d46e9776012692e7a99045c7573a238fafac8db6bea3c",
            "relationship": "can claim"
        }
    ]
  1. Make a request to /explain with the session ID, fact ID and ISO 639 language code (Authentication uses your Rainbird account API key passed in the header as X-API-Key)

{
"language": "en",
"sessionID": "{SESSION_ID}",
"factID": "WA:KF:3d48671baa046851f47d46e9776012692e7a99045c7573a238fafac8db6bea3c"
}
  1. Receive a natural language explanation of the evidence tree

{
    "explanation": "Jeff, the policyholder, is eligible to make a claim for repairs. This decision is based on several key pieces of evidence. Firstly, Jeff holds a Gold policy, which is crucial because this policy provides coverage for repairs. The Gold policy is specifically designed to insure mobile phones, which is the type of equipment involved in this situation.\n\nThe incident in question is water damage, which Jeff has unfortunately experienced. The Gold policy not only covers this type of loss but also considers repair claims as appropriate for such damage. Therefore, since Jeff's mobile phone suffered water damage, and his Gold policy covers this type of incident, he is entitled to claim for the necessary repairs.",
    "metadata": {
        "querySubmittedAt": "2025-01-23T13:22:00.656922848Z",
        "languageEngineResponseTime": 2480,
        "llmTokens": {
            "completionTokens": 134,
            "promptTokens": 686,
            "totalTokens": 820
        },
        "apiVersion": "",
        "endpoint": "explain",
        "sessionID": "{SESSION_ID}"
    }
}

A resultResponse can contain multiple results, each with its own fact ID. If this is the case, you must call the explain endpoint for each result as there will be different reasons for each result.

Best Practice

To optimise the accuracy of /explain, it is advised you review the understandability of the evidence tree, looking specifically at the language used.

Important Information

Data Security

/explain operates using third-party AI services (OpenAI). Please ensure shared information is suitable for external processing.

Any request made to /explain shares the complete chain of reasoning with the LLM to produce the explanation.

Accuracy

Whilst we continue to improve the precision of /explain, some responses may be inaccurate.

Improvements could be made by adjusting relationship names to improve readability, or by using in the graph to provide more context.

the evidence tree
API documentation
evidence text