Ontology is a formal representation of knowledge, defining concepts and their relationships within a specific domain.