AI Glossary / Graphs and symbolic AI / Intermediate
Consistency
Definition
Consistency means satisfying the compatibility requirements of a specified formal setting. In classical knowledge representation, a set of statements is semantically consistent when at least one interpretation makes all of them true together. Constraint satisfaction and heuristic search use related but distinct technical definitions, so an AI explanation should always identify what is being called consistent and under which rules.
What it means
For a classical knowledge base, consistency concerns whether its assertions can coexist in a model. A contradiction can be explicit, such as P and NOT P, or follow indirectly through several rules.
Consistency is different from truth about the real world. A collection of mutually compatible statements can still be factually wrong. It is also different from completeness: a consistent knowledge base may leave many questions unanswered.
In a constraint-satisfaction problem, a partial assignment is consistent if it violates none of the relevant constraints already determined by its assigned variables. Stronger notions such as arc consistency impose particular support requirements on domains. Neither phrase should be silently substituted for global existence of a complete solution.
How it works
To check a finite propositional knowledge base semantically, look for a truth assignment satisfying every statement. A satisfying assignment witnesses consistency. If no assignment exists, the statements are jointly unsatisfiable.
Inference systems can also expose contradictions through derivation. The relationship between this proof-based view and the semantic view depends on the logic and the soundness and completeness of the proof system being used.
For constraints, specify the level of consistency being tested. Checking already assigned values, establishing arc consistency, and finding a full solution are different tasks with different guarantees.
In heuristic search, consistency instead requires each heuristic estimate h(n) to be no greater than the cost of moving to a successor plus that successor's estimate. Written formally, h(n) ≤ c(n, n') + h(n'). With the usual goal-value convention, this supports important properties of A* search. It is not a claim about a knowledge base having no contradictions.
Three practical examples
1. A rule-base reviewer checks whether a declared status and the rules governing that status can all hold together.
2. A scheduling solver tests a partial assignment for violated constraints while recognizing that an apparently compatible partial schedule may still have no full extension.
3. A search engineer checks heuristic values against step costs to determine whether the heuristic meets the search-specific consistency condition.
Think of it this way
Think of logical consistency as asking whether a single coherent scenario can satisfy all the statements on a set of cards. If one scenario works, the cards are compatible, even if that scenario is not what actually happened.
The analogy has limits. Formal logic gives precise meanings to the statements and their connections. Ordinary language may hide ambiguity, changing time references, or different definitions that must be clarified before the compatibility test makes sense.
Worked example
Let R mean a record is ready and V mean it has been reviewed. Start with two assertions: R implies V, and R.
The assignment R = true and V = true satisfies both, so this knowledge base is consistent. It also entails V, because every satisfying assignment must make V true.
Now add NOT V. If R remains true, the implication requires V to be true, but NOT V requires it to be false. No assignment satisfies all three assertions. The contradiction is present even though the original list did not explicitly contain V as a separate fact.
Removing the assertion R is one possible formal repair: R = false and V = false then satisfies the implication and NOT V. Removing NOT V is another. Logic alone does not tell us which assertion is factually mistaken or which repair is appropriate.
The example distinguishes three questions: can the statements hold together, what follows from them, and which statements should be trusted? Consistency answers only the first.
Illustrative case study
Fictional case: Hemlock Records combines a rule that ready records are reviewed with one source asserting readiness and another asserting that review is absent. A reviewer initially searches only for identical positive and negative entries and misses the indirect contradiction.
The team checks the consequences of the readiness rule and identifies the incompatible set. It records the disagreement for investigation rather than deleting a statement merely because doing so restores satisfiability.
This case illustrates formal diagnosis and the limits of automatic repair. It does not claim that either source is correct or that logical consistency guarantees data quality.
Common misconceptions and mistakes
Do not equate consistent with accurate, complete, or useful. Those are separate properties.
Do not assume the absence of a visibly contradictory pair proves consistency. Rules may derive an incompatible conclusion indirectly.
Do not infer global solvability from a weak local consistency check. For example, pairwise support can exist even when a set of constraints cannot all be satisfied together. Finally, avoid moving guarantees between different senses of the word: heuristic consistency, logical consistency, and statistical consistency are not interchangeable.
Business use
For business teams, consistency checks help expose incompatible requirements, merged records, or rule updates before they affect downstream reasoning. The value lies in finding a precise conflict that can be reviewed against the intended meaning and authoritative evidence.
When a check reports success, state its scope. Passing a local constraint check or finding one model establishes a particular formal property, not blanket correctness. When a conflict appears, preserve enough explanation to support a justified correction rather than automatically favoring whichever fact arrived last.
People also ask
Can a consistent knowledge base contain false real-world claims?
Yes. Its statements can fit together logically while describing the world incorrectly.
Must a contradiction appear as P and NOT P in the input?
No. Rules can imply one side, making the conflict indirect.
Does a consistent partial assignment guarantee a full solution?
Not generally. It may violate no currently determined constraint yet leave an impossible continuation.
Check your understanding
R implies V and R are accepted. A new assertion says NOT V. Is checking only for an explicit V entry sufficient to detect the problem?
Answer: No. V follows from the first two assertions, so adding NOT V makes the set inconsistent even without an explicit V fact.
Related terms
- Satisfiability
- Contradiction
- Entailment
- Knowledge base
- Constraint satisfaction
- arc consistency
- consistent heuristic
- admissibility
Learn next
Construct truth assignments for small rule sets, then compare satisfiability with entailment. Study local consistency in constraint networks separately, and examine the heuristic inequality only within its search context to avoid mixing definitions.
More in Graphs and symbolic AI
- Conjunct ordering - Conjunct ordering is the choice of the sequence in which a reasoning or query system evaluates conditions joined by logical AND.
- Conjunction - Conjunction is the logical operation AND. A conjunction is true exactly when every component statement, called a conjunct, is true.
- Conservative approximation - A conservative approximation simplifies a representation while preserving a direction of correctness.
- Constraint graph - A constraint graph represents the structure of a binary constraint-satisfaction problem.
- Constraint hypergraph - A constraint hypergraph represents a constraint-satisfaction problem whose constraints may involve more than two variables.
- Constraint learning - Constraint learning records new restrictions derived from failures encountered while solving a constraint problem.
Sources
Russell and Norvig, author-hosted Logical Agents slides: https://aima.cs.berkeley.edu/slides-pdf/chapter07.pdf ; CSP chapter: https://aima.cs.berkeley.edu/2nd-ed/newchap05.pdf ; heuristic-search slides: https://aima.cs.berkeley.edu/slides-pdf/chapter04a.pdf . Relevant primary material was consulted. The entry distinguishes formal senses; its record example and fictional case are original.
Previous: Conservative vector field Next: Consistency regularization