multi agent llm
1.0.0
ยินดีต้อนรับสู่พื้นที่เก็บข้อมูลหลายตัวแทนที่ใช้ LLM! พื้นที่เก็บข้อมูลนี้ให้การใช้เทคนิคและวิธีการที่ทันสมัยและวิธีการที่ทันสมัยสำหรับการใช้ประโยชน์จากแบบจำลองภาษาขนาดใหญ่ (LLMs) ด้วยสถาปัตยกรรมหลายตัวแทนสำหรับงานต่างๆ ซึ่งรวมถึงวิธีการที่พัฒนาโดย Agnostiq Inc. รวมถึงวิธีการที่ทันสมัยอื่น ๆ ที่เก็บได้รับการออกแบบให้เป็นแบบแยกส่วนและใช้งานง่ายช่วยให้สามารถทดลองได้อย่างรวดเร็วและโปรดใช้ด้วยความระมัดระวังเพื่อการผลิต
pip install -U multi-agent-llm import os ; os . environ [ 'OPENAI_API_KEY' ] = "your_openai_api_key"
from multi_agent_llm import OpenAILLM , AIOT
from pydantic import BaseModel , Field
llm = OpenAILLM ( model_name = "gpt-4o-mini" ) # Currently we only have wrapper for OpenAI, but it can be easily extended to other LLMs
# Define the answer schema
class QueryAnswer ( BaseModel ):
explanation : str = Field ( description = "Explanation of the answer" )
answer : str = Field ( description = "Final Answer" )
# Initialize AIOT with the LLM and run a sample query
aiot = AIOT ( llm = llm , iterations = 2 , answer_schema = QueryAnswer )
result = aiot . run ( "How many R's are there in the word 'Strawberry'?" )
print ( result ) Discussion Result
-----------------
How many R's are there in the word 'Strawberry'?
Thought Process:
Iteration 1:
IDA: Let's break down the word 'Strawberry'. First, count the letters in the word and then specifically look for the letter 'R'. Remember to pay attention to uppercase and lowercase letters, but focus primarily on the letter 'R'. How many instances of 'R' do you find?
LLMA:
{
explanation: The word 'Strawberry' contains a total of three instances of the letter 'R'. This includes two uppercase 'R's and one lowercase 'r'. Therefore, when counting the letter 'R' in both forms, we find that there are 3 occurrences in total.
answer: 3
}
Final Answer:
{
explanation: The word 'Strawberry' contains a total of three instances of the letter 'R'. This includes two uppercase 'R's and one lowercase 'r'. Therefore, when counting the letter 'R' in both forms, we find that there are 3 occurrences in total.
answer: 3
}
| วิธี | คำอธิบาย |
|---|---|
| AIOT | การทำซ้ำแบบอิสระของความคิด (AIOT) ปรับเส้นทางการใช้เหตุผลแบบไดนามิกตามสถานะการพัฒนาของการสนทนาโดยไม่ต้องสร้างความคิดเชิงสำรวจทางเลือกที่ถูกทิ้งในที่สุด ตัวอย่างอย่างรวดเร็ว |
| คนขี้เกียจ | ชี้นำการทำซ้ำของความคิด (GIOT) บังคับให้ LLM ดำเนินการวนซ้ำสำหรับจำนวนขั้นตอนที่กำหนดไว้ล่วงหน้าเพื่อให้มั่นใจว่าการสำรวจเส้นทางการให้เหตุผลอย่างละเอียด ตัวอย่างอย่างรวดเร็ว |
ที่เก็บนี้ยังมีผลลัพธ์สำหรับการทำซ้ำกระดาษของความคิด คุณสามารถค้นหาการตั้งค่าการทดลองชุดข้อมูลและผลลัพธ์ที่เกี่ยวข้อง โฟลเดอร์มีผลลัพธ์จากงานต่าง ๆ อย่าลังเลที่จะสำรวจโฟลเดอร์เหล่านี้เพื่อทำซ้ำการทดลองหรือเพื่อให้เข้าใจอย่างลึกซึ้งยิ่งขึ้นว่าเฟรมเวิร์ก AIOT และ GIT ทำงานอย่างไรในทางปฏิบัติ