IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Prompt Engineering with the OpenAI API

Visualizza il corso

Istruzioni dell'esercizio

  • 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.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

client = OpenAI(api_key="")

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

response = get_response(prompt)
print(response)
Modifica ed esegui il codice