Documentation
¶
Overview ¶
Package agent implements 15 pre-designed agents used in TUMIX.
15 pre-designed agents used in TUMIX:
- 1. w/o TTS (Base)
- 2. CoT Agent (CoT)
- 3. CoT-Code Agent (CoT code)
- 4. Search Agent (S)
- 5. Code Agent (C)
- 6. Code Agent+ (C+)
- 7. Dual-Tool Agent (CS gs)
- 8. Dual-Tool Agent (CS llm)
- 9. Dual-Tool Agent (CS com)
- 10. Guided Agent (CSGgs)
- 11. Guided Agent (CSGllm)
- 12. Guided Agent (CSGcom)
- 13. Guided Agent+ (CSG+gs)
- 14. Guided Agent+ (CSG+llm)
- 15. Guided Agent+ (CSG+com)
Index ¶
- func NewAutoAgents(llm model.LLM, genCfg *genai.GenerateContentConfig, n int) ([]agent.Agent, error)
- func NewBaseAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewCoTAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewCoTCodeAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewCodeAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewCodePlusAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewDualToolComAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewDualToolGSAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewDualToolLLMAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedComAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedGSAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedLLMAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedPlusComAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedPlusGSAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewGuidedPlusLLMAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewJudgeAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewRefinementAgent(subAgents ...agent.Agent) (agent.Agent, error)
- func NewRoundAgent(subAgents ...agent.Agent) (agent.Agent, error)
- func NewSearchAgent(llm model.LLM, genCfg *genai.GenerateContentConfig) (agent.Agent, error)
- func NewTumixAgent(candidates []agent.Agent, judge agent.Agent) (agent.Loader, error)
- func NewTumixAgentWithConfig(cfg TumixConfig) (agent.Loader, error)
- func NewTumixAgentWithMaxRounds(candidates []agent.Agent, judge agent.Agent, maxRounds uint) (agent.Loader, error)
- func Prompt() *dotprompt.Dotprompt
- type TumixConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAutoAgents ¶
func NewAutoAgents(llm model.LLM, genCfg *genai.GenerateContentConfig, n int) ([]agent.Agent, error)
NewAutoAgents creates n lightweight auto-designed agents.
They emulate the paper's LLM-designed variants by varying tool emphasis.
Each agent is given a specific focus: textual reasoning, code execution, or web search.
func NewBaseAgent ¶
NewBaseAgent creates a Base Agent that uses direct prompting to solve problems.
This agent is responsible for "1. w/o TTS (Base)".
func NewCoTAgent ¶
NewCoTAgent creates a CoT Agent that uses chain-of-thought reasoning to solve problems.
This agent is responsible for "2. CoT Agent (CoT)".
func NewCoTCodeAgent ¶
NewCoTCodeAgent creates a CoT Code Agent that uses chain-of-thought reasoning and output code to solve problems.
This agent is responsible for "3. CoT-Code Agent (CoT code)".
func NewCodeAgent ¶
NewCodeAgent creates a Code Agent that uses code execution to solve problems.
This agent is responsible for "5. Code Agent (C)".
func NewCodePlusAgent ¶
NewCodePlusAgent creates a Code+ Agent that uses code execution with extra human-pre-designed priors to solve problems.
This agent is responsible for "6. Code Agent+ (C+)".
func NewDualToolComAgent ¶
NewDualToolComAgent creates a Dual-Tool Agent that uses both code execution and a combination of Google Search API and LLM search function to solve problems.
This agent is responsible for "9. Dual-Tool Agent (CS com)".
func NewDualToolGSAgent ¶
NewDualToolGSAgent creates a Dual-Tool Agent that uses both code execution and Google Search API to solve problems.
This agent is responsible for "7. Dual-Tool Agent (CS gs)".
func NewDualToolLLMAgent ¶
NewDualToolLLMAgent creates a Dual-Tool Agent that uses both code execution and LLM search function to solve problems.
This agent is responsible for "8. Dual-Tool Agent (CS llm)".
func NewGuidedComAgent ¶
NewGuidedComAgent creates a Guided Agent that uses both code execution and a combination of Google Search API and LLM search function to solve problems.
This agent is responsible for "12. Guided Agent (CSGcom)".
func NewGuidedGSAgent ¶
NewGuidedGSAgent creates a Guided Agent that uses both code execution and Google Search API to solve problems.
This agent is responsible for "10. Guided Agent (CSGgs)".
func NewGuidedLLMAgent ¶
NewGuidedLLMAgent creates a Guided Agent that uses both code execution and LLM search function to solve problems.
This agent is responsible for "11. Guided Agent (CSGllm)".
func NewGuidedPlusComAgent ¶
NewGuidedPlusComAgent creates a Guided+ Agent that uses both code execution and combined search with extra priors.
This agent is responsible for "15. Guided Agent+ (CSG+com)".
func NewGuidedPlusGSAgent ¶
NewGuidedPlusGSAgent creates a Guided+ Agent that uses both code execution and Google Search API with extra priors.
This agent is responsible for "13. Guided Agent+ (CSG+gs)".
func NewGuidedPlusLLMAgent ¶
NewGuidedPlusLLMAgent creates a Guided+ Agent that uses both code execution and LLM search with extra priors.
This agent is responsible for "14. Guided Agent+ (CSG+llm)".
func NewJudgeAgent ¶
NewJudgeAgent creates a Judge Agent that evaluates candidate answers and decides whether to finalize or continue.
func NewRefinementAgent ¶
NewRefinementAgent creates a Refinement Agent that gathers candidate answers from sub-agents and judges the final answer.
func NewRoundAgent ¶
NewRoundAgent creates a Round Agent that performs one TUMIX round: gathering candidates and judging.
func NewSearchAgent ¶
NewSearchAgent creates a Search Agent that uses web search to solve problems.
This agent is responsible for "4. Search Agent (S)".
func NewTumixAgent ¶
NewTumixAgent creates the TUMIX Agent that performs multi-agent test-time scaling with tool-use mixture.
func NewTumixAgentWithConfig ¶
func NewTumixAgentWithConfig(cfg TumixConfig) (agent.Loader, error)
NewTumixAgentWithConfig creates an orchestrated TUMIX loader that propagates previous round answers and consults the judge for early stop.