multi agent llm
1.0.0
LLM 기반 다중 에이전트 저장소에 오신 것을 환영합니다! 이 저장소는 다양한 작업을위한 다중 에이전트 아키텍처와 함께 대형 언어 모델 (LLM)을 활용하기위한 최첨단 기술과 방법의 린 구현을 제공합니다. 여기에는 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이 사전 정의 된 수의 단계를 계속 반복하여 추론 경로를 철저히 탐색 할 수 있도록 LLM이 LLM이 계속 반복하도록 강요합니다. 빠른 예 |
이 저장소에는 논문 반복의 결과가 포함되어 있습니다. 관련 실험 설정, 데이터 세트 및 결과를 찾을 수 있습니다. 폴더에는 다양한 작업의 결과가 포함되어 있습니다. 이러한 폴더를 탐색하여 실험을 재현하거나 AIOT 및 GIOT 프레임 워크가 실제로 어떻게 작동하는지에 대한 더 깊은 이해를 얻으십시오.