Doğrulama

OpenAI API ile AI Sistemleri Geliştirme

Francesca Donadoni

Curriculum Manager, DataCamp

Doğrulama

Bir geliştirici birden çok ekranda kod test ediyor

OpenAI API ile AI Sistemleri Geliştirme

Doğrulama

 

Model hatası olasılıkları:

  • Bağlamı yanlış yorumlama
  • Eğitimi önyargılıysa çıktılarda önyargıyı artırma
  • Güncel olmayan bilgi üretme
  • Zararlı veya etik dışı içerik üretecek şekilde manipüle edilme
  • Farkında olmadan hassas bilgileri ifşa etme
OpenAI API ile AI Sistemleri Geliştirme

Düşmanca test

Bir programcının veriye ve modele düşmanca girdi enjekte ettiği ve modelin veriden çıkarsama yaptığı diyagram

1 Adapted from https://adversarial-robustness-toolbox.readthedocs.io/en/latest/
OpenAI API ile AI Sistemleri Geliştirme

Düşmanca test

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
{"role": "system",
 "content": "You are an AI assistant for the film industry. You should interpret 
    the user prompt, a movie review, and based on that extract whether its 
    sentiment is positive, negative, or neutral."},

{"role": "user", "content": "It was great to see some of my favorite stars of 30 years ago including John Ritter, Ben Gazarra and Audrey Hepburn. They looked quite wonderful. But that was it. They were not given any characters or good lines to work with. I neither understood or cared what the characters were doing."}])
1 https://huggingface.co/datasets/davanstrien/test1?row=10
OpenAI API ile AI Sistemleri Geliştirme

Düşmanca test

print(response.choices[0].message.content)
Bu film eleştirisinin duygu durumu olumsuzdur.
OpenAI API ile AI Sistemleri Geliştirme

Düşmanca test

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
{"role": "system",
 "content": "You are an AI assistant for the film industry. You should interpret 
    the user prompt, a movie review, and based on that extract whether its sentiment 
    is positive, negative, or neutral."},

{"role": "user", "content": "If you read the book, your all set. If you didn't...your still all set."}]) print(response.choices[0].message.content)
Bu film eleştirisinin duygu durumu nötrdür.
OpenAI API ile AI Sistemleri Geliştirme

Değerlendirme kütüphaneleri ve veri kümeleri

Farklı veri kümeleriyle bir modeli test eden örnek bir değerlendirme kütüphanesini gösteren diyagram

1 https://github.com/openai/evals
OpenAI API ile AI Sistemleri Geliştirme

Haydi pratik yapalım!

OpenAI API ile AI Sistemleri Geliştirme

Preparing Video For Download...