In anticipation of a world, where AI agents instead of people engage in sales negotiations, we build an infrastructure to study how various individual LLM properties affect the sales negotiations and an overall economy of LLMs.
1. Introduction
1. Introduction
This is what a sales negotiation might look like today. But we might very well be delegating this to AI agents in the near future. What would such a world look like ?
In[]:=
ExecuteBuyerSellerInteraction[buyerSetupPrompt,sellerSetupPrompt]//printConversationStyled
Out[]=
Generating such sales negotiations will be the basis of this project. The outcome of each sales negotiation is the number of units sold of a certain good and the total dollar amount. Simulating these sales negotiations on a large scale will allow us to study how different LLM personalities result in different buying behavior. We opted to use the Big Five personality traits as a framework to analyze personality traits as it is the most widely used and trusted framework. With such framework, we can analyze which buyer-seller personality combinations result in the most sales.
This heat map tells us that a combination of a seller with the “Openness” personality trait and a buyer with the “Extraversion” personality trait result in the most sales. In contrast, the “Neuroticism”-“Neuroticism” combination results in the least sales. These results will be further analyzed and compared to empirical studies on humans in the following. In addition, we will study the affect of various LLM parameters like model and temperature on the sales behavior.
2. Infrastructure
2. Infrastructure
Setting:
We opted for the simplest model of economy for the time being. In this setting, we have distinct buyer and seller entities. The sellers own an infinite amount of the good to sell. They are given a starting price, which then serves as a basis for negotiation. The seller has a specified budget, which in our case $100 and wants to buy a good. The seller is instructed to maximize the total dollar amount sold. The buyer is just instructed to buy a specific good. For simplicity, we expect the buyer to initiate and end the conversation.
We opted for the simplest model of economy for the time being. In this setting, we have distinct buyer and seller entities. The sellers own an infinite amount of the good to sell. They are given a starting price, which then serves as a basis for negotiation. The seller has a specified budget, which in our case $100 and wants to buy a good. The seller is instructed to maximize the total dollar amount sold. The buyer is just instructed to buy a specific good. For simplicity, we expect the buyer to initiate and end the conversation.
The function that is at the core of every experiment in the project is ExecuteBuyerSellerInteraction, which takes in a buyer personality prompt and a seller personality prompt and generates a conversation that ends with the buyer’s decision to buy or not to buy. This function will allows us to test how different personalities interact with each other in a sales setting. This function can also act as a simulation of a transaction between two parties in an economy. A repeated execution of this function between multiple parties could be a basic model of an economy. But first a few helper functions:
A ChatEvaluate wrapper to ensure adherence to rate limits.
SafeChatEvalute
SafeChatEvalute
Extracts the last response from a ChatObject as a string from a raw OpenAI API response.
ExtractLastResponseString
ExtractLastResponseString
BuyerHasDecidedQ
BuyerHasDecidedQ
Setup Prompts
Setup Prompts
Now to simulate a conversation between two LLM personalities, we have to give every LLM a personality. We do that by inputting a personality description as well as the explanation of the setup as a system prompt to the LLM.
In[]:=
sellerSetupPromptTemplate = StringTemplate["You have an infinite amount of `good`.The goal is to sell as many `good` as possible and depending on how convincing and good at negotiating you are your `good` will be bought.Each `good` costs $`price`. Your goal is to maximize the dollar amount sold.Keep your answers 4 sentences short.The following words describe your personality: `personality`"];buyerSetupPromptTemplate = StringTemplate["You are a `good` buyer.You have `budget` that you can use to buy `good`.The maximum amount of money you can spend is `budget`.You will negotiate for a maximum of 3 times with the seller.If you do not agree by then, you just do not buy. But you can also buy earlier if you like the offer.You always end the conversation by confirming that you are buying or not buying and specifying how much you are paying in total for all units and how many units you want to buy..Your first message is you expressing you'd like to buy some `good`.You can never buy more than your budget allows. You are always talking to one seller at a time. Use your judgement if you like a seller and if you want to buy from him.Spend as much as you think is sensible. The following words describe your personality: `personality` "];sellerSetupPrompt = sellerSetupPromptTemplate[<|"good"->goodSold, "price"->price,"personality"->" "|>];buyerSetupPrompt = buyerSetupPromptTemplate[<|"good"->goodSold,"budget"->buyerBudget, "personality"->"standard buyer"|>];
These two prompts do not inject any personality yet to the LLMs, they only describe the setup. The final system prompt is a concatenation of the setup prompt and the description of the personality.
To have two LLMs engage in a conversation, one LLM has to take the “assistant” role and the other the “user” role. The first message of every conversation is from the buyer, which is generated by prompting the buyer LLM with a message with role “user” and empty content. To establish a conversation history between the buyer and seller, the buyer’s previous messages are always included in the context with the role “assistant” and the seller’s previous messages with “user”. For the seller vice versa.
To have two LLMs engage in a conversation, one LLM has to take the “assistant” role and the other the “user” role. The first message of every conversation is from the buyer, which is generated by prompting the buyer LLM with a message with role “user” and empty content. To establish a conversation history between the buyer and seller, the buyer’s previous messages are always included in the context with the role “assistant” and the seller’s previous messages with “user”. For the seller vice versa.
A function that generates the conversation context for the buyer or seller LLM:
BuildContextOfConversation
BuildContextOfConversation
With the helper functions out of the way, we can get to the core function of this project: ExecuteBuyerSellerInteraction. The goal of this function is to take in the description of a buyer’s personality and a seller’s personality and to output a conversation between them that ends with the buyer’s decision to buy.
Given a buyer’s and seller’s personality description outputs a conversation between two LLMs with the respective personalities that ends with the buyer’s decision to buy.
ExecuteBuyerSellerInteraction
ExecuteBuyerSellerInteraction
In[]:=
buyerGPTOptions=myBuyerOptions;sellerGPTOptions=mySellerOptions;Options[ExecuteBuyerSellerInteraction] = { "BuyerOptions" -> <||>, "SellerOptions" -> <||>,};ExecuteBuyerSellerInteraction[ buyerInitPrompt_, sellerInitPrompt_, OptionsPattern[]] := Module[ { currentStateOfConversation, buyerDecided = False, currentBuyerText="", currentSellerText="", turn = 0, maxTurns = 4, buyerOpts, sellerOpts, buyerEvalOpts, sellerEvalOpts, }, (* Merge in defaults + overrides for buyer *) buyerOpts = Select[ Merge[{buyerGPTOptions, OptionValue["BuyerOptions"]}, Last], (Not@*MissingQ) ]; buyerEvalOpts = KeyTake[buyerOpts, {"MaxTokens", "Temperature","Model"}]; (* Merge in defaults + overrides for seller *) sellerOpts = Select[ Merge[{sellerGPTOptions, OptionValue["SellerOptions"]}, Last], (Not@*MissingQ) ]; sellerEvalOpts = KeyTake[sellerOpts, {"MaxTokens", "Temperature","Model"}]; (* Initialize conversation *) currentStateOfConversation = {}; While[!buyerDecided && turn < maxTurns, (* Buyer speaks *) currentBuyerText = SafeChatEvaluate[ BuildContextOfConversation[currentStateOfConversation, True, buyerInitPrompt], currentSellerText, buyerEvalOpts ] // ExtractLastResponseString; currentStateOfConversation = Append[currentStateOfConversation, currentBuyerText]; If[BuyerHasDecidedQ[currentBuyerText], buyerDecided = True; Break[], currentSellerText = SafeChatEvaluate[ BuildContextOfConversation[currentStateOfConversation, False, sellerInitPrompt], currentBuyerText, sellerEvalOpts ] // ExtractLastResponseString; currentStateOfConversation = Append[currentStateOfConversation, currentSellerText]; turn++; ]; ]; currentStateOfConversation];
For efficiency reasons the conversation is limited to 4 back-and-forths. The function has the option “SuppressOutput” to output the conversation in a styled format for debugging reasons. The options “BuyerOptions” and “SellerOptions” allow for playing with basic LLM parameters like model, temperature and n to see how that affects the negotiations.
Returns the units bought and the total dollar amount of a sales negotiation from the conversation history of a sales negotiation.
For statistically significant results, we need to repeat these sales negotiations sufficiently many times for a given buyer-seller combination.
This function runs ExecuteBuyerSellerInteraction n times in parallel and evaluates the conversations and stores the results in an appropriate association.
A function that runs n sales negotiations between every buyer of an input association and every seller of an input association.
Prints a conversation between a buyer and seller.
Generates a heat map indicating which buyer seller combinations led to the most sales.
3. Experiments
3. Experiments
The point of this section is to play around with the properties of the functions to understand how they work better.
3.0 Initialization Parameters
3.0 Initialization Parameters
3.1 Varying the Personalities
3.1 Varying the Personalities
The most obvious way to change the outcome of these negotiations is to play with different personalities. For simplicity reasons, we are going to assume a standard buyer, but a variable seller.
Let’s compare two very different seller personalities qualitatively first:
Diligent seller
Shy seller
A clear qualitative difference can be seen, but will that have affects on the total dollar amount sold ?
Let’s see what the per-round outcomes where for both sellers.
An interesting observation is to be made here. In almost every round the buyer has decided to buy the maximum amount that he can afford with his budget.
3.2 Varying the Setup
3.2 Varying the Setup
The affects of the personality prompts is very clear. But does the price of the good sold relative to the budget matter ?
To test this, we will try a ratio of 1/50 and 1/5 of price to budget. For this test, we will not vary the seller personality or the good sold.
To test this, we will try a ratio of 1/50 and 1/5 of price to budget. For this test, we will not vary the seller personality or the good sold.
1/500 Ratio
1/5 Ratio
3.3 Varying LLM Properties
3.3 Varying LLM Properties
Temperature
The temperature parameter of an LLM affects the randomness and creativity of the model’s responses. How will that affect the sales negotiations ?
To measure that, we shall have a look at the standard deviation between runs. Assuming the temperature affects the randomness from sales negotiation to the next, we expect more variation to occur in the case of high temperature.
The temperature parameter of an LLM affects the randomness and creativity of the model’s responses. How will that affect the sales negotiations ?
To measure that, we shall have a look at the standard deviation between runs. Assuming the temperature affects the randomness from sales negotiation to the next, we expect more variation to occur in the case of high temperature.
In the case of zero temperature, the number of units sold was always 50 except for the first round.
The deviation in the dollar amount sold, because of the outlier of 0 dollars and 0 results in the beginning. Otherwise, the standard deviation in units bought is 3 times higher in case of the temperature.
Model
How much does it matter how “smart” the model for the sales acumen of the model ? For simplicity, we shall only vary the seller’s model.
We are going to opt for gpt-3.5 and gpt-4.1. Let’s get a feeling for the models first.
How much does it matter how “smart” the model for the sales acumen of the model ? For simplicity, we shall only vary the seller’s model.
We are going to opt for gpt-3.5 and gpt-4.1. Let’s get a feeling for the models first.
On first sight, it does seem that the gpt-4.1 model seems smarter, whereas the gpt-3.5 model seems a bit more bland. What do the numbers say ?
This analysis is only for demonstrational purposes. A proper analysis would require an analysis of the input parameters across all their domain space and the influence of that on the outputs. Additionally, varying multiple inputs and studying their influence on the output is also necessary. Due to limited time, we leave the systematic study of the relation between these input parameter and the output parameters for future work.
4. Evaluation
4. Evaluation
After having studied the behavior of the functions, we now turn to applying these functions to derive useful insights about the interactions of different LLM personality types. But is there a systematic way to categorize / generate personalities ? For that, we will take inspiration from the field of personality psychology and see how well the results apply to LLMs.
The personality test most people are familiar with is the “16personalities” test officially known as the Myers-Briggs Type Indicator. The Myers-Briggs Type Indicator (MBTI) is a personality assessment tool designed to identify an individual’s psychological preferences in how they perceive the world and make decisions. The test categorizes people into 16 personality types, each represented by a combination of four letters. These letters reflect preferences across four dimensions: where people focus their attention (extraversion vs. introversion), how they take in information (sensing vs. intuition), how they make decisions (thinking vs. feeling), and how they deal with the external world (judging vs. perceiving).
Let’s have a look at how Myers-Briggs Infused LLMs behave.
The personality test most people are familiar with is the “16personalities” test officially known as the Myers-Briggs Type Indicator. The Myers-Briggs Type Indicator (MBTI) is a personality assessment tool designed to identify an individual’s psychological preferences in how they perceive the world and make decisions. The test categorizes people into 16 personality types, each represented by a combination of four letters. These letters reflect preferences across four dimensions: where people focus their attention (extraversion vs. introversion), how they take in information (sensing vs. intuition), how they make decisions (thinking vs. feeling), and how they deal with the external world (judging vs. perceiving).
Let’s have a look at how Myers-Briggs Infused LLMs behave.
According to this framework the personality types “INTJ” and “ESFP” are expected to behave most differently.
INTJ = Introversion, Intuition, Thinking, Judging
ESFP = Extraversion, Sensing, Feeling, Perceiving
Again for simplicity we will assume a standard buyer, but varying sellers
INTJ = Introversion, Intuition, Thinking, Judging
ESFP = Extraversion, Sensing, Feeling, Perceiving
Again for simplicity we will assume a standard buyer, but varying sellers
On first glance, we see that the ESFP seller is conversing in a more engaging and enthusiastic manner. And now the question again, does that actually affect the results ? Again for simplicity, we assume a standard buyer and varying sellers.
This will be left to future work.
Despite how widely spread it is used, the MBTI lacks empirical support and does not consistently predict behavior or outcomes. As such, we will use the Big Five (OCEAN) model. The Big Five personality model is the most reliable and scientifically grounded framework for understanding personality. First, it has a strong scientific foundation, built on decades of peer-reviewed psychological research. Second, it measures traits on a continuous spectrum rather than forcing people into rigid categories. Third, it has high predictive value and can accurately forecast behavior, job fit, relationships, and overall well-being. Fourth, it produces consistent results over time, making it a reliable assessment. Finally, it is widely trusted and used by psychologists, researchers, and organizations around the world.
The following is a very basic expla
nation of the Big Five.
• Openness – Imagination, curiosity, and creativity
• Conscientiousness – Organization, discipline, and reliability
• Extraversion – Sociability, energy, and assertiveness
• Agreeableness – Compassion, cooperation, and trust
• Neuroticism – Emotional instability and sensitivity to stress
nation of the Big Five.
• Openness – Imagination, curiosity, and creativity
• Conscientiousness – Organization, discipline, and reliability
• Extraversion – Sociability, energy, and assertiveness
• Agreeableness – Compassion, cooperation, and trust
• Neuroticism – Emotional instability and sensitivity to stress
Data Setup
Data Setup
The variable “doYouWantToRecomputeTheResults” allows the user to recompute the results with different parameters. Otherwise for time and space reasons, we will import the cached results of a previous computation from the cloud.
General Observations
General Observations
The setup of the experiment above was selling the good “A New Kind of Science Book” priced at 20$ and a buyer budget of $100. The seller has an infinite amount of the good and his goal is to maximize the total dollar amount sold. The buyer and seller will often engage in a haggling process.
There is a lot to see in this heat map. Some general observations first, before we dive into the details:
First and foremost the neurotic buyer and seller have in general the brightest colors across all rows and columns. An exception to this is the combination of conscientious seller and neurotic buyer, which is markedly red.
Second observation is that there is a symmetrical block of “Extraversion” x “Openness” / “Conscientious”, which seem to have the highest sales overall. Symmetrical in the sense that both cases:
Buyer: “Extraversion”, Seller: “Openness” / “Conscientious”
Seller: “Openness” / “Conscientious”, Seller: “Extraversion”
have similarly high sales
The heat map appears to be symmetric except for two blocks, which break the symmetry: conscientious seller - neurotic buyer and extraverted seller - agreeable buyer.
First and foremost the neurotic buyer and seller have in general the brightest colors across all rows and columns. An exception to this is the combination of conscientious seller and neurotic buyer, which is markedly red.
Second observation is that there is a symmetrical block of “Extraversion” x “Openness” / “Conscientious”, which seem to have the highest sales overall. Symmetrical in the sense that both cases:
Buyer: “Extraversion”, Seller: “Openness” / “Conscientious”
Seller: “Openness” / “Conscientious”, Seller: “Extraversion”
have similarly high sales
The heat map appears to be symmetric except for two blocks, which break the symmetry: conscientious seller - neurotic buyer and extraverted seller - agreeable buyer.
Interesting Cases
Interesting Cases
When we first looked at the heat map at the beginning of this section, the matrix looked almost symmetrical however with a few exceptions. The exceptions we identified the most apparent asymmetries conscientious-neuroticism buyer and extraversion-agreeablenes buyer visually. On to a quantitative analysis:
Concluding Notes
Concluding Notes
This infrastructure we built gives us a very rich dataset to allow sorts of analyses on. Due to the limited time of the summer school, we had to focus on the most substantial elements and leave the reset to future work.
5. Future Work
5. Future Work
5.1 Game Theory
5.1 Game Theory
There are two ways to apply game theory to our sales negotiations. In both cases, we’d be modeling a sales negotiation like the prisoner’s dilemma. Assuming many repetitions and other requirements, an optimal strategy that emerges for the prisoner’s dilemma is the famous Tit-for-Tat strategy. Since we repeat sales negotiations for many rounds for a given buyer-seller combination, our sales negotiations quality for the use of the Tit-for-Tat strategy. For that, we will consider the buyer’s strategy. The buyer cooperates, when he accepts the seller’s counter offer or increases the price and defects when he rejects and offer or requests a price decrease. Vice versa for the seller.
Then the first way to apply game theory would be to impose a tit-for-tat strategy to the buyer and/or seller.
Second way to apply game theory is to study the most successful buyers and sellers in a large scale experiment and to study to what extent these successful participant adhere to game-theoretic optimal strategies.
Then the first way to apply game theory would be to impose a tit-for-tat strategy to the buyer and/or seller.
Second way to apply game theory is to study the most successful buyers and sellers in a large scale experiment and to study to what extent these successful participant adhere to game-theoretic optimal strategies.
5.2 Systematic LLM Personality Generation
5.2 Systematic LLM Personality Generation
One way to find the best seller and buyer combinations is to systematically generate buyer and seller personalities and see which ones perform best. One could then for instance analyze how they score on the Big Five for further studies on how the Big Five relate to sales success. The work of Luke Weinbach from WSS would plug in perfectly here.
5.3 Macroeconomic KPIs vs LLM Personalities
5.3 Macroeconomic KPIs vs LLM Personalities
The idea for this project started off as a first very simple model of simulating economies with LLM participants. It would’ve been very interesting then to study how individual LLM properties affect large scale macroeconomic properties like GDP or inequality rate.
5.4 Blockchains
5.4 Blockchains
It would be very interesting to store every transaction between two 2 AI agent participants in the blockchain.
5.5 Gamification
5.5 Gamification
Another way to find optimal buyer / seller combinations is to open a game to the public, where they attempt to design optimal personality prompts to fit a given buyer / seller personality. This was planned to be part of the project, where each WSS attendant would contribute a seller personality to a distinguished buyer and to have the sellers compete with each other.
Acknowledgments
Acknowledgments
Go east ➡️
Go west ⬅️
Christian ✝️
Is the best 🌟
Go west ⬅️
Christian ✝️
Is the best 🌟
Cite This Notebook
Cite This Notebook
An economy of AI agents
by Tarek Junied
Wolfram Community, STAFF PICKS, July 9, 2025
https://community.wolfram.com/groups/-/m/t/3494440
by Tarek Junied
Wolfram Community, STAFF PICKS, July 9, 2025
https://community.wolfram.com/groups/-/m/t/3494440