Existing Geographic Information Systems (GIS) are intended for expert users and consequently, do not provide any machine intelligence to assist users. This paper presents a Bayesian framework that will incorporate expert knowledge in order to retrieve all relevant datasets given an initial user query. The framework uses a spatial model that combines relational, non-spatial and spatial data. This spatial model allows efficient access of relational linkages for a Bayesian network, and thus improves support for complex and vague queries. The Bayesian network assigns causal probabilities to these relational linkages in order to define expert knowledge of related datasets in the GIS. In addition, the framework will learn which datasets are best suited for particular query input through feedback supplied by the user. This contribution will increase the performance and efficiency of knowledge extraction from GIS by allowing users to focus on interpreting data, instead of focusing on finding which data is relevant to their analysis. The initial user query can be vague and the framework will still be capable of retrieving relevant datasets via the linkages discovered in the Bayesian network.