verify_inference
Verify if a fact is formally proven in the knowledge graph before stating it as true. Returns proof chain or suggests adding the fact explicitly.
Instructions
Verify if a fact is FORMALLY PROVEN in the knowledge graph. This is THE KEY TOOL for collaborative LLM-Formal reasoning.
WHEN TO USE (CRITICAL): ✓ BEFORE stating a deduction as fact ✓ When user asks 'Is X true?' or 'Does Y hold?' ✓ After making a soft reasoning step ✓ To distinguish your intuition from formal proof
WORKFLOW:
User asks: 'Is Alice my friend?'
You check: query_memory('ASK { :User foaf:knows :Alice }')
Result: True (they know each other)
Your soft reasoning: 'knows → maybe friends?'
YOU MUST CALL: verify_inference(':User', ':isFriendOf', ':Alice')
Result: 'Not proven'
You respond: 'You know Alice, but friendship isn't formally established.'
If user confirms: Call suggest_rule() to formalize
Returns:
If proven: Source (user/rule), confidence, explanation, rule name
If not proven: Suggestion to either add explicitly or create rule
Example: verify_inference(subject=':Alice', predicate='foaf:knows', object=':User') → Returns proof chain if fact is formally established
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action for pending verification: 'accept' or 'reject' (optional) | |
| object | No | Object of the triple (e.g., ':AcmeCorp', ':Bob') | |
| triple | No | Full triple string as seen in pending verifications list (optional fallback) | |
| subject | No | Subject of the triple (e.g., ':Alice', ':User') | |
| predicate | No | Predicate/property (e.g., 'foaf:knows', 'schema:worksFor') |