Intelligent agents must update their knowledge base as they acquire new information about their environment. The modal logic S5n has been designed for representing knowledge bases in societies of agents. Halpern and Vardi have proposed the notion of re nement of S5n Kripke models in order to solve multi-agent problems in which knowledge evolves. We argue that there are some problems with their proposal and attempt to solve them by moving from Kripke models to their corresponding trees. We de ne re nement of a tree with a formula, show some properties of the notion, and illustrate with the muddy children puzzle. We show how some diagnosis problems in engineering can be modelled as knowledge-based multi-agent systems, and hence how our approach can address them.