In this article, we explore the representation of knowledge in language models and world models. Language models are neural network sequence predictors that generate text based on a given input. These models have the ability to learn from text and generate coherent stories. We investigate how language models build world models, which are representations of the underlying state of the world described in the text. We find that language models encode information about entities, properties, and relations in vector representations. These representations can be used to predict and modify the knowledge possessed by the models. However, language models still make errors and generate incoherent text. We discuss the challenges in building reliable world models and the need for improved architectures. Overall, understanding the representation of knowledge in language models and world models is crucial for developing more advanced AI systems.