文章预览
Agentic Patterns项目 : 包含Andrew Ng在其 DeepLearning.AI博客文章系列中定义的4种Agentic模式的从头实现,主打去框架化: 没有 LangChain,没有 LangGraph,没有 LlamaIndex,没有 CrewAI。对LLM API 调用纯粹而简单。 反思模式: Reflection Pattern 这是一个非常基本的模式,但尽管它很简单,它却为LLM响应带来了令人惊讶的性能提升。 它允许大模型反思其结果,建议修改、添加、改进写作风格等。 BASE_GENERATION_SYSTEM_PROMPT = """ Your task is to Generate the best content possible for the user's request. If the user provides critique, respond with a revised version of your previous attempt. You must always output the revised content. """ BASE_REFLECTION_SYSTEM_PROMPT = """ You are tasked with generating critique and recommendations to the user's generated content. If the user content has something wrong or something to be improved, output a list of recommendations and criti
………………………………