"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 03:13:06.220540
"""

```python
from typing import List, Optional

class KnowledgeBase:
    def __init__(self):
        self.knowledge = []

    def add_fact(self, fact: str) -> None:
        """Add a new fact to the knowledge base."""
        self.knowledge.append(fact)

    def query(self, question: str) -> Optional[str]:
        """
        Query the knowledge base for an answer.
        
        Args:
            question (str): The question to be answered.

        Returns:
            Optional[str]: The answer if found, otherwise None.
        """
        for fact in self.knowledge:
            if question.lower() in fact.lower():
                return fact
        return None

class ReasoningEngine:
    def __init__(self, knowledge_base: KnowledgeBase):
        self.knowledge_base = knowledge_base

    def solve_problem(self, problem_description: str) -> Optional[str]:
        """
        Solve a given problem by querying the knowledge base.
        
        Args:
            problem_description (str): Description of the problem to be solved.

        Returns:
            Optional[str]: The solution if found, otherwise None.
        """
        # Simple pattern matching on the problem description
        for word in problem_description.split():
            answer = self.knowledge_base.query(word)
            if answer is not None:
                return answer

# Example usage
knowledge_base = KnowledgeBase()
knowledge_base.add_fact("The capital of France is Paris.")
knowledge_base.add_fact("Sodium is a highly reactive metal.")

engine = ReasoningEngine(knowledge_base)

problem_description = "What is the capital of France?"

solution = engine.solve_problem(problem_description)
if solution:
    print(f"The answer is: {solution}")
else:
    print("No solution found in the knowledge base.")
```

This example creates a simple `ReasoningEngine` that uses a basic `KnowledgeBase` to solve problems through pattern matching. The `solve_problem` method searches for relevant facts based on keywords present in the problem description and returns an answer if it finds a match.