4 comments

[ 3.7 ms ] story [ 22.7 ms ] thread
So, I guess this is the inevitable conclusion with LLMs. Connect them to a real terminal and let them act on real-world objects... I honestly don't know whether I like the idea or not, but I guess it's good to have this conversation now while it is only a marginally better version of tldr.
I like this grammar hack.

```

grammar = """

Response ::= "Alice\n" (ListOfCmds | SingleNaturalLangResponse)

ListOfCmds ::= (BashCommand\n)+

BashCommand ::= "$ " AnyString

SingleNaturalLangResponse ::= AnyString without $"""

```

I tried regular expressions as well, but BNF grammar seems to work best
I've been playing a ton with making it simulate ransomware attacks. Going to try this :D