BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Prompt Engineering with the OpenAI API

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

client = OpenAI(api_key="")

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

response = get_response(prompt)
print(response)
Kodu Düzenle ve Çalıştır