From the course: Hands-On AI: Building LLM-Powered Apps
Large language model limitations - Python Tutorial
From the course: Hands-On AI: Building LLM-Powered Apps
Large language model limitations
- [Instructor] Congratulations. We have just built a simplified version of ChatGPT. Feel free to play around with the application. The technology is truly amazing. However, there are limits to what they can do. First of all, the now-famous hallucination problem. Hallucination is defined as when a large language model generates a response that is not grounded in its training data or the information contained in the input prompt. The cause is that a model has no knowledge about a concept that is not part of its training data. So when asked about the latest information, ChatGPT frequently respond with, "My knowledge cutoff date is X." As an example, "Who is the current president of Argentina?" It will say, "As my last update in September 2021," et cetera, et cetera, et cetera. It is common that large language models would hallucinate and generate some answers that might not be factual when asked about things it did not know. This could be the good thing for certain use cases, such as creative writing. The second type of hallucination is the misalignment between user expectations and model outputs due to simple and imprecise prompts. For example, if we ask, "What is this?" And the large language model is going to respond, but it lacks the context so it might not understand and fulfill users' expectations. It is very important to know that our language model only predicts the next token, so the output has the highest probability to look like the right answer. The model does not understand or know what is the right answer, nor does it have a role model to reason for the right answer. To bridge this gap in models' knowledge, we could provide models information inside the prompt so it has the required context to answer the questions. This brings us to the second limitation of large language model. All large language models have limited input contact length. For example, OpenAI models has contact length between 4,000 to 100,000 tokens. There has been a lot of effort to increase contact length, but we have to work with the limits. This does mean we cannot put in arbitrary amount of information into the context because there is a limit. In addition, we find that models sometimes loses focus and attention when the input contact length grows too long. It's just like us humans remembering things. When there's too much things to remember, we tend to lose focus, and the model behaved similarly. So now, we know large language model have some limits. We will propose a way to fix it in the next chapter, so our chat with PDF application can respond to users with the right answers.
Contents
-
-
-
Language models and tokenization4m 53s
-
Large language model capabilities1m 48s
-
Challenge: Introduction to Chainlit2m 28s
-
Solution: Introduction to Chainlit solution1m 18s
-
Prompts and prompt templates3m
-
Obtaining an OpenAI token1m 20s
-
Challenge: Adding an LLM to the Chainlit app1m 31s
-
Solution: Adding an LLM to the Chainlit app3m 20s
-
Large language model limitations3m 43s
-
-
-
-