Automated Reasoning
Last updated
Last updated
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.
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.
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.
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.
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.
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.
The History section logs all past queries and their corresponding reasoning validation results, offering an organized way to review and analyze previous interactions.