Skip to Main Content

ChatGPT and AI in Library Research

How LLMs Work

How LLMs Work

Large Language Models (LLMs) are computer programs that can understand and generate human-like text based on the data they've been trained on. Think of them as extremely advanced auto-correct or text prediction tools, but with the ability to do a lot more. If the autocomplete on your phone is like a baby, then LLMs are like autocorrecting teenagers. They can answer your questions, help you write essays, or even create poems.  But you still need to be careful with what they do, they're not quite fully responsible! So, how do they do this?

Important Points:

  • Text Prediction: At its core, an LLM predicts the next word in a sentence. It does this by looking at the words you've already typed and guessing what comes next. This is similar to how your phone's keyboard suggests the next word as you type.

  • Data Training: These models have been trained on a massive amount of text from the internet, books, and more. This helps them understand the context in which words and phrases are used. It also means that they will be better at tasks that involve topics that are common in these datasets, and worse on those that are rare.

  • Versatility: Because they've seen so many examples of text, LLMs can perform a wide range of tasks. From answering factual questions to creating fictional stories, they can generate text that is coherent and contextually relevant. They can even produce programming code quite well, in many cases.

  • User Input: The more specific you are with your questions or prompts, the better the model can assist you. Its ability to generate useful text largely depends on how well you frame your query.  Unlike with search engines or databases, where you want your queries to be short and focused, with LLMs, you want to provide as much information as necessary, often many pages of text!

  • Not Always Perfect: While LLMs are quite advanced, they can sometimes make errors or produce text that doesn't make sense. They are not a substitute for human expertise but can be a helpful tool. They also do not have any data connection to the internet or internal states. They are language producers, not databases or search engines.