Major accidents can happen during radiotherapy, with an extremely severe consequence to both patients and clinical professionals. We propose to use machine learning and data mining techniques to help detect large human errors in a radiotherapy treatment plan, as a complement to human inspection. One such technique is computer clustering. The basic idea of using clustering algorithms for outlier detection is to first cluster (based on the treatment parameters) a large number of patient treatment plans. Then, when checking a new treatment plan, the parameters of the plan will be tested to see whether or not they belong to the established clusters. If not, they will be considered as 'outliers' and therefore highlighted to catch the attention of the human chart checkers. As a preliminary study, we applied the K-means clustering algorithm to a simple patient model, i.e., 'four-field' box prostate treatment. One thousand plans were used to build the clusters while another 650 plans were used to test the proposed method. It was found that there are eight distinct clusters. At the error levels of ±100% of the original values of the monitor unit, the detection rate is about 100%. At ±50% error level, the detection rate is about 80%. The false positive rate is about 10%. When purposely changing the beam energy to a value different from that in the treatment plan, the detection rate is 100% for posterior, right-lateral and left-lateral fields, and about 77% for the anterior field. This preliminary work has shown promise for developing the proposed automatic outlier detection software, although more efforts will still be required.