ZBrain Documentation
  • ZBrain Documentation
    • Components of ZBrain
    • Getting started with ZBrain
    • 📚Knowledge base
      • How to create a knowledge base?
      • Knowledge source
      • Information schema
      • File summary
      • Automated reasoning
      • Retrieval testing
      • Knowledge base settings
    • 📱APP
      • How to create a new app?
      • How to set up and customize your app?
      • How to access the app reporting dashboard?
    • 🤖ZBrain AI agents
      • Get started with agents on ZBrain
      • Deploying pre-built agents
      • Creating custom AI agents
        • Agent setup
        • Define input sources
        • Define Flow
          • Key elements of a Flow
          • Flow Components
            • Activepieces Platform
            • AITable
            • Airtable
            • Amazon S3
            • Amazon SNS
            • Amazon SQS
            • Amazon Textract
            • Apify
            • Apollo
            • Approval
            • Asana
            • Azure Communication Services
            • Azure Cosmos DB
            • Azure Document Intelligence
            • Azure OpenAI
            • Azure Translation
            • Bannerbear
            • Baserow
            • Beamer
            • Bedrock Claude
            • Bettermode
            • Binance
            • Bing Search
            • Blackbaud
            • Bonjoro
            • Box
            • Brevo
            • Brilliant Directories
            • Bubble
            • CSV
            • Calendly
            • Certopus
            • Clearout
            • Clockodo
            • Code
            • Confluence
            • Connections
            • Constant Contact
            • Contiguity
            • Contentful
            • Customer.io
            • Crypto
            • Databricks
            • Data Mapper
            • Date Helper
            • DeepL
            • Delay
            • Discord
            • Discourse
            • Drip
            • Dropbox
            • Dust
            • Facebook Pages
            • Figma
            • Files Helper
            • Flowise
            • Flowlu
            • Formbricks
            • Frame
            • Freshdesk
            • Freshsales
            • GCloud Pub/Sub
            • GenerateBanners
            • GhostCMS
            • GitHub
            • GitLab
            • Gmail
            • Google Calendar
            • Google Contacts
            • Google Docs
            • Google Drive
            • Google Forms
            • Google Gemini
            • Google My Business
            • Google Search
            • Google Search Console
            • Google Sheets
            • Google Tasks
            • Groq
            • Hacker News
            • Heartbeat
            • HubSpot
            • HTTP
            • Image Helper
            • Inputs
            • Instagram for Business
            • Intercom
            • Invoice Ninja
            • Jira Cloud
            • Jotform
            • Kimai
            • Kizeo Forms
            • LeadConnector
            • Line Bot
            • Linear
            • LinkedIn
            • LinkedIn Actions
            • LLMRails
            • Lusha
            • MailerLite
            • Mailchimp
            • Mautic
            • Microsoft Dynamics 365 Business Central
            • Microsoft Dynamics CRM
            • Microsoft Excel 365
            • Microsoft OneDrive
            • Microsoft Outlook Calendar
            • Microsoft Teams
            • Mixpanel
            • MongoDB
            • Notion
            • Odoo
            • OpenAI
            • OpenRouter
            • Pastebin
            • PDF
            • Postgres
            • PostHog
            • Pushover
            • Qdrant
            • Queue
            • Razorpay
            • Router
            • Salesforce
            • SendGrid
            • ServiceNow
            • SFTP
            • SharePoint
            • Slack
            • SMTP
            • Snowflake
            • SOAP
            • Spotify
            • Stability AI
            • Stable Diffusion Web UI
            • Storage
            • Stripe
            • SurrealDB
            • SurveyMonkey
            • Taskade
            • Telegram Bot
            • Text Helper
            • Trello
            • Twilio
            • Twitter
            • Utilities
            • WhatsApp Business
            • WordPress
            • XML
            • YouTube
            • ZBrain
            • Zendesk
            • ZeroBounce
            • Zoho Books
            • Zoho CRM
            • Zoho Invoice
            • Zoom
          • How to Define a Flow?
          • How to Test Each Step in the Flow?
        • Configure Additional Settings
        • Test and Deploy Agents
        • How to access, monitor, and manage agent performance and tasks?
    • Settings
    • 📖API Tutorials
      • 📚Knowledge base
        • Automated Reasoning
      • 📱APP
      • 🤖Agents
Powered by GitBook
On this page
  • 1. Creating policies
  • 2. Understanding variables
  • 3. Understanding rules
  • 4. Playground
  • 5. Update policy
  • 6. History
  1. ZBrain Documentation
  2. Knowledge base

Automated reasoning

PreviousFile summaryNextRetrieval testing

Last updated 1 month ago

The Automated Reasoning feature enables the system to analyze and process the knowledge base you upload, automatically extracting relevant rules and variables to reason through queries. This helps generate precise, consistent answers by leveraging predefined rules, conditions, and structured data. The feature ensures decision-making is informed by the rules and variables embedded in the knowledge base, enhancing the model's ability to provide contextual, data-driven responses. Here's an overview of how the feature works and how to use it effectively.

1. Creating policies

To begin the automated reasoning process, you need to create a policy. A policy helps define how queries will be processed using the reasoning model and logic extracted from the knowledge base.

Steps to create a policy:

  • Click on the ‘Create Policy’ button – This will open the policy creation interface.

  • Select the reasoning model—Choose the model that best suits your query processing needs. The model will define how the system uses extracted rules and variables.

  • Enter the reasoning prompt – Provide a prompt that guides the model’s reasoning approach. The prompt can specify the type of questions, data, or conditions that should be evaluated.

  • Click ‘Create’ – After entering the necessary information, click the ‘Create’ button to initiate the policy and trigger the extraction of relevant rules and variables from the knowledge base.

Once the policy is created, the system will begin extracting variables and rules from the uploaded documents.

2. Understanding variables

A variable in the context of automated reasoning refers to a data element or attribute from the knowledge base that the system uses to answer queries. Each variable is associated with an identifier, a data type, and a description. These variables are fundamental for reasoning because they provide the system with specific data points to process and evaluate queries.

The system automatically extracts:

  • ID: A unique identifier assigned to each variable.

  • Variable name: The name assigned to the variable.

  • Type: The data type of the variable. Common types include:

    • STR (String): Text-based data.

    • INT (Integer): Numerical data.

    • FLOAT: Decimal numbers.

    • BOO (Boolean): True/false values.

    • ARR (Array): Lists or collections of data.

  • Definition: Whether the variable’s definition is auto-generated (Auto) or customized by the user (Custom).

  • Description: A detailed description explaining what the variable represents in the context of the knowledge base.

Adding custom variables

Sometimes, you may need to introduce new variables to the system that are not automatically extracted. This is where custom variables come in.

Steps to add custom variables:

  • Click on the ‘+Add’ button – This will open a form where you can define a new variable.

  • Enter the variable name – Choose a meaningful name for the variable.

  • Select the variable type – Choose the appropriate data type for the variable (e.g., STR, INT, FLOAT, ARR, etc.).

  • Provide a description – Add a description explaining the purpose and usage of the variable.

  • Click on the ‘Update’ button – This will define the variable as Custom and add it to the list of extracted variables.

Editing or deleting variables

ZBrain also allows for flexibility in modifying or removing variables.

To edit a variable:

  • Click on the pencil icon next to the variable.

  • Make changes to the variable’s name, type, or description.

  • Click the ‘+Update’ button to save the changes.

To delete a variable:

  • Click on the trash icon next to the variable you wish to remove.

  • Confirm the deletion to permanently remove the variable.

3. Understanding rules

Rules are predefined conditions or logic that are pulled from the knowledge base to govern decision-making processes. These rules allow the system to interpret data, variables, and queries in a structured way. Rules are essential for guiding the reasoning process and ensuring the model provides contextually accurate answers.

Types of rules:

  • Predefined conditions: These rules specify conditions that must be met for a decision to be made.

  • Logic statements: Rules that define the relationships between variables, guiding how the system should reason based on data.

  • Definite statements: Rules that unequivocally dictate the actions or conclusions to be made based on variable values.

Adding custom rules

To further customize the reasoning process, you can add new rules.

Steps to add custom rules:

  • Click on the ‘+Add’ button – This will open a form for adding a new rule.

  • Enter a valid condition/rule – Define a logical rule or condition that you want the system to apply when reasoning through a query.

  • Click the ‘Update’ button – This will define the rule as Custom and add it to the list of extracted rules.

Editing or deleting rules

Like variables, rules can be modified or removed to adjust the system's behavior.

To edit a rule

  • Click on the pencil icon next to the rule you want to modify.

  • Make your changes to the rule.

  • Click the ‘+Update’ button to save the changes.

To delete a rule:

  • Click on the trash icon next to the rule you want to remove.

  • Confirm the deletion to permanently remove the rule.

4. Playground

The Playground provides an interactive environment where you can experiment with and test the rules and variables within your knowledge base. It allows you to simulate how changes to variables and rules will influence the system’s behavior before applying them in a live scenario.

Testing queries

To validate the model’s reasoning process and ensure that the system is reasoning correctly, you can execute specific test queries based on the knowledge base. This allows you to assess whether the system applies the predefined rules and variables accurately, ensuring that the reasoning logic generates reliable and consistent responses. By testing different scenarios, you can confirm that the system processes queries as expected and make adjustments if needed.

  • Enter a test query – Type in a question related to the knowledge base.

  • Click on the ‘Test’ button – The system will process the query using the reasoning model and return a response based on the defined rules and variables.

Findings

Once the test query has been processed, the Findings section displays the results of the reasoning process:

  • Model response: The answer generated by the system based on the query and the applied reasoning.

  • Applied rules: A list of the relevant rules, conditions, and logic that were applied to answer the query. This section also shows the count of rules used.

  • Extracted variables: A list of the variables extracted from the knowledge base, showing their IDs, types, and descriptions and their relevance to the query. The count of variables used in the reasoning is also displayed.

5. Update policy

If any changes to the policy, rules, or variables are required, you can easily update the policy by clicking the ‘Update Policy’ button. This will refresh the reasoning logic to reflect any modifications.

6. History

The History section logs all past queries and their corresponding reasoning validation results, offering an organized way to review and analyze previous interactions.

📚