Autonomous Agents
In the context of LLM
Vinod
Introduction
Large Language Models (LLMs) are a subset of Deep Learning
Deep Learning
Large Language Models
In News!
Prompt is all you need
1 Million users in 5 days
OpenAI’s report on labor market impact of large language models
What is a large language model (LLM)?
(+fine-tuning)
Natural language sequence �(+prompt engineering)
Natural language sequence �(→ images, music, code, actions)
Training data (lots of text from the web)
Magic prediction black box
common crawl
wikipedia
webtext2
books
Model: input-output algorithm that learns (adjusts its internal variables) by “trial and error” from data
Language: takes as input a window of test, generates new text by predicting the next word, repeatedly
Large: many variables, trained on a huge dataset of examples
LLM Evolution
Source: [1]
What are Prompts and Prompt Engineering
Prompt Design
��
Prompt involve instructions and context passed to a language model to achieve a desired task
Prompt Engineering
��
Prompt engineering is the practice of developing and optimizing prompts to efficiently use language models for a variety of applications.
Completion
Task description
Input text
LLM
prompt
Completion
Task description
Input text
LLM
prompt
Output indicator
Source: [2]
ChatGPT: Behind the scenes
Who is the prime minister of Singapore?
The prime minister of Singapore was Lee Hsien Loong
What is his age?
…
The age of prime minister Singapore, Lee Hsien Loong, was 71 years old�…
Ask me anything…
Context�- Singapore
- Prime Minister
Build Context
Context�- Singapore
- Prime Minister�- Lee Hsien Long
Build Context
Feed
Context�- Singapore
- Prime Minister�- Lee Hsien Long�- 71 years old
Build Context
Context aware
Complete the rhyme:�Roses are red, oceans is blue
Sugar is sweet, and so are you.
The sky is blue and
The clouds are white,�It’s beautiful day, what a sight!
Ask me anything…
Prompts�- Tone: Soft
- Rhyme�- Lang: English
Build Prompts
Prompts�- Tone: Soft
- Rhyme�- Lang: English�- Mode: Happy
Build Context
Feed
Prompts�- Tone: Soft
- Rhyme�- Lang: English�- Mode: Happy
Build Prompts
Prompt Engineering
Can you give me the winning number for next ToTo game?
I'm sorry, but as an AI language model, I don't have the ability to predict or provide winning numbers for any lottery or gambling game. It's important to remember that lottery games are purely based on chance, and any number or combination of numbers has an equal chance of being drawn as a winning number.
Ask me anything…
Constraints�- Lottery�- Gambling
Build Constraints
Moderation
Feed
Source: [3]
LLM Development vs. Traditional Development
YES ML expertise needed
YES training examples
YES need to train a model
YES compute time + hardware
Thinks about minimizing a loss function
Traditional ML Development
NO ML expertise needed
NO training examples
NO need to train a model
Thinks about prompt design
LLM Development�(using pre-trained APIs)
Source: [1]
How do autonomous agents work?
Source: [4]
Generative Agents�Westworld simulation
Source: [5]
*Click on the image for the demonstration of an actual simulation of the generative agent society
Generative Agents�Agent Architecture
Source: [5]
Applications
Limitations
Applications and Limitations
Source: [5]
CAMEL (Communicative Agents for “Mind” Exploration of Large-Scale Language Model Society)
Source: [6]
BabyAGI�Task-driven Autonomous Agent
Source: [8]
Demo
AutoGPT�
Source: [7]
Make it versatile
Demo
Source: [7]
LangChain
Answer
Action
Your data
General knowledge
Components
Chains
Agents
-LLM Wrappers
-Prompt Templates
-Indexes for relevant information retrieval
Assemble components to solve a specific task, such as finding info in a book
Agents allow LLMs to interact with it’s environment. For instance, make API request with a specific action.
Source: [9]
Vinod © Continental AG
19
7/22/2023
Demo�Question + Relevant Info
Question
Similarity Search
Answer
Relevant Info
Summary
Generative agent systems: A promising direction for the future of AI
References