News for hackers. Stuff that matters.
Re:SudoLang: A Powerful Pseudocode Programming Language for ... by gamegoblin on Monday April 03, 2023 @12:58PM (#35427299)
I've just been using Python "pseudocode" with good success. It's great for getting structured output from GPT3. Works less well with chat-fine tuned models, hopefully openai releases a simple instruct-tuned GPT4 instead of chat-tuned.

For instance, this prompt:

    best_artists = search(year=2014, genre="hip-hop")
    assert(len(best_artists) == 10)
    for i, artist in enumerate(best_artists):
        print(f"{i}. {artist}")

    Stdout: 
Yields this output:

    0. Kendrick Lamar
    1. Drake
    2. J. Cole
    3. Logic
    4. Childish Gambino
    5. Joey Bada$$
    6. Chance the Rapper
    7. Schoolboy Q
    8. Vince Staples
    9. Run the Jewels
Note how the `assert` is used to constrain the output. The `search` method is not defined but what it does is obvious so the LLM hallucinates its output.
Re:SudoLang: A Powerful Pseudocode Programming Language for ... by groby_b on Monday April 03, 2023 @02:36PM (#35429089)
Why? What is wrong with "10 best hip hop artists of 2014, as a numbered list, only names"

I'm not saying your approach is wrong or anything, but I am trying to understand the value you get from it? I get almost the same output, modulo different ranking in the later ranks. (and that'll happening anyways, ChatGPT is deliberately not deterministic)

Re:SudoLang: A Powerful Pseudocode Programming Language for ... by gamegoblin on Monday April 03, 2023 @02:39PM (#35429141)
10 hip-hop artists is just an example here to demonstrate the general principle. You can do much more complicated stuff with nested loops, conditionals, recursion, etc that are very verbose or difficult to express unambiguously in English.
Re:SudoLang: A Powerful Pseudocode Programming Language for ... by groby_b on Monday April 03, 2023 @02:42PM (#35429199)
I believe that, absolutely. I just can't see any examples that exercise this outside of toy examples. (And I have severe doubt LLMs will reliably evaluate those complex examples by themselves. You're better off adding memory and agentic behavior via a formal language wrapper)
Re:SudoLang: A Powerful Pseudocode Programming Language for ... by mncharity on Monday April 03, 2023 @05:57PM (#35431868)
Consistency is apparently one current challenge.[1]

[1] https://news.ycombinator.com/item?id=35416637

Re:SudoLang: A Powerful Pseudocode Programming Language for ... by ericelliott on Thursday April 06, 2023 @02:15AM (#35464801)
I might do something like this in SudoLang:

list top 10 hip hop artists from the year 2014 |> sortBy(chart performance, descending)

Re:SudoLang: A Powerful Pseudocode Programming Language for ... by ericelliott on Thursday April 06, 2023 @02:17AM (#35464821)
This example will probably include detailed justifications. I liked the response, but if you just want rank and name, just say so in natural language.