Heard the phrase “if someone wins the lottery” used today to describe a teammate leaving a team. I much prefer this to the more morbid alternatives. I tried gpt-engineer today. I liked the approach and the setup instructions are good. I think I remember needing to use Python 3.11 instead of 3.8 that I was running, but beyond that the readme instructions we on point. Process You start by creating a project folder with a plaintext prompt.
I’ve been thinking about the concept of “prompt overfitting”. In this context, there is a distinction between model overfitting and prompt overfitting. Say you want to use a large language model as a classifier. You may give it several example inputs and the expected outputs. I don’t have hard data to go by, but it feels meaningful to keep the prompt generic or abstract where possible rather than enumerating overly specific cases in a way that obfuscates the broader pattern you’re hoping to apply.
The threading macro in Clojure provides a more readable way to compose functions together. It’s a bit like a Bash pipeline. The following function takes a string, splits on a : and trims the whitespace from the result. The threading macro denoted by -> passes the threaded value as the first argument to the functions. (defn my-fn [s] (-> s (str/split #":") ;; split by ":" second ;; take the second element (str/trim) ;; remove whitespace from the string ) ) There is another threading macro denoted by ->> which passes the threaded value as the last argument to the functions.
This past week, OpenAI added function calling to their SDK. This addition is exciting because it now incorporates schema as a first-class citizen in making calls to OpenAI chat models. As the example code and naming suggest, you can define a list of functions and schema of the parameters required to call them and the model will determine whether a function needs to be invoked in the context of the completion, then return JSON adhering to the schema defined for the function.
I was interested to learn more about the developer experience of Cloudflare’s D1 serverless SQL database offering. I started with this tutorial. Using wrangler you can scaffold a Worker and create a D1 database. The docs were straightforward up until the Write queries within your Worker section. For me, wrangler scaffolded a worker with a different structure than the docs discuss. I was able to progress through the rest of the tutorial by doing the following:
Richard WM Jones booted Linux 292,612 to find a bug where it hangs on boot. I loved reading the recounting of his process to accomplish this, by bisecting through the different versions of Linux and boot each thousands of times to determine whether the version contained the bug. Georgi Gerganov started a company, ggml.ai, to run language models on commodity hardware.
I was listening to a podcast interview of Adam Robinson and he was discussing why he believed it is important process information with your body. He gives the example that when listening to something, he stops around once every minute and sees how it feels. He later goes on to highlight the importance of recognizing when something is “weird” and paying attention to it, or trusting one’s intuition even if rationally we can’t understand why something feels unusual.
I read an article today about Scripting with Elixir that caught my eye because it touches on a problem I often struggle with: how you do easily distribute a script along with its dependencies in Python? Elixir has an example of what this could look like in the form of Mix.install. This feature allows one to distribute just the source code of your script and dependency management can be done when the script runs, without needing to distribute a mix.
Today, I played around with Matt Rickard’s ReLLM library, another take on constraining LLM output, in this case, with regex. I tried to use it to steer a language model to generate structure (JSON) from unstructured input. This exercise is sort of like parsing or validating JSON with regex – it’s not a good idea. Complicated regular expressions to describe JSON are hard to write. I do love the demo that generates acronyms though.
I’ve been trying to find a simple way to host a website that formats and serves a nice looking version of a recipe written in markdown. There are a few open source projects available, but nothing that has fit the bill yet. I briefly had the idea to try out something with Next.js and mdx but I found when I scaffolded a new app that I didn’t even recognize the project structure.