"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 16:17:04.287828
"""

```python
from typing import List, Dict

class ReasoningEngine:
    """
    A simple reasoning engine designed to solve problems with limited reasoning sophistication.
    This class provides methods for evaluating conditions based on a set of predefined rules and making decisions accordingly.

    Attributes:
        rules: A list of dictionaries representing the rules. Each rule is a dictionary where keys are conditions
               and values are actions to take if the condition is met.

    Methods:
        evaluate_conditions(self, data: Dict[str, any]) -> str:
            Evaluates all the given conditions in the rules against the provided data and returns the action of the first matching rule.
    """

    def __init__(self, rules: List[Dict[str, any]]):
        self.rules = rules

    def evaluate_conditions(self, data: Dict[str, any]) -> str:
        for rule in self.rules:
            for condition, action in rule.items():
                if eval(condition, {}, data):  # Using eval to dynamically check conditions
                    return action
        return "No matching rule found"

# Example usage
rules = [
    {"x > 5": "Value is greater than 5"},
    {"x < 3 and y == 'apple'": "X is less than 3 and Y equals apple"}
]

reasoning_engine = ReasoningEngine(rules)
data1 = {'x': 6, 'y': 'orange'}
print(reasoning_engine.evaluate_conditions(data1))  # Output: Value is greater than 5

data2 = {'x': 2, 'y': 'apple'}
print(reasoning_engine.evaluate_conditions(data2))  # Output: X is less than 3 and Y equals apple
```