English
Share
Sign In
🧮

Demonstration

Inference using language models is one of the important and challenging areas in the current field of artificial intelligence. Inference involves analyzing information and deriving logical conclusions from it. This is a more complex task than simple information retrieval or text generation.
Prompt : 57*32의 답은 무엇입니까?
🤖
The result of multiplying 57 by 32 is 1824.
We can solve simple problems like this very easily. Let's try a slightly more difficult problem.
Prompt : 242,343,232,12,1,423,3,2,433,42,21,51,26중 홀수인 숫자들을 더해보시오.
🤖
Let's add the odd numbers among the given numbers:
Odd numbers: 343, 1, 423, 3, 433, 21, 51
Adding: 343 + 1 + 423 + 3 + 433 + 21 + 51 = 1675
Therefore, if we add the odd numbers in the given numbers, we get 1675.
Is this correct? No, it is wrong. "1275" is the correct answer. Why does this happen?
Language models, especially large language models (LLMs), have the ability to process various types of data and extract meaning from complex contexts. However, these models still have limitations in performing inference tasks.
Text-based learning: Language models are mainly trained with text data such as sentences, paragraphs, and conversations. This data mainly reflects the meaning, context, and syntax of language, and focuses on linguistic meaning rather than numerical calculations or precise mathematical processing.
Statistical inference: Language models use statistical methods to predict the most likely words or sentences. This process is effective in recognizing and mimicking patterns in language, but is limited in performing complex mathematical calculations or logical inferences.
Data diversity and limitations: If your training data does not contain enough examples of numerical computations or mathematical problem solving, your model may have difficulty handling these types of problems.
Language-centric design: Language models are designed primarily to focus on language understanding and generation, and mathematical abilities are not the primary purpose or function of these models.
Of course, AI researchers are not the ones who leave it as it is. In GPT-4 and others, they solve this problem through coding using libraries specialized in existing inference/calculation. In fact, when you run this in GPT-4, the problem is solved as follows.
# 정의된 숫자들의 리스트 numbers = [242, 343, 232, 12, 1, 423, 3, 2, 433, 42, 21, 51, 26] # 홀수인 숫자들만 필터링 odd_numbers = [num for num in numbers if num % 2 != 0] # 홀수인 숫자들의 합계 계산 sum_of_odd_numbers = sum(odd_numbers) sum_of_odd_numbers --- output: 1275
To overcome these limitations, more advanced prompt engineering techniques are needed. Prompt engineering is a technique that provides clearer and more specific instructions to the model so that it can more accurately derive the desired information or answers. For example, it includes clearly presenting the various variables and conditions required in complex problem solving or decision-making processes so that the model can understand them. In the example above, it can be utilized in this way.
Before change
Prompt : 242,343,232,12,1,423,3,2,433,42,21,51,26중 홀수인 숫자들을 더해보시오.
After change
Prompt : 242,343,232,12,1,423,3,2,433,42,21,51,26 를 홀수와 짝수로 구별한 다음 홀수 인 숫자를 모두 더하시오. 이를 순서대로 진행해 주세요.
💡
Let's distinguish between odd and even numbers given numbers, and add the odd numbers in order:
Odd: 343, 1, 423, 3, 433, 21, 51
Odd addition: 343 + 1 + 423 + 3 + 433 + 21 + 51 = 1275
Therefore, if we add up all the odd numbers in the given numbers, we get 1275.
You can see that the correct answer was derived by simply changing the prompt. When teaching something to a person, if you have them do it step by step in sequence, they will understand faster and the quality of the work will improve.
The task of inference using language models is still an area that is still developing, and the ability to issue commands is needed to perform it effectively. This method can maximize the inference ability of the model and help solve complex problems.
👩‍💻
🔨
ⓒ 2023. Haebom, all rights reserved.
It may be used for commercial purposes with permission from the copyright holder, provided the source is cited.
👍