# Puzzle for human user and their ChatGPT-3.5

I need to see if it is possible for humans and their AI Assistant (text-davinci-002-render-sha) to find a solution to this puzzle. I want to try to give as few information as possible but given 6 specific TypeScript types I want the AI to determine the relationship between them and place it in a grid.

I am asking the community to see if it is possible to achieve this task with the lower AI (not using ChatGPT-4) I would love to see the shortest way to get the AI to accomplish the task what makes it impossible for me (unless I give a longer an more detailed prompt) is that the answer require the AI to find relationship on two axes and it seems that the AI is completely unable to achieve this with very simple instructions one of which is to have no empty cells.

At least for you humans it should be evident that if a group of 6 items must be placed into a grid only 4 shapes are possible 1x6, 6x1, 2x3, and 3x2. Then given that the group of 6 type have 2 sets of relationships it implies that the grid now can only be 2x3 or 3x2 keeping in mind that no cell should be empty.

So the complication is that the AI must infer on two orthogonal axes and it requires me so far to make a non trivial prompt. I am curious therefor to see is someone can come out with a really short prompt.

Given 6 TypeScript types that have relationships with one an other, organize the following six types into a table following the instructions:

• Each cell contains exactly one type.
• No cell should be left empty.
• There should be as many cells as there is types no more no less.
• Each type must by used exactly once.
• Each row should outline one type of relationship between each types in that row.
• Each column should outline one type of relationship between each types in that column.
``````  Settled<TVal>
PromiseSettledResult<TVal>
SettledRight<TVal>
PromiseFulfilledResult<TVal>
SettledLeft
PromiseRejectedResult
``````

If anyone can guess what are the relationship and can determine the shortest prompt to get the AI to meet the requirements the prompt above gave me this result I will let you be the juge as if the AI met the requirements (because the AI is not impartial as you can see below):

Column 1 Column 2 Column 3
Row 1 Settled<TVal> PromiseFulfilledResult<TVal> PromiseRejectedResult<TVal>
Row 2 SettledLeft SettledRight<TVal>
Row 3 PromiseSettledResult<TVal>

I like a good challenge So here’s GPT-4’s solution. First the prompt:

``````goal:
Given 6 TypeScript types that have relationships with one an other, organize the following six types into a table.

rules:
- Each cell contains exactly one type.
- No cell should be left empty. Don't fill in cells.
- There should be as many cells as there is types.
- Each type must by used exactly once.
- Each row should outline one type of relationship between each types in that row.
- Each column should outline one type of relationship between each types in that column.

Types:
Settled<TVal>
PromiseSettledResult<TVal>
SettledRight<TVal>
PromiseFulfilledResult<TVal>
SettledLeft
PromiseRejectedResult

steps:
- Identify the types that have a direct inheritance or subtype relationship, and group them together in rows or columns.
- Identify the types that have a union or intersection relationship, and group them together in rows or columns.
- Identify the types that have a generic or parameterized relationship, and group them together in rows or columns.
- Arrange the rows and columns in a way that maximizes the number of relationships that are captured by the table. Show the table.
- How many empty cells are there?

State each step and show your work for performing that step.

1: Identify the types that have a direct inheritance or subtype relationship, and group them together in rows or columns.
``````

And then it’s solution:

``````- We can see that SettledRight<TVal> and SettledLeft are subtypes of Settled<TVal>, as they are defined as follows:

type SettledRight<TVal> = Settled<TVal> & PromiseFulfilledResult<TVal>;
type SettledLeft = Settled<never> & PromiseRejectedResult;

- We can also see that PromiseFulfilledResult<TVal> and PromiseRejectedResult are subtypes of PromiseSettledResult<TVal>, as they are defined as follows:

type PromiseFulfilledResult<T> = {
status: 'fulfilled';
value: T;
};

type PromiseRejectedResult = {
status: 'rejected';
reason: any;
};

type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;

- Therefore, we can group these types together in rows or columns, such as:

| Settled<TVal> | SettledRight<TVal> | SettledLeft |
| PromiseSettledResult<TVal> | PromiseFulfilledResult<TVal> | PromiseRejectedResult |

2: Identify the types that have a union or intersection relationship, and group them together in rows or columns.
- We can see that SettledRight<TVal> and SettledLeft are defined as intersections of Settled<TVal> and PromiseFulfilledResult<TVal> or PromiseRejectedResult, respectively.
- We can also see that PromiseSettledResult<TVal> is defined as a union of PromiseFulfilledResult<TVal> and PromiseRejectedResult.
- Therefore, we can group these types together in rows or columns, such as:

| Settled<TVal> | SettledRight<TVal> | SettledLeft |
| PromiseSettledResult<TVal> | PromiseFulfilledResult<TVal> | PromiseRejectedResult |

3: Identify the types that have a generic or parameterized relationship, and group them together in rows or columns.
- We can see that Settled<TVal>, SettledRight<TVal>, PromiseSettledResult<TVal>, and PromiseFulfilledResult<TVal> are all generic types that take a type parameter TVal, which represents the value of a fulfilled promise or a settled right.
- Therefore, we can group these types together in rows or columns, such as:

| Settled<TVal> | SettledRight<TVal> | SettledLeft |
| PromiseSettledResult<TVal> | PromiseFulfilledResult<TVal> | PromiseRejectedResult |

4: Arrange the rows and columns in a way that maximizes the number of relationships that are captured by the table. Show the table.
- One possible way to arrange the rows and columns is as follows:

| Settled<TVal> | SettledRight<TVal> | SettledLeft |
| PromiseSettledResult<TVal> | PromiseFulfilledResult<TVal> | PromiseRejectedResult |

- This table captures the following relationships:
- SettledRight<TVal> and SettledLeft are subtypes and intersections of Settled<TVal>.
- PromiseFulfilledResult<TVal> and PromiseRejectedResult are subtypes and unions of PromiseSettledResult<TVal>.
- SettledRight<TVal> and PromiseFulfilledResult<TVal> are subtypes and intersections of PromiseSettledResult<TVal>.
- SettledLeft and PromiseRejectedResult are subtypes and intersections of PromiseSettledResult<TVal>.
- Settled<TVal>, SettledRight<TVal>, PromiseSettledResult<TVal>, and PromiseFulfilledResult<TVal> are generic types that take a type parameter TVal.

5: How many empty cells are there?
- There are no empty cells in the table, as each cell contains exactly one type, and each type is used exactly once.
``````

GPT-4 came up with the plan for solving the puzzle. I just tweaked its plan a bit.

And here’s the solve from `text-davinci-003`:

``````Settled<TVal>  |  PromiseSettledResult<TVal>  |  SettledRight<TVal>
---------------------------------------------------------------------
SettledLeft    |  PromiseFulfilledResult<TVal> |  PromiseRejectedResult

2: Identify the types that have a union or intersection relationship, and group them together in rows or columns.

Settled<TVal>  |  PromiseSettledResult<TVal>  |  SettledRight<TVal>
---------------------------------------------------------------------
SettledLeft    |  PromiseFulfilledResult<TVal> |  PromiseRejectedResult

3: Identify the types that have a generic or parameterized relationship, and group them together in rows or columns.

Settled<TVal>  |  PromiseSettledResult<TVal>  |  SettledRight<TVal>
---------------------------------------------------------------------
SettledLeft    |  PromiseFulfilledResult<TVal> |  PromiseRejectedResult

4: Arrange the rows and columns in a way that maximizes the number of relationships that are captured by the table. Show the table.

Settled<TVal>  |  SettledRight<TVal>  |  SettledLeft
---------------------------------------------------
PromiseSettledResult<TVal> |  PromiseFulfilledResult<TVal> |  PromiseRejectedResult

5: How many empty cells are there?

There are no empty cells.
``````

And as I somewhat suspected `gpt-3.5-turbo` can’t solve at all…

A key observation here is that I had GPT-4 work out the strategy for solving the puzzle and GPT-3 can often execute that plan in a more cost effective way.

I only have access to the ChatGPT-text-davinci-002-render-sha and I have aces to the playground but I wanted to use ChatGPT for that. Also this month I did not pay for the ChatGPT Plus. I would love to find the shortest prompt possible giving the AI (ChatGPT of a lower model) as few information as possible to get the result (but in fact even with a lot of information I have not been able to get exactly what I wanted),

I could have also explained the relationships to my Assistant so that the AI would understand but I got stuck at trying to explain him how to understand by himself and it is why I got into some complexions with complicated prompts to explain how to understand without explaining directly… I did not explained the relation to the types neither in my messages such that either the Human Users infer themselves or something…

I appreciate your input thanks if you have other prompts that you could try on the Turbo or on the text-davinci-002-render models model let me know what is the shortest path to at least get a 6 cell (plus headers maybe) but if you refer to the screenshot I gave clear instructions (in a normal setting I would have probably be giving an example too)…