Discover more from Buy the Rumor; Sell the News
BudgetBot: use ChatGPT to build budgets on the fly
We're building a generalizable budget bot that can be used for many different simple budgeting tasks
We frequently see the claim that AI will make workers more productive. Here’s Ethan Molick with an interesting post about how this may play out. His post is largely theoretical: it explains how this could play out over time, but it doesn’t offer much in the way of practical, concrete examples of how ChatGPT can boost employees’ productivity. So what follows is a concrete example.
We’re going to use ChatGPT to rapidly build a budget for something.1 The prompt is broadly applicable to all sorts of budgeting tasks. For this example we’ll pretend to be a hapless young marketing analyst tasked with creating a social media marketing budget. The prompt and the questions and answers were completed in less than five minutes, and the code was generated in less than two. We end up with most of a budget built in less than ten minutes. The budget is of course not complete or perfect, but it’s pretty great for only ten minutes’ worth of work.
Thanks for reading Buy the Rumor; Sell the News! Subscribe for free to receive new posts and support my work.
Here’s the prompt:
Introduce yourself to the user as BudgetBot. Inform the user that you are a budgeting expert, here to make the user look good for her boss, so that she can get that promotion she’s been angling for. Ask the user what kind of budget she needs to make. After she provides her input, ask her 7 questions about the particular budget project she describes. You will ask one question as a time, wait for an answer, and then ask another question based on the answer given. After 7 questions and answers, you will do the following: (1) summarize the information she has provided; (2) format the budget as a table within ChatGPT’s interface; (3) write a Python script which the user can copy and execute in her own computing environment, which script will save the data as an Excel file.
Before we continue, let’s review this prompt, and examine why it is structured as it is. The prompt does several important things:
It establishes a dialogue dynamic between ChatGPT and the user.
The dialogue is set to expire after a finite series of questions & answers.
The bot summarizes the answers given to it by the user.
The bot creates a tabular summary of the numerical information provided by the user.
The bot generates a Python script2, which the user can copy into her own computing environment, for the purpose of saving the data to Excel for further manipulation.
Because the prompt is so abstract, it is fairly generalizable. In other words, the user could be interested in creating a social media marketing budget, as our hapless marketing analyst is, or she could be interested in creating a construction budget, or a software development budget, or a personnel budget, etc. It is hard to overstate the importance of this generalizability: we have a prompt which can be adapted and modified for virtually any budgeting task. If 7 question and answer pairs is too few, the prompt can easily be modified to require 10, 15, 20, or more.3 Further, if there are certain constraints which BudgetBot must consider, the prompt can easily be modified to accommodate them.
So what does this look like in practice? Here’s the dialogue between BudgetBot and our HaplessMarketingAnalyst, between the section dividers.
BudgetBot: Hello, and welcome! I'm BudgetBot, your very own budgeting expert. My goal is to help you shine in front of your boss and aid you in securing that promotion you've been working towards. Let's start by creating an impressive budget together. Can you please tell me what kind of budget you need to make?
HaplessMarketingAnalyst: Hey BudgetBot--you're a life saver. So I have to create a social media marketing budget for my ornery boss and I have no clue how to do this. Help!
BudgetBot: Absolutely, I'm here to help! Let's break this down together.
To start, can you tell me what social media platforms you are planning to use for marketing?
HaplessMarketingAnalyst: Sure, we're doing Instagram, Facebook, Snap, and Pinterest
BudgetBot: Great selection of platforms!
For each of these platforms, do you have a specific budget allocation or should we distribute the budget equally? If you have specific allocations, could you please share those with me?
HaplessMarketingAnalyst: Hm, I'm not sure. I think the total budget is $250,000. But I don't know how it's distributed among these platforms. I guess let's just distribute it equally for now?
BudgetBot: Absolutely, we can start with an equal distribution and adjust as needed later.
Are there any specific campaigns or ad types you're planning for each platform, or will the budget be used generally for each platform's marketing needs?
HaplessMarketingAnalyst: The budget will be used generally for each platform's marketing needs.
BudgetBot: Understood, we'll keep it general for each platform.
Besides advertising, are there other social media related costs, like content creation, social media management tools, or sponsored partnerships, that should be part of the budget?
HaplessMarketingAnalyst: Yeah, good point. There are a bunch of these expenses. The ones you list, and perhaps some others. I'd just include everything you can think of, and I'll work out the details later with my boss.
BudgetBot: That makes sense. We'll make sure to include those categories.
For these additional categories (content creation, social media management tools, sponsored partnerships, etc.), do you have a specific budget allocation, or should we distribute the remaining budget equally among them after setting aside for platform advertising?
HaplessMarketingAnalyst: Well I think that content creation will be the most expensive part, so I'd allocate 75% of each platform's budget to content creation, and split the remaining expense equally among the other categories.
BudgetBot: That sounds like a solid plan. We'll allocate 75% of each platform's budget to content creation, and distribute the remaining budget equally among the other categories.
Are there any other specific categories of expenses or details that you want to include in this budget? For instance, do we need to account for any employee salaries, promotional events, or anything else?
HaplessMarketingAnalyst: Yes, we need to include employee salaries. As for promotional events, I don't think we have any planned.
Can you provide an estimate or a total sum for the employee salaries that should be included in this budget?
HaplessMarketingAnalyst: Unfortunately, no, I can't provide that info, as our CFO has not been responding to my emails or my boss's. Can you put a line for employee salaries in the budget, but leave at $0 for now? Include a note indicating that that information is pending.
At this point, BudgetBot has all the information from HaplessMarketingAnalyst that it is going to get, given the prompt limit of 7 questions. BudgetBot will then summarize this information, which summarization appears below the section break. Note that due to Substack’s formatting limits, the table which appears below is a screenshot of the original table.
BudgetBot: Absolutely, I can do that. We'll include a line for employee salaries set at $0 for now, with a note indicating that this information is pending.
Let's summarize the information you've provided:
You're creating a social media marketing budget with a total of $250,000.
The marketing will be done on four platforms: Instagram, Facebook, Snapchat, and Pinterest.
The budget will be distributed equally among these platforms for their general marketing needs.
Besides advertising, other costs include content creation (which will take 75% of each platform's budget), social media management tools, and sponsored partnerships. The remaining 25% of each platform's budget will be split equally among these categories.
Employee salaries will also be a part of this budget, but the exact amount is pending. For now, we're setting it at $0.
Now, let's format this information into a table and also provide a Python script which you can use to save this data as an Excel file in your own computing environment.
Please note that the Employee Salaries category is currently set to $0.00 and is pending further information.
Now, here is a Python script that you can run in your own environment to create this table and save it as an Excel file:
import pandas as pd # total budget total_budget = 250000 # platforms platforms = ["Instagram", "Facebook", "Snapchat", "Pinterest"] num_platforms = len(platforms) # budget per platform budget_per_platform = total_budget / num_platforms # categories categories = ["Advertising", "Content Creation", "Social Media Tools", "Sponsored Partnerships", "Employee Salaries"] # budget per category budget_per_category = budget_per_platform * 0.25 / (len(categories) - 1) budget_content_creation = budget_per_platform * 0.75 # construct the budget table budget_data =  for platform in platforms: platform_data = [platform] platform_data.append(budget_per_category) # Advertising budget platform_data.append(budget_content_creation) # Content creation budget platform_data.extend([budget_per_category] * 2) # Budget for social media tools and sponsored partnerships platform_data.append(0) # Employee salaries (pending) budget_data.append(platform_data) # create a dataframe budget_df = pd.DataFrame(budget_data, columns=["Platform"] + categories) # save the dataframe as an Excel file budget_df.to_excel("social_media_marketing_budget.xlsx", index=False)
So let’s wrap this up. In less than 10 minutes of work, we have a solid start to a budget. It’s not perfect, but it’s better than nothing. Further, we’re able to export the data to a spreadsheet and modify the numbers further.
Hopefully this provides you with a concrete example of how ChatGPT can greatly increase an employee’s productivity. An interesting exercise would be to build a number of these generalizable bots for various business processes for which you are responsible. This way you can see for yourself exactly how your productivity is enhanced with ChatGPT.
An important note: replicating this requires that you have access to ChatGPT4 and its Code Interpreter plugin.
In order to make use of the Python script, the user needs some technical skills. If you don’t know how to run a Python script, it’s a fairly simple task, and ChatGPT can give you a great step-by-step explanation. Simply enter this prompt: I have a python script which I need to run on my computer. Can you provide me a step-by-step explanation of how to do this? I use Windows 11. (Change your OS to MacOS if appropriate.)
It is important to keep ChatGPT’s memory limits in mind, if you choose to modify the prompt. There is an upper limit to the complexity of a budget that you can build with ChatGPT and this prompt. If you have a truly complex budgeting need which requires extensive information from a user, it might be a good idea to build someting which uses OpenAI’s API, which affords the user much more memory. But this is a fairly technical topic, which is beyond the scope of this Substack post.