There are only two ways to use LLMs in a computer program: as part of a pipeline, or as an agent. In other words, either you express the control flow of the program in code, or you give a LLM tools and allow it to manage the control flow itself1. Here’s how you might structure a trivial “summarize a bunch of information and email it to me” program as a pipeline: context = gather_context(various, data, sources) llm_response = llm_summarize(context) summary = parse(llm_response) email_me(summary, my_email) And here’s how you’d do it as an agent: read_data_tool = build_read_data_tool(various, data, sources) email_tool = build_email_tool(my_email) run_agent(tools: [read_data_tool, email_tool]) It’s like the difference between a library and a framework. When you use a library, you define the structure of the program yourself, and call out to various library helpers along the way. When you use a framework, the main structure of the program lives in the framework, and it calls your code at…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.