In: Proceedings of the Eleventh International Conference on Artificial Intelligence: Methodology, Systems, Applications (AIMSA-04), Springer-Verlag LNAI Series. c 2004 We present a new model and a partial solution to the problem of semantic routing in peer-to-peer networks. When a peer receives a query, an attempt to solve the query by using both linguistic and contextual knowledge is made. In our proposal, each peer analyzes the result of its queries and increases the trust of those peers who reply with more appropriate semantic contents. In this respect, our approach is adaptive. As queries are resolved, the routing strategy of each peer becomes more and more trust-based, namely, based on the semantics of contents rather than on a mere syntactic matching of keywords. This leads to the emergence of communities of peers semantically related, which in turn corresponds to a peer-to-peer network clustered by contents, capable to resolve queries with a reduced number of hops.