aickin
Do you have a favorite infra for hosting models?
Do few-shot examples generalize across different LLMs?
We took a prompt from Big Bench and created a few dozen variants of our prompt with different sets of few-shot examples, with the intention of checking whether the best performing examples in one model would be the best performing examples in another model. Most of the time, the answer was no, even when we were talking about different versions of the same model.
The annoying conclusion here is that we probably have to optimize few-shot examples on a model-by-model basis, and that we have to re-do that work whenever a new model version is released. If you want more detail, along with some pretty scatterplots, check out the post!
We took a prompt from Big Bench and created a few dozen variants of our prompt with different few-shot examples, and we found that there was a 19 percentage point difference between the worst and best set of few-shot examples. Funnily, the worst-performing set was when we used examples that all happened to have a one word answer, and the LLM seemed to learn that replying with one word answers was more important than actually being accurate. Sigh.
Moral of the story: which few shot examples you choose matters, sometimes by a lot!
Empirical testing of LLM few-shot examples shows that example choice is crucial
Imaginary programming: implementation-free TypeScript for GPT-powered web dev
/* * This function takes in a blog post text and returns at least 5 good titles for the blog post. * The titles should be snappy and interesting and entice people to click on the blog post. * * @param blogPostText - string with the blog post text * @returns an array of at least 5 good, enticing titles for the blog post. * * @imaginary */ declare function titleForBlogPost(blogPostText: string): Promise<Array<string>>;
Under the covers, we've written a TypeScript and Babel plugin that replaces these "imaginary function" declarations with runtime calls to GPT asking GPT what the theoretical function would return for a particular set of inputs. So it's not using GPT to write code (like CoPilot or Ghostwriter); it's using GPT to act as the runtime. This gives you freedom to implement things that you could never do in traditional programming: classification, extraction of structured information out of human language, translation, spell checking, creative generation, etc.
Here's a screencast where I show off adding intelligent features to a simple blog post web app: https://www.loom.com/share/b367f4863fe843998270121131ae04d9
Let me know what you think. Is this useful? Is this something you think you'd enjoy using? Is this a good direction to take web development? Happy to hear any and all feedback!
Implementation-free TypeScript functions with Imaginary Programming
It's sort of a mind-bending paradigm, but I think it's really delightful to use from a programmer's perspective. Just write out the function name, the arguments that the function takes in, the JSON-compatible type it returns, and a descriptive comment saying what the function should do, and voila. You have yourself a function you can call, and it actually works.
To be clear, this is not the same thing as Github Copilot. Copilot is great at writing code for you, but Imaginary Programming doesn't write code. Rather, Imaginary Programming uses GPT as the runtime for your function. This means you can solve problems that you never would be able to code normally, answering questions like: "How angry is this customer email?", "What are all the proper names in this email?", or "Come up with a good name for this song playlist.". Copilot lets you code the same things faster; Imaginary Programming lets you do things that were previously impossible to code in TypeScript/JavaScript.
I'm interested in seeing what developers make of this, so I'd love for folks to try it out, either by installing the library or using our online playground: https://playground.imaginary.dev/ . Any and all feedback is very much appreciated!
1. Makes it easier to identify talent out in the world that they want to go after.
2. Raises the technical reputation of Facebook, making it easier to get candidates to say yes.
3. Makes it easier to ramp new employees up on Facebook’s stack if they are already familiar with a lot of it from open source.