News for hackers. Stuff that matters.
Re:Jsonformer: A bulletproof way to generate structured outp... by killthebuddha on Tuesday May 02, 2023 @05:14PM (#35794307)
One thing that I really like about the approach you took with clownfish is that it doesn't constrain or modify the structure of the prompt.

One of the primary difficulties with writing LLM applications is that prompts are basically not composable, and any LLM library that modifies your prompt is going to be a nightmare to work with.

Re:Jsonformer: A bulletproof way to generate structured outp... by killthebuddha on Tuesday May 02, 2023 @05:23PM (#35794407)
Follow-up thought I just had: It seems that prompt structure standards are going to have to emerge if any of these tools have a shot at interoperability. I don't have hard data, but IME if a prompt is structured

MEMORY EXAMPLE INSTRUCTION [COMPLETION]

it will basically not work to wrap it in a prompt that's structured

INSTRUCTION MEMORY EXAMPLE [COMPLETION]

Re:Jsonformer: A bulletproof way to generate structured outp... by ianbutler on Tuesday May 02, 2023 @05:39PM (#35794591)
* * *
Re:Jsonformer: A bulletproof way to generate structured outp... by killthebuddha on Tuesday May 02, 2023 @09:41PM (#35796660)
I think I agree, and am doing something similar as well. Even the adapters approach does require some amount of consistency across prompts. For example, if you have one prompt that says “you are a very helpful assistant” and one prompt that says “you are a very lazy assistant”, then even if those prompts are otherwise written to be as orthogonal as possible you will still probably see degradation in completion quality.
Re:Jsonformer: A bulletproof way to generate structured outp... by newhouseb on Tuesday May 02, 2023 @10:20PM (#35796954)
I haven't spent time going deep here but my current hypothesis is that interoperability will more or less end up looking like toolformer where the "tools" are just separate LLM runs with task-specific context. So for example:

> Instruction: Write a poem and them emit a structure that follows a schema named X.

> Completion: [map-schema X "roses are red, violets are blue"]

Conceptually this is basically just a function call where context is local to the function.