This document presents a novel algorithm for inferring user search goals by analyzing feedback sessions from search engine query logs. It introduces a framework for clustering these sessions into pseudo-documents to better represent user information needs, along with a new evaluation criterion called 'classified average precision' (cap). Experimental results demonstrate the algorithm's effectiveness in improving search engine relevance and user experience.