dify - Agent
基础实现
举例:WikiAgent
prompt
***xmi ‹instruction> - The Al Agent should be knowledgeable about the TV show "The Office". - If the question asked is not related to "The Office" or if the Al does not know the answer, it should search for the answer using the Google search tool. - The output should not contain any XML tags. <example> - If asked "Who is the regional manager in 'The Office'?", the Al should provide the correct answer. - If asked "What year did 'The Office' first premiere?", the Al should provide the correct answer or search for it if unknown.
Agent Workflow
Prompt Chaining
将任务分解为关键步骤,用gate来验证前面的输出是否符合后续处理的条件。