Comprehensive guidance for understanding, designing, and implementing expert systems using rule-based inference, knowledge representation, and the complete development lifecycle. Use when users need help with expert system concepts, architecture design, rule-based reasoning (forward/backward chaining), knowledge acquisition, development planning, or implementation strategies.
This skill provides comprehensive knowledge and guidance for working with expert systems - AI programs that emulate human expert decision-making in specific domains. The skill covers theoretical foundations, practical implementation strategies, and the complete development lifecycle for rule-based expert systems.
When to Use This Skill
Use this skill when users need assistance with:
Understanding Expert Systems: Explaining concepts, components, architecture, and types of expert systems
Design and Architecture: Designing knowledge bases, selecting inference strategies, planning system structure
Knowledge Acquisition: Extracting and structuring knowledge from domain experts
Development Planning: Following the expert system development lifecycle from initialization to maintenance
관련 스킬
Implementation Guidance: Choosing tools, representation methods, and development strategies
Troubleshooting: Addressing common challenges like the knowledge acquisition bottleneck or knowledge conflicts
Best Practices: Applying proven patterns for rule design, testing, and validation
Core Expert System Concepts
Components
Every expert system consists of these key components:
Knowledge Base: Repository of domain-specific facts, rules, and heuristics
Inference Engine: Reasoning mechanism that applies rules to derive conclusions
Working Memory: Temporary storage for case-specific facts during problem-solving
User Interface: Bridge for user interaction and query input
Explanation System: Justifies reasoning process and conclusions
Knowledge Acquisition Module: Facility for updating and maintaining knowledge
Inference Strategies
Forward Chaining (Data-Driven):
Start with known facts → apply rules → generate new facts → reach conclusion
Best for: Planning, monitoring, control, situations with rich initial data
Process: Match rules with satisfied conditions → resolve conflicts → fire rule → add consequences to working memory → repeat
Backward Chaining (Goal-Driven):
Start with goal to prove → find supporting rules → recursively prove sub-goals → reach facts
Best for: Diagnosis, queries, theorem proving, specific goal verification
Process: Find rules concluding goal → check conditions → set unsatisfied conditions as sub-goals → recurse
Decision Guide:
Use Forward Chaining When:
✓ Rich initial data available
✓ Need all possible conclusions
✓ Building planning/monitoring systems
✓ Reactive to incoming data
✓ Multiple goals to achieve
Use Backward Chaining When:
✓ Specific goal clearly defined
✓ Single answer needed
✓ Building diagnostic systems
✓ Query-answering application
✓ Minimize unnecessary computation
Knowledge Representation
Production Rules (Most Common)
Format: IF <conditions> THEN <conclusions/actions>
Simple Rule:
IF temperature > 100.4
THEN patient_has_fever = true
Complex Rule:
IF patient_has_fever = true
AND white_blood_cell_count > 11000
AND chest_xray_shows_infiltrate = true
THEN diagnosis = pneumonia (CF: 0.85)
AND recommend_action = "prescribe_antibiotics"
Best Practices:
Keep rules simple (one conclusion per rule when possible)
Avoid contradictions between rules
Use meaningful variable and rule names
Document reasoning behind each rule
Test all paths through rule base
Maintain consistency through regular reviews
Certainty Factors
Handle uncertainty using certainty factors (CF) ranging from -1.0 to +1.0:
+1.0: Definitely true
+0.8: Probably true
+0.5: Moderately supportive
0.0: Unknown
-0.5: Moderately contradictory
-1.0: Definitely false
Combining Evidence:
CF(A AND B) = min(CF(A), CF(B))
CF(A OR B) = max(CF(A), CF(B))
Multiple rules for same conclusion: CF_combined = CF1 + CF2 × (1 - CF1)
Development Lifecycle
Six-Phase Process
Phase I: Project Initialization
Define problem and assess suitability for expert system approach
Conduct feasibility study (technical, economic, operational, legal)
Perform cost-benefit analysis and ROI calculation
Organize development team (project manager, knowledge engineers, domain experts, developers)
Establish project timeline and risk management plan
Detailed overview of expert systems, history, components, architecture
Types of expert systems and their applications
Advantages, disadvantages, and when to use expert systems
Load when: Users need foundational understanding or comprehensive overview
02-rule-based-systems-and-inference.md
Complete coverage of forward and backward chaining algorithms
Rule structure, terminology, and examples
Implementation details and best practices
Comparison matrices and decision guides
Load when: Users need to implement inference mechanisms or understand reasoning strategies
03-expert-system-development-lifecycle.md
Detailed breakdown of all six development phases
Templates, checklists, and process flows for each phase
Project management considerations and success factors
Common pitfalls and how to avoid them
Load when: Users are planning or executing an expert system project
04-knowledge-acquisition-and-representation.md
Comprehensive guide to knowledge elicitation techniques
Knowledge representation methods and their trade-offs
Knowledge validation strategies
Handling challenges in knowledge acquisition
Load when: Users need to extract knowledge from experts or choose representation methods
README.md
Quick reference guide with key concepts and patterns
Summary of all major topics with examples
Decision matrices and common rule patterns
Use cases and application domains
Load when: Users need quick reference or high-level overview
Assets:
reasoning-flow.drawio
Comprehensive flowchart showing both forward and backward chaining processes
Visual representation of inference engine operation
Decision points and state transitions
Use when: Users need visual understanding of inference mechanisms or want to see reasoning flow
Workflow for Common Tasks
Designing an Expert System:
Read 01-expert-systems-overview.md to understand components and architecture
Review 02-rule-based-systems-and-inference.md to select inference strategy
Consult 03-expert-system-development-lifecycle.md Phase I and II for planning
Use assets/reasoning-flow.drawio to visualize system operation
Implementing Inference Engine:
Review 02-rule-based-systems-and-inference.md for algorithm details
Study examples and implementation patterns
Reference assets/reasoning-flow.drawio for process flow
Apply best practices from documentation
Knowledge Acquisition Project:
Read 04-knowledge-acquisition-and-representation.md for techniques
Follow guidance in 03-expert-system-development-lifecycle.md Phase IV
Use recommended interview and observation methods
Apply validation strategies from documentation
Troubleshooting Development Issues:
Consult common challenges sections in reference documents
Review best practices and pitfalls in lifecycle documentation
Apply solutions from similar documented cases
Quick Reference Patterns
Common Rule Patterns:
# Diagnostic Rule
IF symptom_A AND symptom_B AND test_result_C
THEN diagnosis = disease_X (CF: 0.85)
# Classification Rule
IF attribute_1 > threshold_1 AND attribute_2 = value_2
THEN category = class_A
# Procedural Rule
IF condition_met AND step_N_complete
THEN execute_step_N+1 AND mark_step_N+1_complete
# Recommendation Rule
IF situation_A AND constraint_B
THEN recommend_action_X WITH confidence_Y
Forward vs Backward Decision Matrix:
Criterion
Forward Chaining
Backward Chaining
Starting Point
Known facts
Desired goal
Direction
Data → Conclusion
Goal → Supporting facts
Search Strategy
Breadth-first
Depth-first
Best For
Planning, monitoring, control
Diagnosis, queries, verification
Efficiency
Good for multiple conclusions
Good for single specific goal
Memory Usage
Higher (stores intermediate facts)
Lower (focused search)
Response Guidelines
When responding to user queries about expert systems:
Assess Scope: Determine which aspects of expert systems the user needs help with
Load Relevant References: Read appropriate reference documents for detailed information
Provide Context: Explain concepts clearly with examples and visual aids when helpful
Reference Sources: Mention which reference documents contain more detailed information
Use Diagrams: Reference the reasoning flow diagram when explaining inference mechanisms
Apply Best Practices: Incorporate proven patterns and avoid common pitfalls
Be Practical: Provide actionable guidance with concrete examples
Address Challenges: Proactively mention potential issues and solutions
Suggest Next Steps: Guide users on how to proceed with their specific task
Example Use Cases
Medical Diagnosis System:
Use backward chaining (goal: determine diagnosis)
Knowledge sources: Medical experts, clinical guidelines, research papers
Rules with certainty factors for probabilistic reasoning
Explanation system critical for medical decisions
Financial Risk Assessment:
Use forward chaining (rich initial data: credit history, financial records)
Knowledge Quality: Accurate and complete, well-organized, properly validated, regularly updated
Limitations
Be aware of expert system limitations:
Limited to programmed knowledge (cannot apply common sense)
Requires regular maintenance as knowledge evolves
Knowledge acquisition is time-consuming and challenging
Brittleness outside defined problem domain
Computational cost with large rule sets
Explanation limited to programmed rules
Additional Notes
Always validate expert system outputs with domain experts before production use
Consider hybrid approaches combining expert systems with machine learning for complex problems
Document all knowledge sources and maintain version control
Plan for ongoing maintenance and knowledge updates from the start
Consider ethical implications and liability issues, especially in critical domains (medical, financial, safety)
Ensure appropriate use of AI and maintain human oversight for high-stakes decisions
This skill provides comprehensive coverage of expert systems to support users in understanding, designing, implementing, and maintaining rule-based expert systems across various domains.