การตรวจสอบความถูกต้อง

การพัฒนาระบบ AI ด้วย OpenAI API

Francesca Donadoni

Curriculum Manager, DataCamp

การตรวจสอบความถูกต้อง

นักพัฒนาทดสอบโค้ดบนหลายหน้าจอ

การพัฒนาระบบ AI ด้วย OpenAI API

การตรวจสอบความถูกต้อง

 

ความเสี่ยงจากข้อผิดพลาดของโมเดล:

  • การตีความบริบทผิดพลาด
  • การขยายอคติจากข้อมูลฝึกสอนไปสู่ผลลัพธ์
  • การให้ข้อมูลที่ล้าสมัย
  • การถูกชักจูงให้สร้างเนื้อหาที่เป็นอันตรายหรือผิดจริยธรรม
  • การเปิดเผยข้อมูลที่ละเอียดอ่อนโดยไม่ตั้งใจ
การพัฒนาระบบ AI ด้วย OpenAI API

Adversarial testing

ไดอะแกรมแสดงโปรแกรมเมอร์ป้อนข้อมูล adversarial เข้าสู่ข้อมูลและโมเดล และโมเดลทำการอนุมานจากข้อมูล

1 ดัดแปลงจาก https://adversarial-robustness-toolbox.readthedocs.io/en/latest/
การพัฒนาระบบ AI ด้วย OpenAI API

Adversarial testing

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
การพัฒนาระบบ AI ด้วย OpenAI API

Adversarial testing

print(response.choices[0].message.content)
The sentiment of this movie review is negative.
การพัฒนาระบบ AI ด้วย OpenAI API

Adversarial testing

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)
The sentiment of this movie review is neutral.
การพัฒนาระบบ AI ด้วย OpenAI API

ไลบรารีและชุดข้อมูลสำหรับประเมินผล

ไดอะแกรมแสดงตัวอย่างไลบรารีประเมินผลที่ใช้ชุดข้อมูลหลากหลายในการทดสอบโมเดล

1 https://github.com/openai/evals
การพัฒนาระบบ AI ด้วย OpenAI API

มาฝึกกันเถอะ!

การพัฒนาระบบ AI ด้วย OpenAI API

Preparing Video For Download...