Source code: github.com/neolefty/madlibs.
Large Language Models are everywhere, and programmers should all be trying them out. So here’s a really simple app!
It’s just a chat UI with two additions:
- A framing prompt, basically “Respond with Mad Libs, formatted so I can process them,” and
- Some text substitution from inputs.
A framework can really help. This app uses Vercel’s AI SDK, a TypeScript library specialized for building interactive web applications. Another good one, which has both Python and JavaScript versions, is LangChain / LangGraph — for building “Applications that can reason”.
So simple it’s embarrassing. A good place to start, right?