We evaluated whether a knowledge-based system (KBS) connected to a ventilator in pressure support mode could correctly predict the ability of patients to tolerate total withdrawal from ventilatory support. The KBS was designed to continuously adapt ventilatory assistance to the needs of the patient, to manage a strategy of gradually decreasing ventilatory assistance, and to indicate when the patient was able to breathe without assistance. Thirty-eight patients for whom weaning was being considered were evaluated using a conventional battery of parameters, including weaning criteria, tolerance of a T-piece trial, and outcome 48h after permanent withdrawal of ventilation. The results of this evaluation were compared with the suggestions made by the KBS at the end of a period of KBS-driven mechanical ventilation inserted in the conventional weaning procedure. The positive predictive value of the KBS was 89%, versus 77% for the conventional procedure and 81% for the rapid shallow breathing index alone. The KBS correctly predicted the course of five patients who tolerated a T-piece trial but required ventilation within 48 h. We conclude that our KBS ensured appropriate patient management during the weaning period and improved our ability to predict responses to weaning.