LLM Agents — Intuitively and Exhaustively Explained | by Daniel Warfield | Jan, 2024

Editor
2 Min Read


Language Modeling | Autonomous Systems | Artificial Intelligence

Empowering Language Models to Reason and Act

“Decision Director” by Daniel Warfield using MidJourney. All images by the author unless otherwise specified

This article focuses on “Agents”, a general concept that allows language models to reason and interact with the world. First, we’ll discuss what agents are and why they’re important, then we’ll take a look at a few forms of agents to build an intuitive understanding of how they work, then we’ll explore agents in a practical context by implementing two of them, one using LangChain and one from scratch in Python.

By the end of this article you’ll understand how agents empower language models to perform complex tasks, and you’ll understand how to build an agent yourself.

Who is this useful for? Anyone interested in the tools necessary to make cutting-edge language modeling systems.

How advanced is this post? This post is conceptually simple, yet contains cutting-edge research from the last year, making this relevant to data scientists of all experience levels.

Pre-requisites: None, but a cursory understanding of language models (like OpenAI’s GPT) might be helpful. I included some relevant material at the end of this article, should you be confused about a specific concept or technology.

Language model usage has evolved as people have explored the limits of model performance and flexibility. “in context learning”, the property of language models to learn from examples provided by the user, is an advanced prompting strategy born from this exploration.

An example of in-context learning prompting with ChatGPT. By specifying a few examples as “context” the model learns how to output the correct response.

“Retrieval Augmented Generation” (RAG), which I cover in another article, is another advanced form of prompting. It’s an expansion of in-context learning which allows a user to inject information retrieved from a document into a prompt, thus allowing a language model to make inferences on never before seen information.

Share this Article
Please enter CoinGecko Free Api Key to get this plugin works.