Aan de slagGa gratis aan de slag

Iterative prompt engineering for standard prompts

You are a developer using prompt engineering techniques for your various tasks, and you want to carefully select the right language model. You wrote an initial prompt to know what are the top ten pre-trained language models out there. Now, your goal is to refine this prompt to generate a table presenting information on each model's name, release year and its owning company.

The OpenAI package and the get_response() function have been pre-loaded for you.

Deze oefening maakt deel uit van de cursus

Prompt Engineering with the OpenAI API

Cursus bekijken

Oefeninstructies

  • Iteratively refine the prompt to get the desired outcome: a table with three columns for the top ten pre-trained language models, listing the model name, release year, and owning company.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

client = OpenAI(api_key="")

# Refine the following prompt
prompt = "Give me the top 10 pre-trained language models"

response = get_response(prompt)
print(response)
Code bewerken en uitvoeren