You are viewing archived messages.
Go here to search the history.

Jarno Montonen 2024-07-29 11:42:13

Did an experiment on improving LLM accuracy with Structured Generation using my stuff: linkedin.com/posts/jarnomontonen_improving-llm-accuracy-with-levlo-languages-activity-7223648019051626497-Ow0i

Marek Rogalski 2024-08-03 17:18:51

Cool stuff. Reminds me of github.com/ggerganov/llama.cpp?tab=readme-ov-file#constrained-output-with-grammars . I've used it to generate some scenarios for RPG games with friends. One issue that I've encountered (ignoring overabundance of tropes) was that the model was sometimes very uncooperative and refused to progress through the given template. Instead it got stuck in some place where it was free to generate arbitrary text and just happily stuttered around, never reaching the end. Have you encountered this? If so - what's your solution?

Jarno Montonen 2024-08-04 19:02:11

Thanks and interesting use-case! Yes, there are several solutions for structured/constrained/guided generation, but all of the ones I've seen base the structure validation either on regex or context-free grammars. I can do context-sensitive grammars and semantic rules. Say you want to generate RPG character attribute values between 4-18, but the sum should be based on the level of the character. I don't think the solutions I've seen offer good support for something like that, but it would be fairly trivial with Levlo.

I haven't really tried structures with free arbitrary text beyond just generated names, but I would imagine either prompting the LLM to only generate arbitrary text of certain length (as in "a paragraph", "couple sentences") or using appropriate length in samples would work. Have you tried? I suppose a potential challenge could be to make the LLM understand which part of the structure you mean with the length instructions in prompt, but I would be surprised if a dozen or so samples wouldn't work. Although, maybe the samples would end up directing the content of the arbitrary text too much as well..

Jarno Montonen 2024-08-04 19:18:27

Also, I'm very interested in hearing about use-cases people have had for structured generation and the challenges you've had with the current solutions. So thanks for sharing @Marek Rogalski!

Marek Rogalski 2024-08-04 20:19:44

Actually some better prompting might have been the way to go... I was rewriting the whole scenario with LLM over many iterations (leaving the PC overnight) and sometimes it was randomly looping somewhere in the middle of text. I guess that shorter, maybe section-by-section prompts could prevent that... I've tried the grammar-based approach to limit the length but the issue there was that the model sometimes planned out the text for more sentences than the grammar permitted. This resulted in truncated descriptions.

Jarno Montonen 2024-08-05 05:23:39

but the issue there was that the model sometimes planned out the text for more sentences than the grammar permitted

Yeah I can see this being a problem

Declan 2024-07-31 17:46:33

I'm getting ready to release some actuarial models and outputs that use calculang.

So I made an interactive post to introduce some terms actuaries use: calcwithdec.dev/posts/actuarial-terms-i

John Christensen 2024-07-31 21:39:29

Here's my work in progress node-and-wire system. It's specifically targeting signal processing related work.

Here, data is all passed between nodes as 1D arrays, so the plots just have the x-axis hardcoded for now. I'm not sure if a pair of x/y array's should be passed together on a single wire, or if they should be passed separately for the most flexibility.

image.png

Ivan Reese 2024-07-31 21:51:40

I'm not sure if a pair of x/y array's should be passed together on a single wire, or if they should be passed separately for the most flexibility

For some reason this made me think of twisted-pair wiring.

Kartik Agaram 2024-07-31 21:52:15

@John Christensen, you and Tom Lieber should talk. See alltom.com/pages/ppl-lab-notebook

John Christensen 2024-07-31 22:31:55

Ivan Reese Twisted pair wires sounds like a nice visual metaphor! And a fun svg rendering puzzle to figure out

John Christensen 2024-07-31 22:34:48

Kartik Agaram Tom Lieber ooh those are some really unique/elegant visuals

Joshua Horowitz 2024-07-31 23:31:28

I really like the aesthetics you’ve picked for the interface. Everything has a tasteful, low-key, LaTeX-adjacent vibe. I don’t think I’ve seen that done!

(I guess PANE is sorta in that direction? But not in the same way.)

John Christensen 2024-08-01 00:53:26

Joshua Horowitz thanks! I'm trying to go for an interface somewhere between a physicist's white board, and an immaculate TikZ figure.

I appreciate the comparison to PANE, I hadn't come across it yet. I'm always interested in finding better ways to make data visible by default, and PANE has some really cool ideas to draw from!

Nilesh Trivedi 2024-08-01 13:17:32

I will try to reproduce these two papers that suggest program synthesis (eg: inducing new tactics) for AI to solve math problems or the ARC-AGI puzzles:

There's a quite a bit of new math/ML/programming for me to learn here.