Log: experimenting with GPT-3 to generate spaced repetition prompts

2020-07-15

Finally managed to get GPT-3 to generate a prompt like this:

The Dead Sea is a salt lake located on the border between Israel and Jordan. Its shoreline is the lowest point on the Earth’s surface, averaging 396 m below sea level. It is 74 km long. It is seven times as salty (30% by volume) as the ocean. Its density keeps swimmers afloat. Only simple organisms can live in its saline waters.

The Dead Sea is a salt lake located on the border between Israel and Jordan.
Q: Where is the Dead Sea located?
A: on the border between Israel and Jordan

Its shoreline is the lowest point on the Earth’s surface
Q: What is the lowest point on the Earth’s surface?
A: The Dead Sea shoreline

averaging 396 m below sea level
Q: What is the average level on which the Dead Sea is located?
A: 400 meters (below sea level)

It is 74 km long.
Q: How long is the Dead Sea?
A: 74 km

It is seven times as salty (30% by volume) as the ocean.
Q: How much saltier is the Dead Sea than the ocean?
A: 7 times as salty

It did take 3-5 tries. For many phrases it wasn’t able to generate useful questions at all.


2020-06-30

Experimenting with GPT-3 via the Da Vinci model. My first attempts don’t really succeed in generating good questions. e.g. (AI completion in italics):

A flashcard consists of a question and an answer. To make a flashcard for a passage, ask a question about one of its important details.

Passage: A true fjord is formed when a glacier cuts a U-shaped valley by ice segregation and abrasion of the surrounding bedrock. According to the standard model, glaciers formed in pre-glacial valleys with a gently sloping valley floor. The work of the glacier then left an overdeepened U-shaped valley that ends abruptly at a valley or trough end. Such valleys are fjords when flooded by the ocean. Thresholds above sea level create freshwater lakes. Glacial melting is accompanied by the rebounding of Earth’s crust as the ice load and eroded sediment is removed (also called isostasy or glacial rebound). In some cases this rebound is faster than sea level rise. Most fjords are deeper than the adjacent sea; Sognefjord, Norway, reaches as much as 1,300 m (4,265 ft) below sea level. Fjords generally have a sill or shoal (bedrock) at their mouth caused by the previous glacier’s reduced erosion rate and terminal moraine. In many cases this sill causes extreme currents and large saltwater rapids (see skookumchuck). Saltstraumenin Norway is often described as the world’s strongest tidal current. These characteristics distinguish fjords from rias (e.g. the Bay of Kotor), which are drowned valleys flooded by the rising sea. Drammensfjorden is cut almost in two by the Svelvik “ridge”, a sandy moraine that during the ice cover was under sea level but after the post-glacial rebound reaches 60 m (200 ft) above the fjord.

Question: When do glaciers produce freshwater lakes instead of a fjord?
Answer: When the valley floor is above sea level.

Question: What distinguishes fjords from rias?
Answer: Rias are flooded because the sea level has risen over time, while fjords are flooded because a glacier has carved the valley floor below sea level.

Question: What is an example of a fjord that is deeper than the adjacent sea?
Answer: Sognefjord, Norway

But it was able to answer a question for me:

Question: What is an example of a ria?
Answer: Bay of Kotor, Montenegro

Interestingly, this passage didn’t include the detail that the Bay of Kotor is in Montenegro.

Here’s an attempt with Quantum Country:

A flashcard consists of a question and an answer. To make a flashcard for a passage, ask a question about one of its important details.

Passage: In a manner similar to the way conventional computers are made up of bits, quantum computers are made up ofquantum bits, orqubits. Just like a bit, a qubit has astate. But whereas the state of a bit is a number (0 or 1), the state of a qubit is a vector. More specifically,the state of a qubit is a vector in a two-dimensional vector space. This vector space is known as state space. For instance, here’s a possible state for a qubit:

$$\left \begin{array}{c} 1 \ 0 \end{array} \right$$

That perhaps sounds strange! What does it mean that the state of a qubit is a two-dimensional vector? We’re going to unpack the answer slowly and gradually. You won’t have a single epiphany where you think “ahah, that’s what a qubit is!” Rather, you’ll gradually build up many details in your understanding, until you get to the point where you’re comfortable working with qubits, with quantum computations, and more generally with quantum mechanics.

One way qubits are similar to bits: we’ve said absolutely nothing about what the qubit actually is, physically. Maybe the state of the qubit is being stored somehow on an electron, or a photon, or an atom. Or maybe it’s being stored in something stranger, perhaps inside some exotic particle or state of matter, even further removed from our everyday experience.

For our purposes in this essay none of this matters, no more than you should worry about what type of capacitor is storing the bits inside your computer’s RAM. What you should take away is that: (a) qubits have a state; (b) much like a bit, that state is an abstract mathematical object; but (c) whereas a bit’s abstract state is a number, 0 or 1, the state of a qubit is a 22-dimensional vector; (d) we call the 22-dimensional vector space where states live state space.

Question: How many dimensions does the state space of a qubit have?
Answer: 2.

Question: The state of a qubit is a two-dimensional v___.
Answer: vector

Question: What are three types of physical system which could
potentially be used to store a qubit?
Answer: Examples include (other answers also fine): electron, photon, atom

Question: Why do you think that so far, almost all quantum computing
experiments have used an electron to store qubits?
Question: If instead, qubits were stored in atoms, why might that be difficult?
Answer: Some answers also fine: multiple atoms are required to store a single qubit, it would be difficult to manipulate a single

More examples, tighter passages:

A flashcard consists of a question and an answer. To make a flashcard, ask a question about an important detail in a passage.

Passage: In a manner similar to the way conventional computers are made up of bits, quantum computers are made up of quantum bits, or qubits. Just like a bit, a qubit has a state. But whereas the state of a bit is a number (0 or 1), the state of a qubit is a vector. More specifically, the state of a qubit is a vector in a two-dimensional vector space.
Question: The state of a qubit is a two-dimensional v___.
Answer: vector

Passage: One way qubits are similar to bits: we’ve said absolutely nothing about what the qubit actually is, physically. Maybe the state of the qubit is being stored somehow on an electron, or a photon, or an atom. Or maybe it’s being stored in something stranger, perhaps inside some exotic particle or state of matter, even further removed from our everyday experience.
Question: What are three types of physical system which could potentially be used to store a qubit?
Answer: Examples include (other answers also fine): electron, photon, atom

Passage: More specifically, the state of a qubit is a vector in a two-dimensional vector space. This vector space is known as state space.
Question: What do we call the two-dimensional vector space where the state of a qubit lives?
Answer: state space

Passage: This notation with | and > is called the ket notation, and things like |0> are called kets. But don’t be thrown off by the unfamiliar terminology – a ket is just a vector, and when we say something is a ket, all we mean is that it’s a vector.
Question: We use the term ket interchangeably with the term ___.
Answer: vector

Passage: There’s a tension here that applies to many proposals to do quantum information processing, not just neutrinos. If we want to store the quantum state, then it’s helpful if our qubits only interact very weakly with other systems, so those systems don’t disrupt them. But if the qubits only interact weakly with other systems then that also makes it hard to manipulate the qubits. Thus, systems which make good quantum wires are often hard to build quantum gates for.
Question: What could be an issue with designing a quantum computer out of qubits that interact weakly with other systems?
Answer: We can’t build effective gates for those qubits, since they only interact weakly with other systems.

Another output:

Question: Why is it hard to manipulate qubits which interact weakly with other systems?
Answer: If they interact weakly with other systems, then they are harder to manipulate.

A pretty good conversation with Feynman:

The following is a conversation with Richard Feynman.

Me: Where do new ideas come from?
Richard Feynman: That is a very, very difficult question. What can I say? My own experience is this - that if I could give any beginning student any advice at all, it would be “Don’t try too hard”. If you only learn some principle, or if you only learn to solve some problem, that is not enough. You might just have learned to juggle with the problem instead of solving it. You have to have some idea how to find things out - and there are some hints that I can give about how to find things out. One is to read the oldest books first, instead of the newest books on a subject. Another hint is to try to find the answer by a principle, or at least get some idea what kind of answer you should get - then look in places where you might find it. And the most important one is that when you ask a question - don’t just say, “I don’t understand this”, but try to answer it. If you can’t answer it, at least you should know why you can’t answer it. And once you understand the reason that you can’t do that, you can go on from there. Another hint - it is very important in order to make progress, not to get discouraged by small things. Suppose you are trying to track down a difficulty in some experiment - you try this, you try that, and it doesn’t work. Then you are sorry that you have to stop and go home because it is such a beautiful evening, and you are all ready to go on working. Well, you shouldn’t do that - you should just say to yourself, “OK, the experiment didn’t work today - but it’s going to work tomorrow!” and then you should go on from there. The main thing is that you shouldn’t get discouraged if at first you don’t get very far. You see, the big mistake that people make is to assume that because they don’t understand, the problem is something deep, when it is only that they are not thinking hard enough - they are not solving the problem.

Me: What makes you happy?
Richard Feynman: I can’t answer that. It would be too long to write all the things. One of the reasons is that it is fun to discover things. Another reason is playing the bongo drums. And another reason is that it is pleasant to be with people that I love.

Last updated 2021-12-13.