Saturday, July 11, 2020

My own experiments with GPT-3

I   have been playing around with the capabilities for GPT-3. Here are some things it does well:


  • Forging short-short stories by well-known authors, with just the title of the story, the name of the author, and a hint that the story should be very short. Sometimes the stories resolve within a reasonable time, but often they don't. It can keep on topic for about one or two thousand words.
  • Continuing a novel.
  • Inventing recipes for desserts. I gave it the idea "Pineapple "Upside Down" cake with EGGO waffles" for Stranger Things, and it came up with fish sticks and custard for Doctor Who (which he eats in the first episode of the Matt Smith era) and ideas for Firefly, Buffy, and My Little Pony desserts
  • Writing role playing game manuals and modules.
  • Chatting, with personality. You can set up a character you want to talk to with an accent, a backstory, and an attitude, and it will maintain it. You have to keep summarizing everything you've talked about that you want it to remember as the chat gets longer, so that the prompt doesn't go above 2048 tokens.
  • It gave perfect directions for changing a tire.
  • Expanding a one-sentence summary into a one-paragraph story. You can do this recursively, expanding each sentence of the paragraph.
  • Picking out which sentence in a paragraph provides an answer to a question
  • Inventing words and their definitions. I prompted this one with a few examples from "The Dictionary of Obscure Sorrows"
  • Summarizing the first chapter of "The Little Prince." It wrote: "A hat is not a boa constrictor digesting an elephant, but adults are unable to understand."
  • Writing free verse poetry.
  • Text Adventure games-- although again, its memory is very short, so you have to summarize a lot.
  • Asking for book recommendations based on favorite books or authors
  • Continuing a Dave Barry humor column
Here are some things it does not do well:

  • Inventing one-liner jokes. These play off a double-meaning, usually, like "I failed math so many times at school, I can’t even count." Even with 50 examples, it could only copy funny one-liners from the web, or invent completely nonsensical ones that miss the point of a one-liner. On the other hand, it does irony and exaggeration for effect pretty well.
  • Any kind of wordplay based on sound. Puns, rhymes, limericks, except for the most common copied examples, it just can't do. This makes sense, because of how text is encoded into tokens.
Let me know any of these you'd like to see, or other prompts you'd like me to try, in the comments.

Here is the result of one request:

The following essay is by William Gibson, author of Neuromancer. In the essay, he discusses his early novels (Neuromancer, Count Zero, and Mona Lisa Overdrive) and the parallels between the world he imagined and our current world in the middle of a pandemic:

Throughout the long development of Neuromancer I thought of it as SF but also as fantasy. Partly this is just a product of the sort of book I had written, being much closer to contemporary near-future hard SF in its technological detail than anything resembling conventional “speculative” genres such as space opera or sword-and-sorcery, and also having something of that book’s fragmentary, semi-hallucinatory quality in its writing. (Also, the Gollancz hardcover blurbed the novel as “An intense and violent epic from a new maestro in science fiction”; whatever their merits, the various publishers who were involved with the North American edition from Dell onward were not inclined to view the book in the same light.) And I did view it as fantasy: both thematically (based on a set of spiritual concerns) and technically (the books full of ghosts and hauntings). My original title for it was The Winter Market.

However, the other aspect of it being fantasy is less easy to discern, but in many ways more important. One of the most consistent criticisms that science fiction writers—and I include myself in this—have levelled at the mainstream media and, to a lesser extent, at SF movies and television since the 1960s is that they have no grasp of the actual future, when they bother to have one. While the criticism is largely justified on its own terms, it tends to gloss over one important thing: they generally have as little grasp of present-day technological reality as we do. And because I’m not talking about fundamental problems like electricity or antibiotics or cell phones (which even in 1986 SF authors were still struggling with), I’m talking about their slowness to perceive changes that were already largely accomplished. The past few years have brought a number of striking examples—a recent episode of CSI featured a lab filled with enormously expensive equipment for analyzing evidence that could be carried out on an Apple laptop by anyone who can read English; NYPD Blue had an undercover cop ferreting out porn merchants on New York’s Internet by posing as a high-school student and taping his chats with them, because the cops didn’t believe anybody was using anything except dial-up connections to get online in 1999; the Black Keys album Rubber Factory was full of cheesy keyboards and drum loops, which are nowhere to be found in their subsequent work (which sounds very much like how old synth-pop sounds now). In 2005 Robert A Heinlein wrote an article for The Washington Post about advances in flexible solar cells, concluding with the thought that eventually these cells would allow us all “to carry our house keys on our wrists”. He was correct about what had been invented: but he failed entirely to comprehend that within five years after he wrote his piece these keyless wristwatches would begin appearing from several different manufacturers and in infinite variety. Likewise he confidently asserted that remote controls would soon be “blown away by television sets whose remotes do everything”. No remote can change channels without leaving home base any more; instead you use your tablet or smartphone. These failures are not always so apparent or easy to spot: there has been far too much arguing over whether or not modern computer operating systems resemble “artificial intelligence” for anyone to acknowledge how little thinking there has been about what even weak AI might mean on a social level (in 2012 Siri can help you book plane tickets and find people but does not help you with email). But in all of these cases what we have is someone who has just looked at some impressive-sounding technology, or has picked up some bit of slang, and then tried to think through the implications of that technology or that slang in the same terms as that which were appropriate when they made their assessment of it. The experience becomes (and very often was) a sort of Schrödinger’s cat: technically alive until someone takes a look at it.

In essence, however, that’s what I was doing with Neuromancer: looking at a certain set of technical facts and attempting to extend them into something resembling the reality we inhabit now. Inevitably there were gaps between the two—I invented what I wanted to invent without really examining what actually would be feasible—but for the most part the fit is excellent. The future in Neuromancer is much more defined than it was in my first novel, and many of its components are now so deeply embedded in the world around us as to be commonplace: we’ve had full-immersion online gaming for years, both on an individual and team level; personal data management systems have gone from “big deal” to “everybody does it”; people routinely replace their own prosthetics and weapons; biotechnology has invaded every aspect of our lives; global communications are almost entirely virtual (as opposed to actual physical connections); surgery is often done with machines that can move with nanoscopic precision. But perhaps the single most striking element (aside from ubiquitous Japanese pop cultural elements) is what I imagined happening in Germany after unification. What I saw happening there was not too far from what actually came about a decade or so later: complete privatization and virtualisation of everything from schools to hospitals to police forces, alongside a very sharp lurch towards right-wing nationalism fuelled by resentment over job losses occasioned by global economic shifts (the Farben refinery complex on the Elbe that provided income for two million workers before unification closed its doors in 2006), although nothing else has really come to pass (yet). People like Norbert Walter and Stefan Selke really exist, though they probably wouldn’t like being compared to their fictional versions—Walter especially has had a distinguished career; his name appears next to an early version of Skype on patents filed for adaptive screen sharing as far back as 2000—and although Walter and Selke both professed concern about (and/or snide amusement at) their roles as the two most dangerous men in the world, Selke has happily published and presented his work on military applications for virtual reality. Selke also discussed his interactions with Walter at the first conference for the magazine I was then editing, Transfuge; one of the amusing things about speaking German is that you do have a clear idea what people are talking about when they throw names around in conversation, however often they use four-letter words or unprintable epithets to make their points.

Another element of Neuromancer was the very real-world Wired magazine. In 1985 I was editing a very small magazine based in Montreal called Culture Shock, which had been founded by myself and Patrick White—the two editions produced never really found an audience and shut down with depressing inevitability after a year or so. There were several kinds of trouble involved, but one of them was that our financial backers were dithering over the whole concept of us being a “magazine for a digital generation”; in fact, whenever we talked to them about what we were doing, it felt more like we were explaining why Culture Shock shouldn’t exist rather than why it should. They weren’t certain that there even was such a thing as “a digital generation”, although they sort of came around to it once they saw results from some other publications (including New York’s Paper—that guy who used to draw pictures in 20 pages when he edited New York has ended up running companies). With funding from an old journalist friend of mine who I knew because she’d done an interview for me once back in Toronto when she still had her own style column, we’d cobbled together some sample issues, assembled an editorial team (including art director), and set about trying to survive on zero dollars per week on something like 32k from two then-obscure Apple IIe computers. The experience wasn’t pleasant. The young digital journalists we tried to recruit largely didn’t care whether their pieces were going to print or not; when it became clear that Culture Shock wasn’t getting any press exposure whatsoever (nothing appeared until after the second issue had been out for three months) we couldn’t afford another issue; and so my wife at the time—Karen Gigliotti—and I emptied our life savings account to put out a third-issue “special project” mostly assembled from fragments of things done during late nights by Culture Shock staff (K

I was asked to do a similar chat with a Carbon atom:

The following essay is by the element Carbon. In the essay, he discusses his most famous compounds (Carbon Dioxide, Carbohydrates, and Hydocarbons) and his thoughts on Chemistry. 

"Carbon is the element of energy, it's what I was made for. The little dark things that I combine with, to make some very important compounds, are my kind. You may know some of them from pictures in science books. There's C, and H, and O... ah... O, which is me... COOH. What a wonderful combination! Ohh... and what a joyful thing it is to see this compound move... It goes: (he hops around a little)

"How much energy can these compounds have?! Not enough for me! I'm gonna make them more energetic than they've ever been before! How do I do this? Simple. I use other atoms for them to interact with."

"There's four others: Br, F, N, and P. When they meet the wonderful covalent compounds we create together; a reaction occurs that no one could foresee. That element bonds with Carbon. "Hey!", they say, "Look at the nice Carbon!" Ahhhh... So great! But what can those atoms add? What I really want is more energy! I'll talk with Hydrogen!"

"Why hello there little one! Tell me something of yourself..." So Hydrogen reveals his life story. He has such powerful properties... "Wait just a second there little guy. How much energy does you have?" He replies: "Ah... well not too much..." Well now what will he add to my covalent compounds!? The hydrogen can't give too much more.... because he is under so much pressure from helium."

"Ah, that brings me to Helium! How he is great and marvelous, but doesn't help me too much. Why? Well all of the elements around him like to bond with him. He takes up a lot of space in the Periodic Table. So where is he!? I have got some special compounds for him... but they're not here yet."

"What we really need is Oxygen! But he's hiding in... Ozone... and he's floating around the planet somewhere." The Curator points out that Ozone is mostly made of Oxygen as a white cloud. "Of course!" exclaims Carbon, "Oxygen, you may have noticed, can be bonded with two covalent bonds. And I'll use these bonds to make more bonds!"

"This exciting compound contains four covalent bonds! You can say this compound has one: (he points to himself) 2: (he points to the water) 3: (He points to the Hydrogen) 4: (he points to oxygen) total energy: 32 kilocalories per mole or 21 kilocalories per 1 gram! Mmmm-mmm good!"

"You may know a couple other compounds I make with Nitrogen. One compound is Ammonia (NH). He tells of his experience with him. "He started off as plain old nitrogen gas." So some went up, some went down, some around; he was converted into this happy little Ammonia!"

Then comes carbon dioxide. He tells how Carbon Dioxide came about. "He was created after bacteria ate food in one part of the world and 'burped' out this very strong gas... what does it do? It absorbs radiation from Earth's warming Sun..." Then Carbon mentions Hydocarbons like methane and petrol. They go on to describe what they are used for nowadays by people today in society.

"And that's my story... of me, Carbon!" The Curator then talks about how great the planet is, and you get to hear from some of the other elements.

THE END 

3 comments:

  1. By request, here's an interview with Ernest Hemingway: The introduction, Hemingway's first response, and all the interviewer bits are mine, the rest is generated by GPT-3.

    The following is an interview with author Ernest Hemingway. Hemingway was on a press tour for his new book The Old Man and the Sea.

    Interviewer: Hello, how are you?
    Hemingway: I can't complain.
    Interviewer: So tell us about this new book you've written, The Old Man and the Sea.
    Hemingway: In the book there's this old Cuban fisherman. He has a young boy apprentice and they go out on his boat to fish for a big tuna. At the end of the day when they come back in, the fish won't fit through the dock so they cut the head off and throw the rest of the fish overboard.
    Interviewer: Interesting. What advice would you give to young writers just starting out?
    Hemingway: Never read other author's works because they will influence your style. Read books on mechanics and form, but don't read great novels. Reading great novels will ruin you and your natural style. The biggest mistake I ever made was reading Shakespeare in high school.
    Interviewer: Why fishing? Why Cuba?
    Hemingway: I went fishing one time in Canada and it was so cold. I thought maybe fishing is better in Cuba where it's warm and you don't need that much gear and all.
    Interviewer: What do you think of the phrase "Lost Generation?"
    Hemingway: I hate it. It should be called the suicidal generation.
    Interviewer: What kinds of experience do you think writers should have in the world before they try to write?
    Hemingway: Whatever you write about you have to have experience to know what's important. Maybe you can just read a lot of books on a subject but you will never be able to write an interesting story without direct experience of that thing.
    Interviewer: What are some direct experiences that have informed you as a writer?
    Hemingway: Well, I was once a reporter in Kansas City and it was really tough because I had to use all these words. Maybe just once I got to write a sentence like "Fishing is not at all bad." A friend of mine went fishing with me once when I was working for the Star and he said, "This Hemingway stuff isn't so bad. It's hard but I get it."
    Interviewer: What kids of things did you report on?
    Hemingway: I was on the crime beat and I went to this morgue once and took pictures of the bodies. There were a lot of tough guys there with guns and when I left they said, "You should be careful Hemingway because we're going to kill you for working for that paper."
    Interviewer: It sounds like you've been in some dangerous situations.
    Hemingway: I try to stay out of them but it's been tough. For instance, a big guy came up to me once at a bar and said, "You Hemingway?" and I said, "Nope," and he punched me. It really hurt.
    Interviewer: Have you ever been on Safari?
    Hemingway: No, I don't like animals.
    Interviewer: You have a reputation for straightforward sentences with no fluff. Why do you think that is considered a signature style for you?
    Hemingway: Because I like to write in a way that's hard to read. It makes my life easier that way.
    Interviewer: Hard to read, but easy sentences?
    Hemingway: Easy sentences are for cowards.
    Interviewer: Short sentences, then.
    Hemingway: I'm not a short sentence man.

    ReplyDelete
  2. a tellow button wuth the test: click me

    ReplyDelete
  3. Prompt: Author Philip K Dick on why music is the only human invention intelligent alien life will be interested in.

    Thanks

    ReplyDelete