Agent จำได้ไหม?

การสร้าง Agentic Workflows ด้วย LlamaIndex

Laurie Voss

VP Developer Relations, LlamaIndex

Stateless กับ Memory

Agent:

  • ไม่มีสถานะโดยค่าเริ่มต้น
  • ไม่เก็บข้อมูลระหว่าง session
  • ทำงานอิสระในแต่ละครั้ง

agent_no_memory.gif

การสร้าง Agentic Workflows ด้วย LlamaIndex

Memory มีความสำคัญ

$$

  • หน่วยความจำของมนุษย์ช่วยสานต่อบทสนทนา

  • Agent ต้องการบริบทเพื่อให้ทำงานได้มีประสิทธิภาพ

memory.png

การสร้าง Agentic Workflows ด้วย LlamaIndex

แนะนำ Context

$$

  • ตัวอย่าง: การจำชื่อ

  • LlamaIndex ใช้ออบเจกต์ Context

    • เก็บข้อมูลระหว่างการรัน

$$

Context: สมุดโน้ตหรือแหล่งเก็บ memory ของ Agent ที่ใช้บันทึกข้อมูลเพื่อเรียกใช้ภายหลัง

context_memory.png

การสร้าง Agentic Workflows ด้วย LlamaIndex

จาก Stateless สู่การใช้ Context

  • Stateless agent:

    • ลืมทุกอย่างหลังตอบกลับ
  • Agent ที่ใช้ Context:

    • เก็บ memory ข้ามการสนทนา
    • ต้องเปิดใช้งานก่อน
  • การสานต่อข้อมูลคือหัวใจสำคัญของ workflow

blank_vs_context.png

การสร้าง Agentic Workflows ด้วย LlamaIndex

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

การสร้าง Agentic Workflows ด้วย LlamaIndex

Preparing Video For Download...