#SudoLang Prompt Generation

35 messages · Page 1 of 1 (latest)

sonic current
#

Here's one for you that @cyan cargo will appreciate. This works in GPT-3.5 as well.

<Paste the entire SudoLang spec from the github sudolang.sudo.md>
"""
Rewrite this in SudoLang
"""
<The instructions you want to make a prompt from>
"""
SudoLang

#

the part at the end is only needed for GPT-3.5. GPT-4 doesn't need that lead-in to coach it.

torn tartan
#

mmm

#

tyty.

sonic current
#

I used the most common question in here for a proof of concept. I made a tutor

#

GPT-4 is much better at this task, as well. GPT-3.5 might take a few regenerations to get a good one.

#

What's really cool is that GPT-3 is just fine at following SudoLang, writing it is where it struggles.

#

SudoLang Prompt Generation

cyan cargo
#

I have noticed that both GPT-3 and GPT-4 need help writing SudoLang. Hints: Use the "length=concise" modifier and explicitly instruct it to tell you the SudoLang style guide before asking it to produce SudoLang code.

#

One thing I find very useful is to ask the AI to transpile from SudoLang to natural language. It's like a sanity check to make sure you're expressing your intent clearly in SudoLang. I frequently find and fix bugs in my SudoLang prompts this way.

torn tartan
cyan cargo
prime beacon
cyan cargo
hidden sedge
#

Ive heard sudolang mentioned a few times. What is sudolang?
I looked it up, but I think I am misunderstanding: sudolang can be used with no prompting, it "supports" various operations, has slash commands, requirements that "always" throw errors?

So is sudolang just a "way" to write your prompts in a more algorithmic way? Or is it a program we put "sudolang" code into and it interfaces with an API and does a bunch of work for us?

cyan cargo
#

SudoLang is a way of writing prompts in a more structured, declarative way (as opposed to algorithmic). It is a language with support for code-like block scopes, with an emphasis on natural language constraint-based programming, interfaces, declared state, and composition. It relies heavily on natural language, which makes it easier to read and learn than languages like JavaScript and Python, while also being more expressive and powerful.

It improves on natural language prompts in a few ways:

  • Clear scoping
  • State declarations help the AI build a program model to reason
  • Interfaces help the AI understand how you want to interact with the program, including optionally typed data structures to communicate with languages like Python and JavaScript.
  • Can save 20% - 30% tokens vs natural language, for complex prompts.
cyan cargo
#

Warning: Bing Chat and ChatGPT hallucinate a lot about SudoLang and will likely continue to until newer models are trained with newer information (SudoLang was created AFTER the training cutoff dates)

tepid root
#

thanks

#

looks like GPT4 is having some troubles understanding sudolang without specification

#

otherwise its awesome

#

the specification is 3387 tokens long, is there any shorter version ?

hidden sedge
#

Ive been told that they typically dont need (most of) the specification

cyan cargo
cyan cargo
cyan cargo
#

ChatGPT on the importance of SudoLang preambles: "This part of the program is crucial because it gives the AI a clear understanding of what it is expected to do. It's like a brief for the AI, guiding it in the right direction."

hidden sedge
#

preamble? can you give an example of what a preamble would look like?

tepid root
tepid root
#

did you try a tree of thought implementation in sudolang ?

tepid root
#

sometimes the assistant repeats some preprompt lines in the output, how to avoid that ?