Study Guide

You are using an Azure OpenAl model to generate code. You want to hint to the LLM that it should generate JavaScript code. You plan to do this by providing the opening of a Javascript function declaration. What type of prompt engineering technique should you use?

Homework Help: Questions and Answers: You are using an Azure OpenAl model to generate code. You want to hint to the LLM that it should generate JavaScript code. You plan to do this by providing the opening of a Javascript function declaration. What type of prompt engineering technique should you use?

You are using an Azure OpenAl model to generate code. You want to hint to the LLM that it should generate JavaScript code. You plan to do this by providing the opening of a Javascript function declaration. What type of prompt engineering technique should you use?

a) Cue
b) Grounding
c) Instruction
d) RAG

Answer

First, let’s understand what the question is asking: The question asks which prompt engineering technique is used to guide an Azure OpenAI model towards generating JavaScript code by providing the start of a JavaScript function as a hint.

Given Options: Step by Step Answering

a) Cue

  • A cue is a subtle hint or signal to guide the model’s response.
  • In this case, the opening of a JavaScript function declaration serves as a cue for the LLM to generate JavaScript code.

b) Grounding

  • Grounding involves providing context or background information to ensure the model’s output is relevant and accurate. It’s more about ensuring the model understands the context rather than hinting at the format of the response.

c) Instruction:

  • An instruction is a direct command telling the model what to do. While you can instruct the model to generate JavaScript code, using an opening function declaration is more about hinting than explicitly instructing.

d) RAG (Retrieval-Augmented Generation):

  • This involves retrieving relevant information from a knowledge base to enhance the generation process. This is not directly applicable to hinting at code generation within the prompt.

Conclusion:

Based on the above analysis, the correct answer is: 

a) Cue

By providing the opening of a JavaScript function declaration, we’re giving a subtle hint (or cue) to the language model that it should continue with JavaScript code. This is a classic example of using a cue in prompt engineering to guide the model’s output without explicitly instructing it.

Cue: A cue is a prompt engineering technique where you provide an example or a starting point to guide the model towards the desired output. By giving the opening of a JavaScript function declaration, you are providing a cue that signals the model to continue generating JavaScript code.

Therefore, the correct answer is a) Cue.

Learn More: Homework Help

Q. A company wants to connect cloud applications to an Oracle database in its data center. Requirements are over 10 Gbps of data and a Service Level Agreement (SLA) of 99%. What best suits the requirements?

Q. A file exists on the disk named students.txt. The file contains several records, and each record contains two fields

Comments