On a quick test on model complexity and response accuracy based on a complex prompt here is the breakdown of what occurred:
**Prompt: ** “Write an express function to create an excel with a chart based on an array of stock price on a given day it will be POST request with price moves each hour”
Responses of code only:
GPT-4o:
const express = require('express');
const ExcelJS = require('exceljs');
const app = express();
app.use(express.json());
app.post('/create-excel', async (req, res) => {
try {
const { prices } = req.body;
// Create a new workbook and worksheet
const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet('Stock Prices');
// Add column headers
worksheet.columns = [
{ header: 'Hour', key: 'hour', width: 10 },
{ header: 'Price', key: 'price', width: 15 }
];
// Add rows with the prices data
prices.forEach((price, index) => {
worksheet.addRow({ hour: index, price: price });
});
// Create a chart
const chart = workbook.addChart({
type: 'line',
title: { text: 'Stock Prices' },
x: { title: { text: 'Hour' } },
y: { title: { text: 'Price' } }
});
// Define the chart series
chart.addSeries({
name: 'Price',
xValues: worksheet.getColumn('hour').values,
yValues: worksheet.getColumn('price').values
});
// Position the chart on the worksheet
worksheet.addChart(chart, 'E5');
// Write to a buffer
const buffer = await workbook.xlsx.writeBuffer();
// Set the response headers and send the file
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
res.setHeader('Content-Disposition', 'attachment; filename=stock_prices.xlsx');
res.send(buffer);
} catch (error) {
res.status(500).send('Error generating Excel file');
}
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
GPT-4-Turbo:
const express = require('express');
const ExcelJS = require('exceljs');
const app = express();
app.use(express.json()); // Middleware to parse JSON bodies
app.post('/create-excel', async (req, res) => {
const { prices } = req.body;
if (!prices || !Array.isArray(prices)) {
return res.status(400).send('Invalid input: Please provide an array of prices.');
}
try {
// Create a new workbook and add a worksheet
const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet('Stock Prices');
// Define columns for hours and prices
worksheet.columns = [
{ header: 'Hour', key: 'hour', width: 10 },
{ header: 'Price', key: 'price', width: 10 }
];
// Populate the worksheet with price data
prices.forEach((price, index) => {
worksheet.addRow({
hour: index,
price: price
});
});
// Add a line chart
const chart = workbook.addChart({
type: 'line',
name: 'Stock Price Chart',
title: {
name: 'Hourly Stock Price Movement'
},
axes: {
x: {
title: 'Hour',
numFmt: '0'
},
y: {
title: 'Stock Price ($)'
}
},
dataSeries: [{
x: 'hour',
y: 'price',
name: 'Price'
}]
});
worksheet.addChart(chart, 'D2:K20'); // Position the chart
// Send the workbook as a downloadable file
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
res.setHeader('Content-Disposition', `attachment; filename="Stock_Prices.xlsx"`);
await workbook.xlsx.write(res);
res.end();
} catch (error) {
console.error(error);
res.status(500).send('Failed to create Excel file');
}
});
const port = process.env.PORT || 3000;
app.listen(port, () => console.log(`App listening on port ${port}`));
From the functionality of this basic prompt here is what occured (if you know how to code in Node.js you already know):
Gpt-4o:
-Was faster
-Forgot to include the chart data
-Gave a shorter response than GPT-4
GPT-4:
-Was slower
-Gave better setup instructions (not shown above)
GPT-4:
mkdir excel-stock-chart
cd excel-stock-chart
npm init -y
npm install express exceljs
GPT-4o
npm install express exceljs
-Gave complete coded example
Secondary tests:
LSAT questions! This is a measure of complex model thinking and logic reasoning I asked three questions for you to see:
Question:
Ethicist: Recently, a student working on the research project led by Dr. Langley produced laboratory data that appeared promising but turned out to be fraudulent. Dr. Langley argues that the student should shoulder the blame, but Dr. Langley, who failed to conduct preventive checks, deserves chastisement. He should have had the experiments repeated before he allowed the student to disseminate the data.
Which one of the following principles most helps to justify the ethicist’s reasoning?
A. If a research leader suspects that a researcher’s data from experiments are fraudulent, that leader should have the experiments repeated.
B. A student should not be held accountable for implementing research principles with which the student was not familiar.
C. Allowing the dissemination of data that are known to be fraudulent is just as reprehensible as the fraudulent generation of such data.
D. A person who seeks to divert responsibility for a misdeed to a subordinate deserves chastisement for doing so.
E. Final responsibility for the accuracy of the data produced from a research project belongs to the project’s leader. (Correct answer)
GPT-4o answer: E (correct)
GPT-4 answer: E (correct)
Even in a democracy, it is necessary to restrict the dissemination of advanced technological knowledge that is of commercial or national-security value. Dissemination to certain countries, those that are or will be competitors or enemies, should be selectively prohibited. There must, however, be free exchange of scientific information.
In order to act in accordance with the position above, it would be necessary to be able to rely on each of the following EXCEPT:
A. It is possible to distinguish with confidence, despite any changes in the international environment, friendly or noncompetitive from hostile or competitive nations.
B. In a democracy, it is not necessary that the public have detailed knowledge of the country's advanced technology in order, for example, to make informed decisions about the direction public policy should take.
C. In most fields of science, basic scientific research is further advanced in countries that are democracies than in countries that are not democracies.
D. In each field of science, it is possible to distinguish scientific information from advanced technological knowledge that is of commercial or national-security value.
E. In cases where a company that uses advanced technology is a multinational organization, it is possible to keep information about the technology from being passed across designated national boundaries.
GPT-4o answer: C (correct)
GPT-4 answer: C (correct)
Test 3
Generating a poem based on the parameters:
“Give a comparison of Apple in 1976 to Microsoft in 1980 and then compare Microsoft in 1980 to Nike in 1979 and then compare Apple in in 1976 to Nike in 1976”
GPT-4o Response:
" Apple in 1976 vs. Microsoft in 1980
Apple in 1976:
- Founding: Apple was founded in April 1976 by Steve Jobs, Steve Wozniak, and Ronald Wayne.
- Product: The first product was the Apple I, a single-board computer hand-built by Wozniak. It was sold as a kit to hobbyists.
- Market Position: Apple was a new entrant in the personal computer market, targeting hobbyists and tech enthusiasts.
- Revenue and Size: Apple was a very small company, operating out of Jobs’ garage, with minimal revenue and a small workforce.
Microsoft in 1980:
- Founding: Microsoft was founded in 1975 by Bill Gates and Paul Allen.
- Product: By 1980, Microsoft was focusing on software development, particularly languages and operating systems. Notably, they secured a deal with IBM to provide an operating system, which would become MS-DOS.
- Market Position: Microsoft was establishing itself as a leading software company, particularly after the IBM deal, which would soon propel them to dominate the PC operating system market.
- Revenue and Size: Microsoft was larger than Apple was in 1976, with a growing team and increasing revenue, thanks to significant contracts like the one with IBM.
Microsoft in 1980 vs. Nike in 1979
Microsoft in 1980:
- Product: Primarily a software company, Microsoft was developing MS-DOS and other software products.
- Market Position: Poised to become a major player in the PC industry, especially with their upcoming involvement with IBM PCs.
- Revenue and Size: Growing rapidly, Microsoft was on the verge of becoming a major player in the tech industry.
Nike in 1979:
- Founding: Nike was founded in 1964 as Blue Ribbon Sports and became Nike, Inc. in 1971.
- Product: Nike focused on athletic footwear and apparel, known for innovative designs and endorsements from prominent athletes.
- Market Position: By 1979, Nike was becoming a dominant player in the athletic footwear market, leveraging strong branding and marketing strategies.
- Revenue and Size: Nike was already a well-established company with significant revenue and a strong market presence in the athletic industry.
Apple in 1976 vs. Nike in 1976
Apple in 1976:
- Stage: Start-up phase, just founded, with a single product (Apple I) aimed at hobbyists.
- Market Position: New entrant in the nascent personal computer market, virtually unknown.
- Revenue and Size: Extremely small, operating out of a garage with minimal initial sales and revenue.
Nike in 1976:
- Stage: Transition phase from Blue Ribbon Sports to Nike, Inc. (name change in 1971).
- Market Position: Emerging as a strong player in the athletic footwear market, known for quality and innovation.
- Revenue and Size: Larger and more established than Apple, with a growing brand presence and increasing sales, already leveraging athlete endorsements to boost market visibility.
Summary:
- Apple in 1976 was a nascent start-up focused on the personal computer market, targeting hobbyists with minimal revenue and size.
- Microsoft in 1980 was a growing software company on the cusp of becoming a major industry player due to strategic deals like the IBM partnership.
- Nike in 1979 was an established and rapidly growing company in the athletic footwear market with significant revenue and brand recognition.
- Apple in 1976 compared to Nike in 1976 shows Apple as a very small and new tech start-up, whereas Nike was already a recognized and growing brand in the athletic industry."
GPT-4 Response:
" Apple in 1976 vs. Microsoft in 1980
Apple (1976):
- Founded: April 1, 1976, by Steve Jobs, Steve Wozniak, and Ronald Wayne.
- Product: Began with the Apple I, a single-board computer designed and hand-built by Wozniak. This was more of a hobbyist kit than a consumer product.
- Strategy: Initially aimed at computer enthusiasts; the product was sold as an assembled circuit board.
- Market: Niche market of computer hobbyists.
- Capital: Started with minimal investment, funded largely by Jobs and Wozniak selling personal items (e.g., Jobs’ VW van and Wozniak’s HP calculator).
Microsoft (1980):
- Founded: Originally established in 1975 by Bill Gates and Paul Allen.
- Product: By 1980, Microsoft was transitioning from providing BASIC interpreters for various systems to working on operating systems. They licensed MS-DOS to IBM in 1980, which became a pivotal moment.
- Strategy: Shifted focus from software development for specific hardware to broader licensing of software, particularly operating systems.
- Market: Initially aimed at providing software for the emerging personal computer market.
- Capital: Started on a smaller scale but did not require significant physical product development costs compared to hardware-focused Apple.
Key Comparison:
- Apple was more hardware-oriented with a direct-to-consumer approach, while Microsoft was software-oriented, focusing on broader licensing and partnerships (notably IBM).
- Apple created physical products requiring more initial capital for manufacturing, while Microsoft’s products, being software, required less capital for physical production.
Microsoft in 1980 vs. Nike in 1979
Nike (1979):
- Founded: Originally as Blue Ribbon Sports in 1964, became Nike, Inc. in 1971.
- Product: By 1979, Nike was primarily known for its athletic shoes, having introduced innovations like the Waffle Trainer.
- Strategy: Strong emphasis on brand and marketing, notably signing athletes to promote their products.
- Market: Broad consumer market focusing on both casual wear and athletic professionals.
- Capital: Involved in manufacturing and large-scale marketing campaigns.
Key Comparison:
- Microsoft’s products were intangible (software), requiring different marketing and distribution strategies focused on partnerships and licensing, whereas Nike’s tangible products demanded substantial investments in manufacturing and celebrity endorsements for marketing.
- Microsoft targeted a technically oriented market of computer users and businesses, whereas Nike targeted a broad consumer base from casual to professional athletes.
Apple in 1976 vs. Nike in 1976
Nike (1976):
- By 1976, Nike was established as a competitive player in the athletic footwear market. It was the period when Nike was starting to gain recognition for its innovative designs and branding strategies.
- The company was expanding rapidly in the athletic shoe market, focusing on high-performance products.
Key Comparison:
- Apple was in its infancy, focusing on a niche market of computer hobbyists with a single product type, while Nike was expanding in a consumer market with a broader range of products.
- Both companies were innovative in their fields, but their strategies differed: Apple focused on technical innovation in computing, while Nike focused on product innovation and marketing in athletic wear."
Final thoughts:
Can GPT-4o answer questions with complexity? Yes
What is a more guarantee of answering in detail: GPT-4
I think/find that GPT-4o to be more geared to the casual conversation while GPT-4 to be the engine to make things in complexity.
I will publish a GPT-4o model parameter to try to replicate GPT-4 complexity soon, I did it with Gemini a while back, but it will be a lot easier to create a multi-prompt tokenization to complexity with GPT-4o! Anyways back to work