How to get ChatGPT to do your bidding
Effective prompts generate good output, but effective prompts require experimentation and iteration
Tyler Cowen has a column out today, in which he gives advice about how to best use ChatGPT:
Ask ChatGPT “What is Marxism?” for example, and you will get a passable answer, probably no better than what you would get by using Wikipedia or Google. Instead, make the question more specific: “Which were the important developments in French Marxism in the second half of the 19th century?” ChatGPT will do much better—and it’s also the kind of question its hard to use Google and Wikipedia to answer.”
Since I don’t have the constraints of a Bloomberg column, I’ll provide the output to these two prompts below. This reifies Cowen’s point.
What is Marxism?
ChatGPT’s output:
Marxism is a social, political, and economic theory originated by Karl Marx, which focuses on the struggle between capitalists and the working class. According to Marx, capitalism is a system in which the means of production, such as factories and land, are owned by private individuals and operated for profit. In this system, the owners of the means of production exploit the labor of workers to generate profits, while the workers receive only a portion of the wealth they create.
Marx believed that the conflict between capitalists and workers would eventually lead to a revolution, in which the working class would overthrow the capitalists and establish a socialist society. In this society, the means of production would be owned collectively, and the wealth produced would be distributed equally among all members of society.
Marxism has had a profound impact on the development of modern economic and political systems, and has been used as the basis for several important political movements, including the Bolshevik Revolution in Russia. However, the implementation of Marxist ideas in practice has had mixed results, with some countries experiencing significant economic growth and improved living standards, while others have suffered from authoritarianism, economic instability, and widespread poverty.
Which were the important developments in French Marxisum in the second half of the 19th century?
Here’s its output:
In the second half of the 19th century, French Marxism underwent several important developments. Some of the key events and trends in this period include:
The Paris Commune: In 1871, the Parisian working class established the Paris Commune, a revolutionary socialist government that lasted for two months. The Paris Commune had a profound influence on Marxist thought and was seen as a precursor to the socialist revolution that Marx and Engels believed was inevitable.
The First International: The First International, also known as the International Workingmen's Association, was founded in 1864 to coordinate the activities of socialist and labor organizations across Europe. The First International was influential in spreading Marxist ideas throughout Europe, including France.
The growth of the labor movement: In the second half of the 19th century, the labor movement in France grew rapidly, with the formation of new labor unions and the growth of the socialist and Marxist political parties. This growth was driven by the widespread poverty and hardship faced by the working class, as well as by the increasing industrialization of the country.
Marxist theory and debate: During this period, Marxist theory continued to develop, with French Marxists engaging in debates over the nature of the socialist revolution, the role of the state, and the relationship between workers and capitalists.
These developments helped to establish French Marxism as an important intellectual and political force, and laid the foundation for the Marxist-inspired political movements that would emerge in France in the decades to come.
You can see Cowen’s point here. The first prompt yields a superficial, albeit serviceable explanation of what Marxism is. There’s nothing exactly wrong with it, but it doesn’t provide much beyond a high level view of why Marxism is an important concept for educated people to know about.
The second prompt is a more substantive one. It provides ChatGPT with more to chew on, and the result is different. The output provides four developments in French Marxist circles in the 19th century. The output is more substantive because the prompt is more substantive. Iterating on prompts allows you to maneuver the output towards whatever your goal is. Think of it as homing in on a target. You shoot a bullet, make note of where it struck your target, you adjust the sights a bit, you take another shot, adjust again. Eventually you zero in on your target. And the interesting thing about ChatGPT is that you may start not knowing what your target is! As you iterate through prompts, you will start to think of new avenues of inquiry that you hadn’t considered when you came up with your initial prompt.
Cowen continues:
ChatGPT will do better yet if you ask it sequential questions along an evolving line of inquiry. Ask it about the specific French Marxists it cites, what they did, and how they differed from their German counterparts. Keep on going.
ChatGPT does especially well at “compare and contrast.” In essence, ChatGPT needs you to point it in the right direction. A finely honed question gives it more fixed points of reference. You need to set the mood and tone and intellectual level of your question, depending on the kind of answer you want. It’s not unlike trying to steer the conversation at a dinner party. Or, to use another analogy, think of working with ChatGPT as like training a dog.
If you go through my archive of recent ChatGPT posts, you’ll see that I more or less do this. I have made written quite a few posts in which I relate my experience learning Python at the same time that I am learning how to use ChatGPT. I’ve repeatedly gone through a cycle of giving ChatGPT a prompt for a Python script, iterating upon that prompt, trying the new code it suggests, coming back to ChatGPT with a new iteration, etc. And, for the most part, I get useful output.
But it takes experimentation and iteration. When I read otherwise intelligent people like Bryan Caplan express skepticism about ChatGPT because it did not generate good output for a certain task (an economics exam, in his case), I tend to think that these people are missing the point of the tool. ChatGPT is not an omniscient superbrain that can perform all cognitive tasks you ask of it. It can’t even calculate the volume of a sphere correctly!
When I was a kid, my father came upon me trying to hammer a nail with a screwdriver. He gave me an exasperated look and said that needed to use a hammer for that task. Thus began a long disquisition by him about the nature of tools: each tool has a task that it excels at, and many tasks at which it performs poorly. My job as a user of the tool is to understand its limits and its strengths, and to use it only for those tasks at which it excels. Screwdrivers do not excel at driving nails! So, too, it is with ChatGPT: when you try to force it do something for which it is not optimally designed…you will get sub-optimal results.