In order to use ChatGPT and similar tools effectively, it is important to understand how they work. KI-Campus has compiled a list of introductory and explanatory videos to help you get started: https://ki-campus.org/videos/chatgpt-erklaert (in German, English resources can be found below).
For most applications designed to provide us with information, two mechanisms or concepts are particularly relevant: LLM = Large Language Model and RAG = Retrieval-Augmented Generation.
LLMs in brief: pre-trained language model
General-purpose GenAI assistants such as ChatGPT, Claude, Copilot, and others use a specialized type of model for processing natural language. They rely on pre-trained language models that enable us to “converse” with them. In the simplest use case, they “answer” our questions by generating sequences of words, that is, sentences that are likely to fit the question being asked. The meaning behind the terms does not play a role in this process. It is not the actual meaning of words that matters, but statistical patterns.
However, because the Information Literacy Toolkit primarily focuses on searching for information across different sources, a chatbot based solely on a pre-trained language model is not sufficient. We need an AI assistant that, when answering our questions, also performs information retrieval from a knowledge source. In other words, our assistants must support a RAG workflow. All of the general AI assistants mentioned above do this, as do specialized AI research tools.
RAG in brief: AI with knowledge source
In a RAG workflow, the AI not only relies on the language model, but also accesses one or more connected external knowledge sources, such as websites or ingested Open Access articles. This is the R step (R = retrieve). It consists of:
- Extraction: The user’s question is passed to the connected knowledge source (knowledge database), usually in the form of extracted search terms.
- Retrieval: The most relevant text passages are returned and provided to the language model as retrieval results.
The user’s question is then supplemented with these text passages from the knowledge database. This is the A step (A = augment).
Finally, the language model, or text generator, comes into play and generates an answer to the augmented prompt, or expanded question, as described in the figure above. This is the G step (G = generate). Because the question now contains additional information after the A step, the response produced by the language model will be different and, ideally, better.
Many RAG systems can maintain a link to their sources in the generated response:
- Source attribution: Depending on the solution, the sources used may be displayed as links or references.
Why Is It Important to Understand This Mechanism, That Is, LLMs and RAG?
On the one hand, it is important to remember that LLMs are based on probabilities. A response may not fully match the question, or the model may statistically generate information that appears plausible but does not actually exist, a phenomenon commonly referred to as a “hallucination.” On the other hand, it is equally important to keep in mind that a response cannot be better than the data and knowledge sources made available through the RAG process. If an AI research assistant can only access Open Access publications found on the internet, its answer will not be based on scholarly texts that publishers make available exclusively to subscribing academic libraries.
Figures
RAG Graphic: Information Literacy HSLU/PHLU/UNILU. Graphic by Alda Wenner. Licensed under CC BY-NC 4.0.
Additional Resources for Understanding How It Works
You can find further helpful materials for understanding how it works here:
- Explanatory video by science communicator Kyle Hill (28min):
https://youtu.be/-4Oso9-9KTQ - „Einstein in the basement“ – Henrik Kniberg has a slightly different style of explanation (18min):
https://youtu.be/2IK3DFHRFfw - Explanation of how generative AI works in Stephen Wolfram’s blog:
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/ - Annotated link collection for the use of ChatGPT in higher education (Hochschulforum Digitalisierung, predominantly in German):
https://hochschulforumdigitalisierung.de/de/blog/chatgpt-im-hochschulkontext-%E2%80%93-eine-kommentierte-linksammlung#Was%20ist? - Explanatory video about the evolution of RAG by Navnit Shukla (8min): https://youtu.be/_BRN41ipLu4?si=81hI3tQ7FfdR9M-m

