#SudoLang Prompt Generation
35 messages · Page 1 of 1 (latest)
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.
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
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.
I was trying to do this with 'json' before, but I didn't find it reliable. Ill have to try it with SudoLang.
so something like this?
"""
< your prompt here >
""" |> transpile(SudoLang, style="concise, declarative, favor AI inference over detailed instruction")
I've been trying to learn sudolang to no avail, will you be making a prompt that can convert a prompt to sudolang?
This will be a thing eventually. The AI models are not quite good enough to to do a great job of this yet, but they will be.
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?
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.
how can i use this ?
Google "Anatomy of a SudoLang program" or ask Bing Chat
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)
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 ?
Ive been told that they typically dont need (most of) the specification
This is usually caused by forgetting the preamble or by mentioning SudoLang or both. Google "Anatomy of a SudoLang Program"
Correctly written SudoLang programs work without the spec.
thanks
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."
preamble? can you give an example of what a preamble would look like?
Google "Anatomy of a SudoLang program"
did you try a tree of thought implementation in sudolang ?
sometimes the assistant repeats some preprompt lines in the output, how to avoid that ?