ConstraintChecker for LLM Commonsense Reasoning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Models (LLMs) struggle with symbolic reasoning tasks, particularly in Commonsense Knowledge Bases (CSKB) reasoning, due to their lack of explicit relational constraint handling, leading to incorrect predictions.

Innovation Solution

A dual-module constraint-based prompt engineering system, named ConstraintChecker, is introduced. This system generates relational constraints and questions to check their satisfaction, which are then used to improve the predictions of LLMs through logical conjunction with main-task predictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If LLMs are used for CSKB reasoning tasks, then language understanding capability is improved, but symbolic reasoning ability deteriorates

Engineering Contradiction:
Improvelanguage understanding capabilityVSAvoidsymbolic reasoning ability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system segments the reasoning task into two independent modules: a neural LLM module for language understanding and a symbolic constraint-checking module for rule-based validation. Each module handles its specialized function separately, with the LLM generating initial predictions and the symbolic module verifying them against explicit constraints, thereby resolving the contradiction between language understanding and symbolic reasoning capabilities

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a constraint-checking module as an intermediary between the LLM and the final prediction output. This intermediary validates the LLM's predictions against explicit symbolic constraints from the CSKB, acting as a bridge that combines the strengths of both neural language understanding and symbolic reasoning without requiring the LLM to directly handle symbolic constraints

Inventive Principle:
Principle #24Intermediary (Mediator)

2Device complexity

If vanilla LLMs are used for CSKB reasoning, then model simplicity is maintained, but prediction accuracy deteriorates

Engineering Contradiction:
Improvemodel simplicityVSAvoidprediction accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The system performs preliminary constraint extraction and validation setup before the actual reasoning task. By pre-defining the constraint-checking rules and structure in advance, the system prepares the symbolic reasoning framework beforehand, allowing the LLM to focus on language understanding while the pre-configured constraint module ensures accurate validation, thereby improving prediction accuracy without significantly increasing operational complexity

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If task-agnostic prompting techniques are used, then general applicability is improved, but constraint induction capability deteriorates

Engineering Contradiction:
Improvegeneral applicabilityVSAvoidconstraint induction capability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The constraint-checking module is designed with universal applicability to work with any LLM and any CSKB task while maintaining specialized constraint induction capability. The module uses a standardized interface and constraint representation that can be applied across different tasks, yet it specifically targets and validates explicit symbolic constraints, thereby achieving both general applicability and reliable constraint induction

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20250117672A1Constraint-based prompting for language models to reason on commonsense knowledge bases
Publication Date: 2025.04.10 THE HONG KONG UNIV OF SCI & TECH
  • US20250117672A1 patent drawing
  • US20250117672A1 patent drawing
  • US20250117672A1 patent drawing

AI summary

Provided herein is a method of improved commonsense knowledge bases reasoning through constraint-based prompting. A novel dual-module constraint-based prompt engineering system named ConstraintChecker is involved, which employs a first rule-based module to produce a list of constraints and a second zero-shot learning module to check whether the knowledge instance satisfies all constraints. The acquired constraint-checking result is then aggregated with the output of the main prompting backbone to produce the final output. This present method is more effective in commonsense knowledge bases reasoning then that by employing the prompting backbone alone, and also significantly reduces computational costs.