suggest_rule
Propose SPARQL inference rules to formalize reasoning patterns. Converts approved logical deductions into formal, verifiable knowledge graph guarantees.
Instructions
IMPORTANT: USER APPROVAL REQUIRED / APPROBATION REQUISE Allows the LLM to propose SPARQL rules to formalize reasoning patterns.
CRITICAL WORKFLOW:
EXPLAIN & ASK: You MUST explain the rule and ask for explicit permission FIRST.
En Français: "Puis-je ajouter cette règle d'inférence ?"
In English: "May I add this inference rule?"
WAIT: Do NOT call
suggest_ruleuntil the user says YES.SUGGEST: Only after approval, call this tool.
CONFIRM: The user must then approve the pending rule using
approve_rule(which you CANNOT call yourself).
WHEN TO USE: ✓ After verify_inference() returns 'not proven' for logical deduction ✓ When user explicitly states a rule (e.g., 'friends know each other') ✓ When detecting recurring patterns in conversation ✓ To convert YOUR soft reasoning into FORMAL guarantees
WORKFLOW EXAMPLE:
You: 'Voting implies age >= 18. Shall I formalize this?'
User: 'Yes'
YOU CALL: suggest_rule(...)
System: Previews inferences, adds to pending approval
STOP: You wait for user to review.
CRITICAL - DO NOT BYPASS THIS TOOL: ❌ NEVER edit .rq files directly ❌ NEVER create rules outside this workflow ✓ ALWAYS use suggest_rule() → user approves → system activates
Best Practices:
Use descriptive rule_id (snake_case)
SPARQL must be CONSTRUCT query
Set confidence < 1.0 for uncertain rules
Preview shows what WOULD be inferred
Rule goes to PENDING - User must approve!
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_id | Yes | Unique identifier for this rule (e.g., 'acquaintance_from_knows') | |
| confidence | No | Confidence level (0.0-1.0) for facts inferred by this rule (default: 0.8) | |
| description | Yes | Human-readable description of what the rule does | |
| sparql_pattern | Yes | SPARQL CONSTRUCT query defining the inference rule |