News for hackers. Stuff that matters.
Re:Building Effective "Agents" by simonw on Friday December 20, 2024 @05:25PM (#42475700)
This is by far the most practical piece of writing I've seen on the subject of "agents" - it includes actionable definitions, then splits most of the value out into "workflows" and describes those in depth with example applications.

There's also a cookbook with useful code examples: https://github.com/anthropics/anthropic-cookbook/tree/main/p...

Blogged about this here: https://simonwillison.net/2024/Dec/20/building-effective-age...

Re:Building Effective "Agents" by NeutralForest on Friday December 20, 2024 @07:26PM (#42476486)
Thanks for all the write-ups on LLMs, you're on top of the news and it makes it way easier to follow what's happening and the existing implementations by following your blog instead.
Re:Building Effective "Agents" by th0ma5 on Saturday December 21, 2024 @01:35PM (#42481308)
Probably the least critical and most myth pushing content imo.
Re:Building Effective "Agents" by herecomethefuzz on Saturday December 21, 2024 @02:35PM (#42481680)
> most myth pushing content

Care to elaborate?

Re:Building Effective "Agents" by th0ma5 on Saturday December 21, 2024 @03:18PM (#42481986)
Lots of lists of the myths of LLMs out there https://masterofcode.com/blog/llms-myths-vs-reality-what-you... Every single post glosses over some aspect of these myths or posits they can be controlled or mitigated in some way, with no examples of anyone else finding applicability of the solutions to real world problems in a supportable and reliable way. When pushed, a myth in the neighborhood of those in the list above is pushed like the system will get better, or some classical computing mechanism will make up the difference, or that the problems aren't so bad, the solution is good enough in some ambiguous way, or that people or existing systems are just as bad when they are not.
Re:Building Effective "Agents" by simonw on Saturday December 21, 2024 @03:42PM (#42482144)
I've written extensively about myths and misconceptions about LLMs, much of which overlaps with the observations in that post.

Here's my series about misconceptions: https://simonwillison.net/series/llm-misconceptions/

Re:Building Effective "Agents" by th0ma5 on Saturday December 21, 2024 @08:09PM (#42483664)
I'm thinking of the system you built to watch videos and parse JSON and the claims of that having a general suitability, which is simply dishonest imo. You seem to be confusing me with someone that hasn't been asking you repeatedly to address these kinds of concerns and the above series are a kind of potemkin set of things that don't intersect with your other work.
Re:Building Effective "Agents" by kordlessagain on Sunday December 22, 2024 @11:55AM (#42487527)
> dishonest Potemkin

It's like criticizing a "Hello World" program for not having proper error handling and security protocols. While those are important for production systems, they're not the point of a demonstration or learning example.

Your response seems to take these examples and hold them to the standard of mission-critical systems, which is a form of technical gatekeeping - raising the bar unnecessarily high for what counts as a "valid" technical demonstration.

Re:Building Effective "Agents" by simonw on Sunday December 22, 2024 @06:37PM (#42490138)
You mean this? https://simonwillison.net/2024/Oct/17/video-scraping/

To my surprise, on re-reading that post I didn't mention that you need to double-check everything it does. I guess I forgot to mention that at the time because I thought it was so obvious - anyone who's paying attention to LLMS should already know that you can't trust them to reliably extract this kind of information.

I've mentioned that a lot in my other writing. I frequently tell people that the tricky thing about working with LLMs is learning how to make use of a technology that is inherently unreliable.

Update: added a new note about reliability here: https://simonwillison.net/2024/Oct/17/video-scraping/#a-note...

Second update: I just noticed that I DID say "You should never trust these things not to make mistakes, so I re-watched the 35 second video and manually checked the numbers. It got everything right." in that post already.

> You seem to be confusing me with someone that hasn't been asking you repeatedly to address these kinds of concerns

Where did you do that?

Re:Building Effective "Agents" by 3abiton on Friday December 20, 2024 @05:51PM (#42475903)
I'm glad they are publishing their cookbooks recipes on github too. Openai used to be more active there.
Re:Building Effective "Agents" by FrustratedMonky on Friday December 20, 2024 @06:33PM (#42476213)
" Openai used to be more active there"

When it was Open?

Re:Building Effective "Agents" by refulgentis on Friday December 20, 2024 @07:21PM (#42476459)
Eh, let's nip this in the bud: we could end up in a "it feels like...", coupled to free association, cycle. :)

More substantively, we can check our vibe. OpenAI is just as active as it ever was w/notebooks. To an almost absurd degree. 5-10 commits a week. https://github.com/openai/openai-cookbook/activity

Re:Building Effective "Agents" by th0ma5 on Friday December 20, 2024 @09:19PM (#42477016)
How do you protect from compounding errors?
Re:Building Effective "Agents" by tlarkworthy on Saturday December 21, 2024 @04:39AM (#42478587)
read the article, close the feedback loop with something verifiable (e.g. tests)
Re:Building Effective "Agents" by th0ma5 on Saturday December 21, 2024 @01:33PM (#42481301)
And who tests the tests, etc
Re:Building Effective "Agents" by Animats on Saturday December 21, 2024 @02:21AM (#42478039)
Yes, they have actionable definitions, but they are defining something quite different than the normal definition of an "agent". An agent is a party who acts for another. Often this comes from an employer-employee relationship.

This matters mostly when things go wrong. Who's responsible? The airline whose AI agent gave out wrong info about airline policies found, in court, that their "intelligent agent" was considered an agent in legal terms. Which meant the airline was stuck paying for their mistake.

Anthropic's definition: Some customers define agents as fully autonomous systems that operate independently over extended periods, using various tools to accomplish complex tasks.

That's an autonomous system, not an agent. Autonomy is about how much something can do without outside help. Agency is about who's doing what for whom, and for whose benefit and with what authority. Those are independent concepts.

Re:Building Effective "Agents" by simonw on Saturday December 21, 2024 @03:17AM (#42478201)
Where did you get the idea that your definition there is the "normal" definition of agent, especially in the context of AI?

I ask because you seem very confident in it - and my biggest frustration about the term "agent" is that so many people are confident that their personal definition is clearly the one everyone else should be using.

Re:Building Effective "Agents" by PhilippGille on Saturday December 21, 2024 @05:37AM (#42478826)
Didn't he mention it was the court's definition?

But I'm not sure if that's true. The court didn't define anything, in contrary they only said that (in simplified terms) the chatbot was part of the website and it's reasonable to expect the info on their website to be accurate.

The closest I could find to the chatbot being considered an agent in legal terms (an entity like an employee) is this:

> Air Canada argues it cannot be held liable for information provided by one of its agents, servants, or representatives – including a chatbot.

Source: https://www.canlii.org/en/bc/bccrt/doc/2024/2024bccrt149/202...

Re:Building Effective "Agents" by JonChesterfield on Saturday December 21, 2024 @05:49AM (#42478885)
Defining "agent" as "thing with agency" seems legitimate to me, what with them being the same word.
Re:Building Effective "Agents" by simonw on Saturday December 21, 2024 @07:50AM (#42479373)
That logic doesn't work for me, because many words have multiple meanings. "Agency" can also be a noun that means an organization that you hire - like a design agency. Or it can mean the CIA.

I'm not saying it's not a valid definition of the term, I'm pushing back on the idea that it's THE single correct definition of the term.

Re:Building Effective "Agents" by Nekit1234007 on Saturday December 21, 2024 @01:08PM (#42481146)
May I push back on the idea that a single word may mean (completely) different things?
Re:Building Effective "Agents" by simonw on Saturday December 21, 2024 @03:56PM (#42482230)
It's pretty clearly true.

Bank: financial institution, edge of a river, verb to stash something away

Spring: a season, a metal coil, verb to jump

Match: verb to match things together, noun a thing to start fires, noun a competition between two teams

Bat: flying mammal, stick for hitting things

And so on.

Re:Building Effective "Agents" by ToValueFunfetti on Saturday December 21, 2024 @02:11PM (#42481545)
Aloha! Indeed, the language is being cleaved by such oversights. You can be in charge of overlooking this issue, effective ahead of two weeks from now. We'll peruse your results and impassionately sanction anything you call out (at least when it's unravelable). This endeavor should prove invaluable. Aloha!
Re:Building Effective "Agents" by chrisweekly on Saturday December 21, 2024 @02:01PM (#42481479)
What's the single, unambiguous definition of the word "cleave"?
Re:Building Effective "Agents" by th0ma5 on Saturday December 21, 2024 @01:37PM (#42481317)
This guy does this, he's drank the cool aid so much that anything that could show he's been playing with unreliable junk is too much to honestly evaluate at this point in the face of the clout they've built hand waving away criticisms.
Re:Building Effective "Agents" by rcxdude on Sunday December 22, 2024 @04:27AM (#42485302)
You're pushing up against the english language, then. 'let' has 46 entries in the dictionary (more if you cinsider obsolete usages).
Re:Building Effective "Agents" by Der_Einzige on Saturday December 21, 2024 @02:03PM (#42481493)
Anything involving real agents likely does get your local spymaster interested. I assume all good AI work attracts the three letter types to make sure that the researcher isn’t trying to make AI that can make bioweapons…
Re:Building Effective "Agents" by minasmorath on Sunday December 22, 2024 @08:18AM (#42486107)
I searched for the definition of "agent" and none of the results map to the way AI folks are using the word. It's really that simple, because we're marketing this stuff to non-tech people who already use words to mean things.

If we're redefining common words to market this stuff to non-tech people, and then we're conveniently not telling them that we redefined words, and thus allowing them to believe implicit falsehoods about the product that have serious consequences, we're being disingenuous.

Re:Building Effective "Agents" by solidasparagus on Saturday December 21, 2024 @02:40AM (#42478093)
That's only one of many definitions for the word agent outside of the context of AI. Another is something produces effects on the world. Another is something that has agency.

Sort of interesting that we've coalesced on this term that has many definitions, sometimes conflicting, but where many of the definitions vaguely fit into what an "AI Agent" could be for a given person.

But in the context of AI, Agent as Anthropic defines it is an appropriate word because it is a thing that has agency.

Re:Building Effective "Agents" by Animats on Saturday December 21, 2024 @03:45AM (#42478308)
> But in the context of AI, Agent as Anthropic defines it is an appropriate word because it is a thing that has agency.

That seems circular.

Re:Building Effective "Agents" by Nevermark on Saturday December 21, 2024 @06:19AM (#42478992)
It would only be circular if agency was only defined as “the property of being an agent”. That circle of reasoning isn’t being proposed as the formal definitions by anyone.

Perhaps you mean tautological. In which case, an agent having agency would be an informal tautology. A relationship so basic to the subject matter that it essentially must be true. Which would be the strongest possible type of argument.

Re:Building Effective "Agents" by pvg on Saturday December 21, 2024 @07:34AM (#42479305)
AI people have been using a much broader definition of 'agent' for ages, though. One from Russel and Norvig's 90s textbook:

"Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators"

https://en.wikipedia.org/wiki/Intelligent_agent#As_a_definit...

Re:Building Effective "Agents" by minasmorath on Saturday December 21, 2024 @09:26PM (#42483983)
That definition feels like it's playing on the verb, the idea of having "agency" in the world, and not on the noun, of being an "agent" for another party. The former is a philosophical category, while the latter has legal meaning and implication, and it feels somewhat disingenuous to continue to mix them up in this way.
Re:Building Effective "Agents" by AnimalMuppet on Saturday December 21, 2024 @09:36PM (#42484022)
Interesting. The best agents don't have agency, or at least don't use it.

You can think of this in video game terms: Players have agency. NPCs are "agencs", but don't have agency. But they're still not just objects in the game - they can move themselves and react to their environment.

Re:Building Effective "Agents" by minasmorath on Sunday December 22, 2024 @08:16AM (#42486096)
That's actually a great example of what I'm saying, because I don't think the NPCs are agents at all in the traditional sense of "One that acts or has the power or authority to act on behalf of another." Where does the NPC derive its power and authority from? There is a human somewhere in the chain giving it parameters, and that human is ultimately responsible for the configuration of the NPC, which is why we don't blame the NPC in the game for behaving in a buggy way, we blame the devs.

An AI "agent" is the same way, it is not culpable for its actions, the humans who set it up are.

Re:Building Effective "Agents" by pvg on Sunday December 22, 2024 @02:55AM (#42484981)
In what way is it 'disingenuous'? You think Norvig is trying to deceive us about something? I'm not saying you have to agree with or like this definition but even if you think it's straight up wrong, 'disingenuous' feels utterly out of nowhere.
Re:Building Effective "Agents" by minasmorath on Sunday December 22, 2024 @08:03AM (#42486056)
It's disingenuous in that it takes a word with a common understanding ("agent") and then conveniently redefines or re-etomologizes the word in an uncommon way that leads people to implicitly believe something about the product that isn't true.

Another great example of this trick is "essential" oils. We all know what the word "essential" means, but the companies selling the stuff use the word in the most uncommon way, to indicate the "essence" of something is in the oil.

Maybe I'm wildly off base here, I have admittedly been wrong about a lot in my life up to this point. I just think the backlash that crops up when people realize what's going on (for example, the airline realizing that their chat bot does not in fact operate under the same rules as a human "agent," and that it's still a technology product) should lead companies to change their messaging and marketing, and the fact that they're just doubling down on the same misleading messaging over and over makes the whole charade feel disingenuous to me.

Re:Building Effective "Agents" by pvg on Sunday December 22, 2024 @09:59AM (#42486702)
with a common understanding ("agent") and then conveniently redefines or re-etomologizes the word in an uncommon way that leads people to implicitly believe something about the product that isn't true.

What is the 'product' here? It's a university textbook. Like, where is the parallel between https://en.wikipedia.org/wiki/Intelligent_agent and 'essential oils'.

Re:Building Effective "Agents" by minasmorath on Sunday December 22, 2024 @10:16AM (#42486840)
Oh, I have no issue with his textbook definition, I'm saying that it's now being used to sell products by people who know their normal consumer base isn't using the same definition and it conveniently misleads them into believing things about the product that aren't true.

Knowing that your target market (non-tech folks) isn't using the same language as you, but persisting with that language because it creates convenient sales opportunities due to the misunderstandings, feels disingenuous to me.

An "agent" in common terms is just someone acting on behalf of another, but that someone still has autonomy and moral responsibility for their actions. Like for example the airline customer service representative situation. AI agents, when we pull back the curtains, get down to brass tacks, whatever turn of phrase you want to use, are still ultimately deterministic models. They have a lot more parameters, and their determinism is offset by many factors of pseudo-randomness, but given sufficient information we could still predict every single output. That system cannot be an agent in the common sense of the word, because humans are still dictating all of the possible actions and outcomes, and the machine doesn't actually have the autonomy required.

If you fail to keep your tech product from going off-script, you're responsible, because the model itself isn't a non-deterministic causal actor. A human CSR on the other hand is considered by law to have the power and responsibility associated with being a causal actor in the world, and so when they make up wild stuff about the terms of the agreement, you don't have to honor it for the customer, because there's culpability.

I'm drifting into philosophy at this point, which never goes well on HN, but this is ultimately how our legal system determines responsibility for actions, and AI doesn't meet those qualifications. If we ever want it to be culpable for its own actions, we'll have to change the legal framework we all operate under.

Edit: Causal, not casual... Whoops.

Also, I think I'm confusing the situation a bit by mixing the legal distinctions between agency and autonomy with the common understanding of being an "agent" and the philosophical concept of agency and culpability and how that relates to the US legal foundations.

I need to go touch grass.

Re:Building Effective "Agents" by jeffreygoesto on Saturday December 21, 2024 @10:22AM (#42480149)
And "autonomous" is "having one's own laws".

https://www.etymonline.com/word/autonomous

Re:Building Effective "Agents" by jcims on Saturday December 21, 2024 @02:46PM (#42481749)
>Anthropic's definition: Some customers define agents as fully autonomous systems that operate independently over extended periods, using various tools to accomplish complex tasks.

But that's not their definition, and they explicitly describe that definition as an 'autonomous system'. Their definition comes in the next paragraph:

"At Anthropic, we categorize all these variations as agentic systems, but draw an important architectural distinction between workflows and agents:

* Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.

* Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks."

Re:Building Effective "Agents" by dmezzetti on Saturday December 21, 2024 @05:29AM (#42478786)
If you're looking for a lightweight open-source framework designed to handle the patterns mentioned in this article: https://github.com/neuml/txtai

Disclaimer: I'm the author of the framework.

Re:Building Effective "Agents" by threecheese on Saturday December 21, 2024 @01:04PM (#42481123)
Hi David; I’ve seen txtai floating around, and just took a look. Would you say that it fits in a similar niche to something like llamaindex, but starting from a data/embeddings abstraction rather than a retrieval one (building on layers from there - like workflows, agents etc)?
Re:Building Effective "Agents" by dmezzetti on Saturday December 21, 2024 @06:01PM (#42483033)
Hello - This is a great and accurate description. The idea is that out of the box there is a pipeline but each component is also customizable.
Re:Building Effective "Agents" by adeptima on Saturday December 21, 2024 @07:41AM (#42479343)
100% agree. I did a research on workflows, durable execution engines in context of Agents and RAGs. Put some links in a comment to the article below