An influential body of work in recent cognitive science makes use of structured Bayesian models to understand diverse cognitive activities in which uncertainty plays a critical role, such as reasoning, vision, learning, social cognition, and syntactic processing. Similar problems arise in semantics and pragmatics, where ambiguity, vagueness, and context-sensitivity are commonplace, and rich pragmatic interpretation are massively underdetermined by the linguistic signal. In recent work Noah Goodman and I have developed a framework combining structured Bayesian models with compositional model-theoretic semantics, incorporating insights from Gricean and game-theoretic pragmatics. We have argued that this gives new insight into how and why context and background knowledge influence interpretation. I will describe the approach at a high level and consider three test cases: (1) predictions about the effects of background expectations on ambiguity resolution, (2) how the model derives graded implicatures as probabilistic inferences about speaker intentions, and (3) how context influences the information conveyed by vague and context-sensitive language.