Logic

Children

Related:


OpenAI can perform some logical reasoning although it doesn't not do well with symbolic logic. [EOP] denotes end of prompt.

Zero-shot

Reasoning

0 shot simple reasoning can work

Q: All cats are black. Jim has a cat. What color is his cat?
A:[EOP] His cat is black.

However, the wording can trip it up. For example, if we say cats can be multiple colors and ask it something it doesn't know, it guesses.

Q: Some cats are black. Some cats grey. Jim has a cat. What color is his cat?
A:[EOP] Jim's cat is grey.

Asking about multiple colors it just guesses again:

Q: Some cats are black. Some cats grey. Jim has a cat. What colors are his cat?
A:[EOP] Black and grey.

We can fix this by asking what it could be:

Q: Some cats are black. Some cats grey. Jim has a cat. What colors can his cat be?
A:[EOP] Black or grey.

It can even recognize exclusions:

Q: All cats are black. Jim has a green animal. Can Jim own a cat?
A:[EOP] No, because all cats are black.

Replacement

It can use variables to replace things.

Q: A is 1, C is 2, B is 3. What is A + B?
A: 1 + 3 = 4

Algebra

It can solve simple equations. E.g.

Q: X+1=4
A:[EOP] X=3
Solve for X: X+25=90. X=[EOP]65.

However, formatting mattes; it will fail on doing it in one line

X+1=4. X=[EOP]1.

If also fails on larger numbers

Solve for X: X+55=215. X=[EOP]70.

Failures:

Complex clauses

It's unable to do numbers/complex before/after. e.g.

Q: The day after tomorrow is Friday. What day is today?
A:[EOP] Today is Thursday.

However, it still gets the day before Thursday correct when feeding the prompt back in

Q: What day of the week came before today?
A:[EOP] Yesterday was Wednesday.

Few-shot

Unsolved

Symbolic Logic

So far, no prompts work well.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License