Artificial intelligence is the broader field that encompasses the creation of intelligent systems capable of human-like tasks, while knowledge engineering is a specific discipline within AI that involves structuring and encoding human knowledge and expertise for use by AI systems. Knowledge engineering plays a crucial role in enabling AI systems to reason and make informed decisions based on accumulated knowledge.