Page 1 of 1

You can experience text classification with the following examples:

Posted: Wed Feb 05, 2025 10:11 am
by Rina7RS
Tips:

Output:

中立

We gave the instruction to classify the text, and the language model responded correctly, judging the text type as 'neutral'. What if we want the language model to respond in a specific format, for example, we want it to return neutral instead of Neutral, how can we do it? There are multiple ways to achieve this. In this case, we are mainly concerned with absolute features, so the more information contained in the prompt word, the better the response result will be. We can use the following example to correct the response result:

Tips:

Output:

neutral

Perfect! This time the model returned neutral, which is the specific label we wanted. The examples in the prompt allow the model to give a more specific response. Sometimes it is important to give specific instructions, as you can see in the following example:

Tips:


Output:

Neutral

Now you understand the importance of giving specific instructions, right?

dialogue
We can conduct more interesting experiments by providing prompt words to guide how large language models should respond. This is particularly useful when building conversational systems such as customer service chatbots.

For example, we can create a dialogue system that can give technical and scientific answers to questions. We can tell the model how to behave through explicit instructions. This application scenario is sometimes called "role prompting".

Tips:


Output:


The answers given by our AI assistant are very hungary mobile database technical, right? Now, let’s make it give more understandable answers.

Tips:

I think we've made some progress and you can continue to improve it. If you give the model more examples, you might get better results.

Code Generation
Another effective application area of ​​large language models is code generation. Copilot is a good example. You can perform code generation tasks by giving it some effective prompt words. Let's look at the following example.