Open In App

Knowledge based agents in AI

Improve
Improve
Like Article
Like
Save
Share
Report

Humans claim that how intelligence is achieved- not by purely reflect mechanisms but by process of reasoning that operate on internal representation of knowledge. In AI these techniques for intelligence are present in Knowledge Based Agents.

Knowledge-Based System

  • A knowledge-based system is a system that uses artificial intelligence techniques to store and reason with knowledge. The knowledge is typically represented in the form of rules or facts, which can be used to draw conclusions or make decisions.
  • One of the key benefits of a knowledge-based system is that it can help to automate decision-making processes. For example, a knowledge-based system could be used to diagnose a medical condition, by reasoning over a set of rules that describe the symptoms and possible causes of the condition.
  • Another benefit of knowledge-based systems is that they can be used to explain their decisions to humans. This can be useful, for example, in a customer service setting, where a knowledge-based system can help a human agent understand why a particular decision was made.
  • Knowledge-based systems are a type of artificial intelligence and have been used in a variety of applications including medical diagnosis, expert systems, and decision support systems.

Knowledge-Based System in Artificial Intelligence

  • An intelligent agent needs knowledge about the real world to make decisions and reasoning to act efficiently.
  • Knowledge-based agents are those agents who have the capability of maintaining an internal state of knowledge, reason over that knowledge, update their knowledge after observations and take action. These agents can represent the world with some formal representation and act intelligently.

Why use a knowledge base?

  • A knowledge base inference is required for updating knowledge for an agent to learn with experiences and take action as per the knowledge.
  • Inference means deriving new sentences from old. The inference-based system allows us to add a new sentence to the knowledge base. A sentence is a proposition about the world. The inference system applies logical rules to the KB to deduce new information.
  • The inference system generates new facts so that an agent can update the KB. An inference system works mainly in two rules which are given:
    • Forward chaining
    • Backward chaining

Various levels of knowledge-based agents

A knowledge-based agent can be viewed at different levels which are given below:

1. Knowledge level

Knowledge level is the first level of knowledge-based agent, and in this level, we need to specify what the agent knows, and what the agent goals are. With these specifications, we can fix its behavior. For example, suppose an automated taxi agent needs to go from a station A to station B, and he knows the way from A to B, so this comes at the knowledge level.

2. Logical level

At this level, we understand that how the knowledge representation of knowledge is stored. At this level, sentences are encoded into different logics. At the logical level, an encoding of knowledge into logical sentences occurs. At the logical level we can expect to the automated taxi agent to reach to the destination B.

3. Implementation level

This is the physical representation of logic and knowledge. At the implementation level agent perform actions as per logical and knowledge level. At this level, an automated taxi agent actually implement his knowledge and logic so that he can reach to the destination.

Knowledge-based agents have explicit representation of knowledge that can be reasoned. They maintain internal state of knowledge, reason over it, update it  and perform actions accordingly. These agents act intelligently according to requirements.

Knowledge based agents give the current situation in the form of sentences. They have complete knowledge of current situation of mini-world and its surroundings. These agents manipulate knowledge to infer new things at “Knowledge level”.

knowledge-based system has following features

Knowledge base (KB): It is the key component of a knowledge-based agent. These deal with real facts of world. It is a mixture of sentences which are explained in knowledge representation language.

Inference Engine(IE): It is knowledge-based system engine used to infer new knowledge in the system.

Actions performed by an agent

Inference System is used when we want to update some information (sentences) in Knowledge-Based System  and to know the already present information. This mechanism is done by TELL and ASK operations. They include inference i.e. producing new sentences from old. Inference must accept needs when one asks a question to KB and answer should follow from what has been Told to KB. Agent also has a KB, which initially has some background Knowledge. Whenever, agent program is called, it performs some actions.

Actions done by KB Agent:

  1. It TELLS  what it recognized from the environment and what it needs to know to the knowledge base.
  2. It ASKS what actions to do? and gets answers from the knowledge base.
  3. It TELLS the  which action is selected , then agent will execute that action.

Algorithm :

function KB_AGENT (percept) returns an action

KB : knowledge base

t : time ( counter initially 0)

TELL(KB, MAKE_PERCEPT_SENTENCE (percept,t) )

action = ASK(KB, MAKE_ACTION_QUERY (t) )

TELL(KB, MAKE_ACTION_SENTENCE (action,t) )

t = t + 1

return action

If a percept is given, agent adds it to  KB, then it will ask KB for the best action and then tells KB that it has in fact taken that action.

Knowledge Based Agents

A Knowledge based system behavior can be designed in following approaches:-

Declarative Approach: In this  beginning from an empty knowledge base, the agent can TELL sentences one after another till the agent has knowledge of how to work with its environment. This is known as the declarative approach. It stores required information in empty knowledge-based system.

Procedural Approach: This converts required behaviors directly into program code in empty knowledge-based system. It is a contrast approach when compared to Declarative approach. In this by coding behavior of system is designed .


Last Updated : 21 Sep, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads