ChatGPT doesn't plan forward - understanding autoregressive nature of LLMs
The inspiration for this article came to me a recently while I was watching a great keynote by Prof. Yann LeCun. I strongly recommend dedicating an hour to watch it. Here, I am going to focus on one specific concept: the autoregressive nature of LLMs and its real-world implications.Challenge with code generationThis talk helped me understand one of the persistent issues I run into while working with Claude. At a high level, Claude, when presented with a complex task and a choice to return eit...
ChatGPT doesn't plan forward - understanding autoregressive nature of LLMs
The inspiration for this article came to me a recently while I was watching a great keynote by Prof. Yann LeCun. I strongly recommend dedicating an hour to watch it. Here, I am going to focus on one specific concept: the autoregressive nature of LLMs and its real-world implications.Challenge with code generationThis talk helped me understand one of the persistent issues I run into while working with Claude. At a high level, Claude, when presented with a complex task and a choice to return eit...
Type-safe env variables with Typescript
Almost all our projects have environmental variables. We use them to configure various aspects of our systems. What if they’re missing? What if they’re misconfigured? This is typically a challenge when working with TypeScript, which immediately warns you about missing properties as soon as you start accessing your variables from process.env. A quick fix would be to declare types for process.env and call it a day. But can we do better? Of course! 🎉 And the solution is not even TypeScript-spec...
Type-safe env variables with Typescript
Almost all our projects have environmental variables. We use them to configure various aspects of our systems. What if they’re missing? What if they’re misconfigured? This is typically a challenge when working with TypeScript, which immediately warns you about missing properties as soon as you start accessing your variables from process.env. A quick fix would be to declare types for process.env and call it a day. But can we do better? Of course! 🎉 And the solution is not even TypeScript-spec...
Postgres database functions are your next favorite feature!
Imagine you’re building a system where users can perform transactions such as selling and buying tokens. For each token, every user has a dedicated wallet. Our database consists of four entities: User, Wallet, Token, and Transaction.If you're using Prisma, you can generate this with \`prisma-dbml-generator\`The transaction has a field delta that is either a positive or negative number. When positive, that is the number of tokens purchased. When negative, it is how many tokens were sold. ...
Postgres database functions are your next favorite feature!
Imagine you’re building a system where users can perform transactions such as selling and buying tokens. For each token, every user has a dedicated wallet. Our database consists of four entities: User, Wallet, Token, and Transaction.If you're using Prisma, you can generate this with \`prisma-dbml-generator\`The transaction has a field delta that is either a positive or negative number. When positive, that is the number of tokens purchased. When negative, it is how many tokens were sold. ...