This article, first, discusses the decision-making process, typically used by trained engineers to assess failure modes of masonry buildings, and then, presents the rule-based model, required to build a knowledge-based system for post-earthquake damage assessment. The acquisition of the engineering knowledge and implementation of the rule-based model lead to the developments of the knowledge-based system LOG-IDEAH (Logic trees for Identification of Damage due to Earthquakes for Architectural Heritage), a web-based tool, which assesses failure modes of masonry buildings by interpreting both crack pattern and damage severity, recorded on site by visual inspection. Assuming that failure modes detected by trained engineers for a sample of buildings are the correct ones, these are used to validate the predictions made by LOG-IDEAH. Prediction robustness of the proposed system is carried out by computing Precision and Recall measures for failure modes, predicted for a set of buildings selected in the city center of L'Aquila (Italy), damaged by an earthquake in 2009. To provide an independent meaning of verification for LOG-IDEAH, random generations of outputs are created to obtain baselines of failure modes for the same case study. For the baseline output to be compatible and consistent with the observations on site, failure modes are randomly generated with the same probability of occurrence as observed for the building samples inspected in the city center of L'Aquila. The comparison between Precision and Recall measures, calculated on the output, provided by LOG-IDEAH and predicted by random generations, underlines that the proposed knowledge-based system has a high ability to predict failure modes of masonry buildings, and has the potential to support surveyors in post-earthquake assessments.