3.2.2.LLM

LLM is the abbreviation for Large Language Model, corresponding to the Large Language Model node here.

Large Language Models are large-scale natural language processing models trained based on deep learning technology. The goal of LLMs is to understand and generate human-like natural language text.

Image

Click the LLM dropdown box to check the display, showing the official LLM (Default LLM, Default vLLM) + all LLM data added under the current account, sorted in reverse order of user addition, with the default at the end.

Input

The LLM node can also add the number of input elements. After customizing the element's name, you can choose to Quote a variable from a previous node or select Customize to choose a type from the following and customize the element's value.

Element Type Description
String A string type, which is a special object belonging to a reference type that includes operations for processing sequences of characters.
Integer Used to represent integers, it can store integer values, including positive integers, negative integers, and zero.
Float A floating-point number is a numerical data type used to represent decimals and fractions. Floating-point numbers can represent a wider range of numerical values than integers, including very small and very large values.
Boolean Used to represent the logical states of true (True) and false (False).
Timestamp A data type used to represent a specific point in time, usually calculated in seconds or milliseconds from a starting time. It is used to record the time of events, sort data, calculate time differences, etc.

Prompt

In Large Language Models (LLM), Prompts play an important role. Firstly, Prompts provide context information to the model, enabling it to understand the background and theme of the input, thereby generating relevant output. For example, by providing the beginning of a story, the model can continue generating the subsequent parts of the story. Secondly, Prompts can contain explicit task instructions, guiding the model to complete specific tasks. For example, by providing a question as a Prompt, the model can generate the corresponding answer. Additionally, by designing different Prompts, users can control the style, tone, length, and content of the generated text. For example, by providing specific writing styles or format requirements, the model can generate text that meets the requirements. Finally, Prompts can guide the model to generate diverse content. By changing the content and structure of the Prompt, users can obtain different generation results. To design effective Prompts, here are some tips:

  • Design clear and specific Prompts to help the model understand the task and generate high-quality output, avoiding vague and uncertain Prompts.
  • Provide the model with enough context information to better understand the input and generate relevant output. Context can include background information, examples, partial answers, etc.
  • Including examples in the Prompt can help the model understand the task requirements and generate similar output. For example, by providing several example questions and answers, the model can more accurately answer subsequent questions.
  • Control the length of the Prompt according to the task requirements. A too-long Prompt may cause the model to ignore key information, while a too-short Prompt may not provide enough context information.

By using these design techniques, you can better utilize LLM.

When you want to call the input elements, you need to enter (the custom element name above) in the Prompt. For example: Answer as a girl (question is a String element in the input containing the question).

Note: You can only reference variables from the current node's input, and cannot reference input variables from other nodes.

Output

The output of the Large Language Model is the response generated by the selected model based on the prompt and question. For example, in this Agent arrangement, the output of the LLM node is Image

Image

results matching ""

    No results matching ""