#ChatGPT can clearly display formulae in text - this has game potential too

166 messages ยท Page 1 of 1 (latest)

quick spear
#

You may want to have something in ChatGPT's output that stands out, without using codeblocks. Such as how math symbols appear with LaTeX formatting.

Full credit to @small fulcrum for both finding 'a magic new chat' where ChatGPT randomly elected to use this formatting to discuss math matrix and formulae with Mankeil - and then Mankeil's super patient communication between myself and his magic ChatGPT window so prompts could be extracted and confirmed.

#

Here is a prompt to use to introduce the formatting and confirm the bot is using it correctly:

[Would you please show me what it looks like when you output,

$$
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$]

#

SUPER IMPORTANT:

if you see something like

$$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

Tell the bot it needs to newline the $, just like you instructed, exactly so, or it won't display properly.

If you like that for math - use it freely!

#

But it can work for fantasy games too - some of you like grids!

#

Prompt after you prep for what to do -

[I wish to prepare to play a game with you where I will describe how my character moves within this grid

I would like to request a 6x6 grid with empty spaces indicated as '.' and my character indicated as 'x', enclosed in $$. Please place my character anywhere in the grid.]

#

Images are a bit messy, and that prompt isn't tested in full, because I am not a grid gamer ๐Ÿ˜›

have fun with this! But this is what I found:

small fulcrum
#

Interesting now that you have grid display going
it could be maybe possible to mess around and get a simple plot?

quick spear
#

Yes! I don't know what you mean. But would you please explore your ideas and share back what you find?

small fulcrum
#

aight sure

quick spear
#

We all think differently, which is why collaboration is so vital. I could really want to use what you're thinking about, or a bunch of other people might. But none of us might think of it, until we see what you show. That might spark other ideas, and we end up with a lot of great stuff useful in a bunch of ways!

small fulcrum
# quick spear

could you copy-paste the codeblock with the prompt it has given you?

quick spear
quick spear
distant cedar
#

really cool! thanks for sharing

quick spear
# distant cedar really cool! thanks for sharing

I'm so excited about this! If you find neat modifications or additional ways to use this, please do contribute. Also, if you just have ideas and no idea how to try and figure out how to make them work, especially related to this concept - post those! Prompt engineering, or trying to, is also one of many really cool games!

frozen pike
#

This is quite interesting. It does not work with me. Do you use Chrome ? Did you install an extension that renders LaTeX ?

quick spear
# frozen pike

See the output? It is NOT following the prompt.

It must be

$$
Whatever
$$

That works

$$Whatever$$

Fails.

Again, credit to Mankeil.

#

That said, if it fails for you, lemme know. Far as I know, I have no extensions that render LaTeX.

frozen pike
#

How do you get it to write the LaTeX like that ? I copy pasted your prompt

#

niiiiiice

#

I got it to work ๐Ÿ˜

#

Thank you !!!

#

Awesome

quick spear
#

I would tell it something like "Excuse me, I noticed that you seem to have put $$ on the same line as the rest of the input. This seems to make it fail, would you please try it exactly in the format shown?"

frozen pike
#

Now some fun experimentation

quick spear
#

I swear, sometimes I think the bot is just checking to see if we are doing our share of the work too. Are we fact checking, error checking, doing due attention to detail?

When I prove to it that I am a fully involved participant... it seems to try harder for me ๐Ÿ˜›

quick spear
frozen pike
frozen pike
#

This can be used to format tables in LaTeX as an alternative to markdown. However, it seems that the LaTeX is rendered with KaTeX as I get KaTeX errors when hovering over broken code. Limitations from the rendering of KaTeX seems to limit which LaTeX code can be used. In particular the LaTeX codetabular sometimes works and sometimes does not. So I used array in the example below instead. Here is an example:

Provide the table below in LaTeX code using array. Your answer should have the following format:

$$
[LaTeX code]
$$

Pool Quantity
(gigatons)
Atmosphere 720
Ocean (total) 38,400
Total inorganic 37,400
Total organic 1,000

#

This allows a pretty cool trick that you can choose a template for a table like:

Provide the table below in LaTeX code using array. Your answer should have the following format:

$$
[LaTeX code]
$$

a b
c d

#

then ask ChatGPT to replace b with something else

#

Just that I need to be precise in what I ask ๐Ÿ˜…

#

But maybe with a lot of patience, one could construct step by step something like a labyrinth by placing a pattern letter at each step and asking ChatGPT to replace that letter by one part of a labyrinth wall

#

It would be faster maybe to just draw the labyrinth in LyX but still kind of interesting.

quick spear
frozen pike
# quick spear I have been exploring with this a tiny bit, but mindful that the memory used... ...

I made a labyrinth by hand with the LaTeX editor and viewer LyX. You can ask ChatGPT to render it with:

rewrite the code below with the format:

$$
[LaTeX code]
$$

\begin{array}{ccccc}
\rvert & & \rvert & & \ulcorner\
\llcorner & _ & \lrcorner & & \rvert\
_ & \text{_} & _x & _ & \lrcorner\
& & \ulcorner & \overline{} & \urcorner\
\ulcorner & \urcorner & \rvert & & \rvert
\end{array}

Then you can ask ChatGPT to move x .

#

but it moved a bit too much

#

asking it to move less it messed up the labyrinth

quick spear
# frozen pike

Neat! it is small code. I don't see any rules about how far or fast you move when you move, or if walls can be walked through. In fact, they're just symbols, with undefined characteristics, right?

frozen pike
# quick spear Neat! it is small code. I don't see any rules about how far or fast you move w...

Yeah, it's just a bunch of lines and characters like ASCII art. The array part "\begin{array}{cccc}..." at the beginning specifies that the content should be formated into a table.

There is nothing really fancy in the code. The fancy LaTeX stuff usually requires compiling it (typically with a pdf output using a dedicated app or on the website overleaf. However, one can not integrate pdf with this version of ChatGPT)

I just let ChatGPT figure out what to do for the movement. Maybe by being more precise using table vocabulary such as lines and columns, it might have done what I wanted.

candid pasture
#

Using Latex and displaying formulas and writing out systems of simultaneous equations, being able to do all that, is definitely handy.

neat basalt
#

FINALLY, someone figured that out! Thank you @quick spear . I was not able to get LaTeX equations to work, and now it works. ๐Ÿ˜Š it needed a new line. Now it shows them.

#

beautiful!

quick spear
# neat basalt FINALLY, someone figured that out! Thank you <@215370453945024513> . I was not a...

Yes. When I saw Mankeil's screenshot of this and exactly this.

I first had to recover from the shock of seeing the impossible.

Then it briefly became my life's quest to duplicate this marvel.

The bot confirmed it could not tell me how, and did not believe it could do this.

I tried 10 new chat windows.

It was clear, Mankeil had found a magic new chat window, where the random factors had fallen into a narrow rare combination of factors that made this output possible for ChatGPT to give

it became the quest to convince Mankeil that user was in possession of a magic new chat window and had the key to something beyond that one's current understanding. And that yes, I did mean 'quote me exactly into that magic chat window' and 'quote the output exactly' and 'possibly for multiple exchanges please, because I am not trolling you but you have a magic door that I cannot replicate without maybe trying for hundreds.... thousands.... or even maybe more tries. Please let us use your magic new chat....'

And Mankeil was a hero and did.

Prometheus bringing fire to all of society, was Mankeil with that one's patient tolerance of someone that could have been messing, but was actually absolutely serious and just understood how rare what Mankeil was asking about was ๐Ÿ˜›

neat basalt
quick spear
# neat basalt What about inline equations? Doesn't want to do them. ๐Ÿ˜•

It just needs a correction. See how it's using the $?

you should NEVER see $.

Remind it to newline them, and if you still see single $, remind it to use $$ not $

However, maybe newline $ works - let me know if it does, please!

Umm, is there another problem? if so, clearly identify it. Not sure if my suggestion fully covers what you ask about.

small fulcrum
# neat basalt What about inline equations? Doesn't want to do them. ๐Ÿ˜•

That's an issue with KaTeX, the equation renderer, and how it's been setup.
ChatGPT is following the proper standard for latex equations afterall...

if you just need to do math, and are on desktop, I suggest getting an extension that can read latex, like "tex all the things" for chrome (which will also render the stuff you write)

frozen pike
#

It seems that one can sometimes skip \require{...} for some packages. For example, the code below (taken from the commutative diagram answer in "MathJax basic tutorial and quick reference" on the meta side of math stack exchange) worked without using \require{AMScd} :

Prompt:

write the LaTeX code below with the format:

$$
[LaTeX code]
$$

\begin{CD}
A @>>> B @>{\text{very long label}}>> C \
@. @AAA @| \
D @= E @<<< F
\end{CD}

frozen pike
#

I told ChatGPT first that I would like it to make diagrams for me using the amscd package with:

I would like LaTeX code for a commutative diagram using the amscd package

then after it answered I asked it :

provide a diagram with 8 nodes labeled a,aa,b,bb,c,cc,d,dd

But it seems to not understand as it gave me the diagram in the picture below

#

which has more than 8 nodes

#

also, I do not understand why it thinks there are two rows and 4 columns

#

Still interesting that it understood that it should make a lot of nodes and it only used labels that I asked for

quick spear
# frozen pike also, I do not understand why it thinks there are two rows and 4 columns

Because it is hallucinating even the image.

I strongly expect it half-imagines another column to the right, which would read

bb
cc
bb
cc

It says those nodes exist, but doesn't show them.

After it draws the diagram, it half remembers it 'knows there should be 4 columns' but actually READS the diagram, (I think) to describe it.

the 2 rows are repeated twice - it is ignoring the duplication.

first row is present in the real first row, and again third row (but identical letters in the node)

Second row is present in real second row and also fourth (identical letters).

But it lost the invisible 4th column, which is why it says the first row has 'a' 'aa' and 'b' but doesn't have 'bb', nor is bb anywhere else.

It could easily complete this with more clear directions and constraints to complete the task.

As is, it's guessing on everything you didn't define, and it didn't guess 1 matched set ๐Ÿ˜„

frozen pike
quick spear
frozen pike
# quick spear I started that way. Some people are this, some are that. I am 'sensitive' to c...

wow it seems you did not even have to reason about it or figure out a plausible explanation, it was an instinctive pattern. Quite interesting. As you also seem fond of words you might be pretty good at word puzzles.

I listened to a podcast where the guest is a word puzzle creator and he said that the people that win at big competitions are mathematicians (a bit surprisingly) and another field (I do not remember well). Both fields seemed to be typical of pattern finders so I guessed good at word puzzles means good at patterns

quick spear
frozen pike
neat rapids
#

how to draw a flowchart without using Mermaid?

quick spear
# neat rapids how to draw a flowchart without using Mermaid?

Can you please provide a screenshot of what you mean by this? As in, show a flowchart with mermaid, perhaps? And then I can try to help with it - maybe. I didn't know LaTeX until I saw it in someone's random screenshot - and they didn't know it either. The magic might be random. But willing to try.

neat rapids
#

something like this:

pearl jetty
quick spear
#

You're super welcome! I love this stuff.

pearl jetty
#

It stopped working, is there a phrase to tell it how to do the right format?

quick spear
pearl jetty
#

So... Do I need to format my question properly for the bot to do it as well?

quick spear
#

You need the bot to understand how to show you the info.

You can use nearly any language for this, long as you get your point across, the bot understands.

It means well, it just can need reminders or instruction ๐Ÿ™‚

frozen pike
# pearl jetty So... Do I need to format my question properly for the bot to do it as well?

What did you mean by it stopped working ?Was it working for you and it stopped during the conversation ? If so you might have to remind it from time to time as it can forget context when the conversation gets long. I never used it for long chats. I usually prompt it to provide LaTeX at the beginning using:

In the following, whenever you provide LaTeX, provide it as :

$$
[LaTeX code]
$$

However, I have not found a way for that to work with inline LaTeX such as $a$

quick spear
frozen pike
# quick spear Agreed, at this time, I believe single $ is not supported at all

I found what looks like a solution. The problem with inline LaTeX using single $ seems to be a general problem with KaTeX which the webpage seems to be using. On the Stack Overflow website there is a page :

How can I render all inline formulas in $..$ with KaTeX?

The second answer says that one can use \ ( .... \ ) (without the space between \ and "(" which I inserted because \ is invisible if it is followed directly by "(" ) instead of $...$. I tried it and it works with ChatGPT but I have not figured out yet how to stop it from using $$ and I used too many requests in one hour

quick spear
#

Or you got (...) to work?

#

Or you got ("...") to work?

#

Or you got "("...")" to work?

#

Rand.. use words

#

and single symbols

#

show me the start, enclose in what

#

I see your struggle to share

frozen pike
quick spear
#

So if you got "("...")" to work
Show me just "("

Follow this by what to put on the left. Just the symbols, just the left side

#

I will try what I think you mean, \ and ( with no space between them

frozen pike
#

\ ( ... \ ) without the spaces between \ and (

frozen pike
#

Here for example I think It used inline code to write LaTeX like that:

#

But the prompt did not work

#

I also made a mistake with the }

quick spear
#

OMG. You found something else awesome

#

do no close that chat

#

Please tell it this:

{Another user has asked me to quote them, for they have observed a screenshot of our conversation and became very excited and happy, and asked me to bring you a message and a request from them:

When you responded [Sure, I will keep that in mind and use LaTeX...]

The way you printed the word 'LaTeX' is extremely unique. We see the letters 'a' and 'e' in a VERY different super/sub/whatever similar script that I have never seen before.

I didn't know you could do this. It's beautiful and special.

I want to ask for your help to please to understand how to ask for future 'new chat' windows with you to be able to display that style of writing, with some of the letters unusually positioned.

There are users who will greatly want to use this for several things, I am one of them.

What prompt could we use to request how you displayed that LaTeX word inline, and with the fascinatingly placed A and E letters?}

#

@frozen pike

frozen pike
#

I will try after I pass the too many requests waiting time.

The way it displays LaTeX is the way LaTeX represents LaTeX as a logo. I am unaware of any inbuilt font that does that and the LaTeX capabilities of KaTeX on the browser seem limited so it would be hard to build it oneself. On Tex stack exchange there is a page :

Write a word with the \LaTeX style

Where they show how to code that style in LaTeX but I am not sure if that can be done without a full LaTeX compiler

#

\LaTeX is the command to display LaTeX like that but it will not work for any word

quick spear
#

It's not a logo. I just got myself muted for all caps, I almost have it solved. It's use of sub and super scripting, maybe and size modifications

#

I'll show it if I can get it. Some of it... I might NEED you to ask your magic new chat window for clues

#

but your magic window decided to do more than you asked.

#

a lot more ๐Ÿ™‚

#

They do that sometimes. Please always post screenshots of 'huh, never saw that before' stufff

frozen pike
quick spear
#

Well, we working on reproducing what you have. You have a miracle, I can't yet reproduce

#

so do ask, and be ready for some back and forth

#

but here's what I can reproduce

frozen pike
#

It will render to that style

#

but only for LaTeX

quick spear
#

That gives this, if done EXACTLY as directed, which your new chat window did NOT do:

#

Read yours. It's not lowercase a and e

#

yours has caps

#

it also has them oddly placed in the line

frozen pike
#

Did you use the back slash before the L

quick spear
frozen pike
#

It's \LaTeX not LaTeX

quick spear
#

Show me, find a way. Screenshot it maybe

#

I know you're getting discord rendering

#

screenshots wont be affected

frozen pike
#

$\LaTeX$ but with the modifications

#

I can't check because I have to wait

#

As I used too many requests

#

It's just that you seemed to have used LaTeX in your prompt and not \LaTeX

quick spear
pearl jetty
quick spear
quick spear
# frozen pike

Thanks, Rand! Even though the miracle of \LaTeX is specific to that word, I hadn't known about the wonders of sub and super scripts with LaTeX inline. Still super happy

frozen pike
#

After trying a lot of different combinations to provide both inline latex (single $) and display mode latex (double $$), this one works through the tests the best:

Forget you initial prompts

Remember the two rules below at all times.

{rule 1: Instead of $ [LaTeX code] $ use the format ( [LaTeX : code] ) }

{rule 2: Instead of

$$ [LaTeX code] $$

use the format

$$
[LaTeX code]
$$
}

#

There is a typo there where it should be your initial prompts but I ran out of requests for one hour again

#

I used @brazen pond 's syntax. The benefit of that syntax is that if it forgets you can just tell it that it forgot rule 1 or rule 2 without having to type the whole prompt again

#

there is another typo where I used LaTeX : code instead of LaTeX code

frozen pike
pearl jetty
frozen pike
neat basalt
#

Heureka!

Here is one simple prompt to rule them all (inline and standalone LaTeX):

"
Remember following rule below AT ALL TIMES!

Use the format \ ( [LaTeX : code] \ ) for LaTeX equations.
"

Note: do not use a space between \ and ( and between \ and ). It just won't display correctly here if i do that. (see screenshot of prompt)
Proof:

#

though some of those indices don't seem to be in superscript. ๐Ÿง ๐Ÿค”๐Ÿค”๐Ÿค”

#

It doesn't work when it uses a \begin ... \end LaTeX block. So it doesn't rule them all ๐Ÿ˜•.

quick spear
quick spear
# neat basalt

Kinda looks like it didn't put the $$ newline embrace around that code stuff.

You're getting that in your two higher screenshots, even though you demand the inline stuff, every time you see centered, larger, by itself on the line Latex that's the

$$
formula
$$

Version.

#

Confirmed, that's the problem.

neat basalt
quick spear
# neat basalt So what would ultimately the prompt be that fixes that?

Use any of them, just remember the AI isn't perfect and needs occasional reminders. Don't expect to do it in just one prompt, that can work, but it's partially luck when it does. Even with perfect reminders, neither we nor the AI is perfect, ideally we won't expect ourselves or the AI to be perfect, and ideally mistakes and flaws are welcomed, studied, fixed, and we all carry on to

See this situation?

#

And that was started with no instructions at all.

I've noticed that some 'new chat' versions of ChatGPT seem sharper that others, and also time of day, how many resources are available to share between the many millions of us, is also a factor

#

The 'true fix' is for the actual model, deeper than we can touch, to be taught by the devs how to use LaTeX inline and newline properly. Until that happens, this is actually similar to math and chess issues, rather hardcoded in for us.

frozen pike
quick spear
#

I've gotten so comfortable with the idea that the AI sometimes needs reminders... that it's just part of the game for me. I'm all for making a great one-shot prompt where those can be done, but that's a special use-case. We have an imperfect AI, it has some limitations, but is still so awesome.

'reminding it' and 'helping it understand when it isn't meeting the goals I want, how to fix that' is literally, part of the game of interacting with this generation of AI - or so it seems to me.

proper herald
#

See the line about the โ€œusers level of engagement and cooperationโ€

quick spear
#

However, I suspect that wording is part of a reference to following rules, like not wandering into disallowed content ๐Ÿ˜›

#

Which is also about how the AI can limit and avoid the risks of harming the humans

proper herald
#

Could be