A General Question Answerer

I fine-tuned GPT-3 using answered questions from 3 different stackexchanges, “writing”, “philosophy”, and “puzzles”. At first I wanted to create something to answer all the odd questions writers ask in writing forums but figured to throw in two more stackexchanges to give it some more depth in it’s responses. It seems like this might be a great way to create something like a “Generalized Question Answerer” (GQA). Here are some answers I’ve gotten so far:

(Note: I substituted new lines for empty strings during preprocessing but this was cool enough to share anyway…)

What do you call a machine learning model that can answer any question?

I thought that a “generalized question answerer” sounded a bit silly lol.

###

A GQA can answer any question which can be reduced to an answerable statement — e.g., “Does this object contain a ball?” The question Then the statement is true if the answer is yes, and if false if the answer is no.is more restrictive than “Does this object contain a ball?”The questionThen the statement is true if the answer is yes.is more restrictive than “Does this object contain a ball?”. This is one of the reasons why you’re unlikely to find an actual GQA in day-to-day applications, although hyper-contextual GQAs exist. A ‘knowledge’ base of this type would be extremely powerful, of course — it would also require major shifts in current AI practice. This might be envisaged as involving large databases of common questions and answers indexed on queries, for example. A modern GQA would probably need to be able to understand context and so on.A link to an answer elsewhere in the same answer forum means that “context” may be required — e.g., “Can this object be used as a sphere?” or “Can this be an ultra-violet light?” A related question may be “We know that the moon is made of green cheese, does this object contain cheese?”But, of course, any given answer can be rephrased. For example, “Does this object contain cheese?” Can be paraphrased as “Do these imaginary properties exist?”. Answering these questions might involve constructing diagrams showing what comes into existence when specific conditions are met, e.g., related related to the rephrasing.So maybe instead you could say that it’s a model that can derive additional knowledge by construing statements into formulae that are then evaluated for truth or falsehood. An example that comes to mind is something like this: You are then offered a meal at Joe’s diner which contains ham, eggs, bread and lard. This does not contain cheese. Right away you can see at least two problems with this kind of rule-based approach — the first being that you might have ordered scrambled eggs with bread but eggs without bread would not be included in the meal!The second problem is that an experienced diner like Joe would probably never use the word “lard”.He (she?) might instead offer such choices as:You are then offered a meal at Joe’s diner which contains ham, eggs, bread and pork fat. This does not contain fat.You are then offered a meal at Joe’s diner which contains ham, eggs, bread and cream spread. This does not contain either pork fat or cream spread.

What is an analogy for the stock market?

If you had to describe the stock market in poetic pentameter, how would you do it?

###

Part of it is this:I’m the needle in the haystack,Find me if you canWhen you see the needle deep withinA hint of what might be central thoughtLess obvious things, to focus you hereI’m the key to the universe;Show me the right to runI seek out what you seek outLook inside your mind, I’m to be foundWhat do I mean by stock market?The universe of trading knowledge. (More or less)The universe has its own mind; (Less or more)You can’t see me, you must think I’m what? (There isn’t anything, so I’m the stock market.)I’m the core to your fortune,And I’m central to two things,Everything you do you try to rely on me.The universe is much bigger than galaxiesAnd life is part of everything;You can’t just use your headsYou need my mind as wellInside you dwellersInside outAnd I give you abilityTo act without delayOr inside your headsAn alternative interpretation would be that one can not digest or digest to much, so the universe has to send these hunger pains into the universe core to get things going again. I figure it out, but you can play around with it :)

###

The reason a poetic name for a stock market is easy to remember is that stock markets are mostly about bargaining. If a businessman is going to be successful he has to convince a buyer that he is offering less than what they want, and more than what they expect. In this sense poetry is about negotiation. So apart from stopping talking nonsense, a good description of a stock market might be: “where businessmen negotiate for better offers.” Or perhaps “where customers bargain for better services.”In response to second answer, I personally find one of the most popular names that is used for a lot of slightly different markets on Stock Exchange Online (“XE”) apropos: “exchange”. The idea here being that stock markets are where buyers and sellers come together to trade items/services/money. This is also a metaphor for how markets function. The world’s marketplaces don’t just exchange physical items between buyer and seller, but rather they exchange ideas — kind of like stock markets except for more tangible things. So from there I would suggest the name of good old “Xstreet” connecting buyers and sellers from all over the world.In answer 3, personally I find that there is nothing particularly special about stock markets compared with other centralized exchanges for buying and selling (say). Indeed, the old Chinese saying “buy low and sell high” was originally applied to people trying to make trades on local markets instead of larger centralized

(I realized that the word I wanted was “Iambic” not poetic…)

What is a great an analogy for the stock market? If you had to describe the stock market in Iambic Pentameter, how would you do it?

###

In Shakespearean times, people invested in public companies that traded shares on the London Stock Exchange. These shares were called “bills.” The stock market was a source of great excitement — if your Bill went up, you were quite pleased. But, if your Bill went down in price, you’d be quite disappointed. Today, we’d call this a “standard deviation,” a measure of a financial instrument’s volatility. The bigger a Bill’s standard deviation, the bigger the Bill tends to move up and down.But what does this have to do with poetry? Here’s a possible connection:In our world, The Stock Market is a fluid, dynamic, uncertain place where knowledge of the future is impossible — but in your poem, you can make it all fixed and stable, because in your poem, the activity in question is fixed and stable: poets write poems. One might therefore take the idea of the stock market and turn it on its head. What if we said that the poems we write are risky and unpredictable and potentially dangerous, and the crucial factor is not the wisdom and knowledge we bring to the task but our ability to manage our expectations and remain calm and collected under pressure? Now that’s an idea for another question. I’m sure there are many variations on it.Poems contain information about their authors that is both specific and universal — one might examine such information under a lock-and-key metaphor — and this information can incorporate lessons about personal responsibility, prudence, and other socially desirable qualities. Moreover, poems can serve as monuments to human achievement — these are hard things to make; we need to reflect on what we’ve become to become them — and they can express and communicate affection and emotion and point towards reality. Their authors make it clear whether they agree with them: “This doesn’t move me,” or “This moves me.” We should also notice that the creation of a work of art is a very public affair; writers explain (and maybe demonstrate) their internal life to us in such a public forum.I should add that I’m no fan of quantitative analysis of literature; I believe it’s harmful and dehumanizing. However, I wonder whether some poets’ choices of meter disguise an underlying pattern — an interesting metaphor for the stock market? — and quantitative methods could be applied to those patterns.I invite readers with better analytic skills than mine to help me out on this one!

###

For more context on this example, consider that some people think that some people think that some words rhyme with some other words. These patterns are often referred to as assonance or some such nonsense. A message associated with some such pattern has some sort of measure, or at least enough of one to make it measurable.Your question seems to be asking the following: How can I turn this relational idea into a mathematical model? The answer here is to make the concepts more explicit. Say “this poem is an ABAB rhyme.” Then, “this poem contains AB rhyming words.” Rhyme patterns can be quantified via a counting function. And so on.There are many pages on the internet that describe just this kind of thing in detail, if anyone is interested.Another idea in your question is that of conditional probability, that under certain conditions A then B, then B is in fact A, in that statistical sense. A poem can be considered to have probability p(A) of being A. Then, there are two possibilities given the poem A: 1) p(B) is less than or equal to p(A) 2) p(B) is greater than p(A). The conditional probability p’(B|A) says how much less likely B is given that the poem A is true (or assumed to be true). We can calculate this using Bayes’ Theorem. We would want this value greater than zero; p’(B|A) = 1 — p(B|A).So what we get is conditional probability p’(A|B), which will also give us standard deviation (more or less) of measurements, to estimate risks (in this case, the losses associated with certain poems). So to summarize: 1) p’(A|B) / (p’(A) + p’(B)) = sd(B) / sqrt(p’(A) + p’(B)) 2) average assets = asset 1 + asset 2 / sqrt(p’(A) + p’(-A))One way to capture this nested conditional probability structure is to represent the structure with a directed acyclic graph (DAG). The bottom row for row indices should be the corresponding values 1 and -1. assets = row 1’s nodes should be A and B, which correspond to p’(A) and p’(-A), respectively. Suppose node A is colored red, and node B is colored blue. That means that with probability p’(-A), node A is chosen as the parent node of node B. As a result, row 1’s assets A and -A have negative and positive values, respectively, representing their associated probabilities. In the case of B, the value of row 1’s assets is zero because it does not have a parent.Now that we have these values for the DAG, we can calculate the actual probabilities associated with the individual nodes. The graph partition function F(V,E) maps the set of all graphs to the set of all their partitions. So F(V,E) is basically a function from graphs to integers. Now suppose the graph corresponding to the poem A is partitioned into K components. Then the reduction F(K,A) of the graph A to K components is determined by p’(A), to be zero if p’(A) > K/2, and K/2 squared otherwise. This reduction is unique up to an integer partition.The variance (or standard deviation) s (not what you were looking for; I meant it as the standard error) is defined as s = sqrt(VarVar(x)) where VarVar is the Var function (explained in Wikipedia). The assets now become assets * s, representing conditional probabilities conditioned on various possible outcomes (we now can treat both A and -A as outcomes).So what to do with this? Just take it for granted that the financial world is full to the brim with this kind of stuff. You can also play around with simple examples using Excel or Mathematica or something.For instance, say that you have two orange panels symmetrically placed on one side, and one red panel on the other side. Its probability is $p=0.25$ (roughly speaking, the probability of flipping heads or tails), so its conditional probability is $p’(-A) = -p/2 = -0.5$, so its standard deviation is sqrt(-0.5*1.5²).Thus, our first A has a higher expected loss than a second one with a larger probability! If on the other hand what we had is three red panels, on one side we have a big panel, a small panel on the other side, and a middle panel, then we have a single picture on both sides, and then p is 1-p’, and the overall standard deviation of our losses will then be sqrrt(3*(-0.5)*1.5²).In fact, these concepts work no matter how many panels we have; as long as we have a unique partition F(V,E), the expectation of our losses will be a perfectly good mathematical object defined by equation above.Sometimes people call assets singular random variables instead of joint variables, but they are equivalent.See also: Probability mass function for events, joint density function for joint variables, conditional probability of individual variables given joint variables, conditional expectation of individual variables given joint variables.

I just let it run with that last one lol… GQA’s based on sets of stackexchanges answers likely hold a lot of promise, I think.

Code: https://gist.github.com/M49ICKPIxi3/9b6134c0d7a12e0b7ee886f490244006

--

--

Writer, Software Engineer, NLP Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store