Skip to main content

Control Models Prompting

Our Luminous-control models have been optimized to work well with zero-shot instructions. This means that they do not necessarily need a set of examples like in few-shot learning. Still, as we previously learned, structures can help achieve the desired completion of the model. For control models, the prompt should follow the following pattern:

### Instruction:
INPUT YOUR INSTRUCTION HERE

### Input:
YOUR INPUT

### Response:
COMPLETION OF THE MODEL

While you should always use the ### Instruction: and ### Response: parts of the prompt pattern, the ### Input: part is optional.

 ### Instruction:
Translate "How are you?" to the language my colleague Hans Müller understands.

### Response: 
 "Wie geht es dir?"

The huge upside of control models is their ability to follow instructions without the need for a few-shot prompts. Let's compare how the following example will work for the vanilla models, and instruct models.

We want to predict the topic of the text. For a vanilla model, we would start like this:

Identify the topic of each text.
###
Text: After initially making significant recovery gains, the most important indices turned into the red later in the day. The downward trend was particularly steep in the last few minutes of trading. 
Topic: Finance 
### 
Text: The wizard rose from his chair and gazed across the room. Finally, his blue eyes settled on a stocky man. In a surprisingly swift manner, the old wizard waved his wand and the man turned into a large frog. 
Topic: Fantasy 
### 
Text: Flowering plants grow fruits to spread their seeds. Edible fruits function symbiotically. Animals obtain nourishment from consuming the fruit and the animal's movement helps spread the seed. 
Topic: Biology

With our Luminous-control models we can (but do not have to) omit the few-shot examples and just provide a statement that tells the model what to do.

 ### Instruction:
Identify the topic of the text.
 Reply like this: "The topic is: <topic>"

### Input:
Flowering plants grow fruits to spread their seeds. Edible fruits function symbiotically. Animals obtain nourishment from consuming the fruit and the animal's movement helps spread the seed. 

### Response: 
The topic of the text is: plants.
tip
  1. Can I still use few-shot examples when using Luminous-control models?

    Yes, you can still use few-shot examples. You can put them in both, the ### Instruction: and ### Input: patterns of the prompt.

  2. Where do I put the question, if I want to do Q&A with Luminous-control models?

    You can either put them in the ### Instruction: or ### Input: part of the model. The template we recommend for QA applications if

### Instruction:
{question} If there's no answer, say "NO_ANSWER_IN_TEXT".

### Input:
{document_text}

### Response:

  1. In the last example on this page, we instructed the model how we want the output to look like. This can often help to receive the completion you really want.