182 days ago · 11 min read2249 words · Tech · hide · Fediverse post

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…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town