Facts, rules, frames, and inference are easy to memorise as separate definitions. The confusion begins when a question asks what an AI system can actually conclude from the information it stores. The Asha and KR101 example turns observations into formal symbols and then applies two inference steps. GATE CS questions often test the same move: translate observations, match rule antecedents, and state only the licensed conclusion.
Knowledge representation in AI: turn observations into usable knowledge
Knowledge representation is the formal encoding of entities, properties, relations, constraints, and rules so that a machine can answer queries and derive conclusions. Raw data provides values without enough context. The numbers 72 and 80 become knowledge only when their roles are stated, for example Score(Asha,KR101,72) and Attendance(Asha,KR101,80).
Three layers must remain separate. Syntax is the form in which a statement is written, such as Enrolled(Asha,KR101). Semantics is its meaning in the modelled world: Asha is registered for course KR101. Inference is a licensed process that derives a new statement, perhaps Passed(Asha,KR101), from stored knowledge. Enrolment and passing are not synonyms.
The central test is simple. The intended meaning must be clear, and the inference procedure must derive only conclusions supported by the stored knowledge.
Foundations of a knowledge base: vocabulary, facts, relations, rules, and constraints
The running vocabulary contains the constants Asha, KR101, and Logic. Its predicates are Student(x), Enrolled(x,c), Score(x,c,s), Attendance(x,c,a), PrerequisiteComplete(x,p), Passed(x,c), and EligibleForProject(x,c).
The knowledge base begins with exactly five ground facts:
Student(Asha)Enrolled(Asha,KR101)Score(Asha,KR101,72)Attendance(Asha,KR101,80)PrerequisiteComplete(Asha,Logic)
An entity names an object, such as Asha or KR101. A property describes one object, as Student(Asha) does. A relation connects objects or values, as the score fact connects a student, a course, and a number. Ground facts contain no variables and assert specific observations.
The domain also sets conditions: passing requires a score of at least 60; project eligibility requires passing, attendance of at least 75, and completion of Logic. A constraint narrows the valid states of the model. A rule licenses a conclusion when all its antecedents are satisfied.

Requirements of good knowledge representation: adequacy, efficiency, and acquisition
Four classic requirements provide practical tests for a representation:
Requirement | Question it asks | Asha / KR101 test |
|---|---|---|
Representational adequacy | Can it express the domain? | Can it encode scores, attendance, enrolment, prerequisites, and rules? |
Inferential adequacy | Can it derive supported knowledge? | Can it derive |
Inferential efficiency | Can it avoid wasteful search? | Can it skip rules unrelated to KR101 eligibility? |
Acquisitional efficiency | Can knowledge change cleanly? | Can attendance |
A free-text note may express the idea to a person but offer weak machine inference. A highly expressive logic may model the domain precisely yet still need indexing or rule ordering for fast queries.
These are evaluation criteria, not competing languages. A scheme can perform well on one and poorly on another, so the choice is a design trade-off based on the facts, queries, and reasoning required.
Knowledge representation schemes: logic, production rules, semantic networks, and frames
The same knowledge can be organised in several useful ways:
Scheme | Running-example encoding | Strength | Limitation |
|---|---|---|---|
Logic |
| Precise statements and proof | Proof search may be costly |
Production rules |
| Condition-driven reasoning | Many rules can conflict |
Semantic network |
| Visible relations and inheritance | Edge meanings need definitions |
Frame |
| Grouped slots, defaults, and values | Complex relations need extra machinery |
Logic suits precise statements and proofs. Production rules suit condition-driven decisions. Semantic networks expose connections. Frames organise typical objects through slots and defaults. None is universally strongest; the intended queries determine the choice.
Declarative knowledge says what is true, such as Asha's stored score. Procedural knowledge says how to perform a task, such as the sequence for checking eligibility. Readers who want to strengthen the formal layer can continue with Propositional and Predicate Logic: Truth Tables, Quantifiers.
Resolution proofs, inheritance exceptions, and fuller frame examples belong to Knowledge Representation in Artificial Intelligence: Logic, Semantic Networks, Frames and Rules with Worked Examples. The Asha/KR101 model holds one knowledge base constant to compare the four requirements and schemes, then traces project eligibility through two rules.
Knowledge representation worked example: derive the result in two rule firings
Use these two rules exactly:
R1: for all
x,c,s,(Enrolled(x,c) AND Score(x,c,s) AND s >= 60) -> Passed(x,c).R2: for all
x,c,a,(Passed(x,c) AND Attendance(x,c,a) AND a >= 75 AND PrerequisiteComplete(x,Logic)) -> EligibleForProject(x,c).
Rule firing 1: Substitute x=Asha, c=KR101, and s=72 into R1. The knowledge base contains Enrolled(Asha,KR101) and Score(Asha,KR101,72). The numerical condition is 72 >= 60, which is true. All three antecedents are satisfied, so R1 derives Passed(Asha,KR101). The score margin is 72 - 60 = 12 points.
Rule firing 2: Substitute x=Asha, c=KR101, and a=80 into R2. The first antecedent matches the newly derived Passed(Asha,KR101). The base also contains Attendance(Asha,KR101,80) and PrerequisiteComplete(Asha,Logic). The numerical condition is 80 >= 75, which is true. R2 therefore derives EligibleForProject(Asha,KR101). The attendance margin is 80 - 75 = 5 points.
The answer should include its explanation trace: five input facts, R1 producing Passed, then R2 producing EligibleForProject. Student(Asha) belongs to the stored input even though neither rule needs it. Each firing uses only the antecedents written in that rule. Skipping straight from the raw values to eligibility would hide the intermediate fact and the exact rule that justified each conclusion.

What the knowledge base cannot infer: missing facts, converses, assumptions, and inconsistency
Sound reasoning also requires knowing what the representation does not justify.
With no stored score for
Ravi, the score is unknown. It is not automaticallyScore(Ravi,KR101,0).R1 derives
Passedfrom its antecedents. It does not license the converse claim that every storedPassedfact proves that a score of at least60is also stored.If Asha's attendance fact is changed from
80to74, then74 >= 75is false. R2 cannot fire. Failure to derive eligibility is not an explicitNotEligiblefact.If the base contains both
PrerequisiteComplete(Asha,Logic)andNOT PrerequisiteComplete(Asha,Logic), it is inconsistent. A reasoner should detect or manage the conflict rather than silently select the convenient assertion.
The Ravi example exposes an important convention. Under the open-world assumption, an absent fact leaves the claim undecided because more information may exist. Under an explicitly stated closed-world convention, an absent database fact may be treated as false. Neither behaviour should be smuggled into the reasoning. The system must name which convention it uses.
How questions test knowledge representation foundations
Concept questions can ask you to match a scheme to its strength, identify one of the four requirements, translate a sentence into a fact or rule, follow one or two rule firings, or decide whether a conclusion is licensed.
Use this five-step checklist:
Identify the entities, values, and predicates.
Separate stored facts from rules.
Substitute the given constants and values.
Evaluate every condition, including
72 >= 60and80 >= 75.State only the conclusion produced by the rule. Write “unknown” when neither a claim nor its negation can be derived.
Four traps need correction. Syntax is the written form, while semantics is its meaning. An implication cannot be reversed without another rule. Missing information is not automatically false. Compare schemes against the query, not by slogans.
Finally, read the response format carefully. MCQ, MSQ or NAT? GATE Question Types Explained shows why a prompt may expect one choice, several choices, or a computed value.
Knowledge representation in AI: the short version and next step
Choose a vocabulary, encode facts and relations, add explicit rules or constraints, run a sound inference procedure, and return both the conclusion and its supporting trace. Here, 72 clears 60, 80 clears 75, Logic is complete, and two rule firings derive project eligibility.
For a self-test, replace attendance 80 with 74, redraw the inference graph, and explain exactly why R2 stops. For wider preparation, GATE Guidance by Sanchit Sir provides a structured next step across GATE CS topics.




