Knowledge engineering is the discipline of designing, building, and maintaining knowledge-based AI systems. It includes acquiring domain knowledge, representing it formally, constructing rules or ontologies, and ensuring that the system can reason over that knowledge effectively.