US Tariffs, DeepSeek and OpenAI

This week the new Trump administration announced new tariffs on key trading partners, Canada and Mexico. Both countries vowed to retaliate, and tensions are high: “Canada imposes 25% tariffs in trade war with US” Living in Canada, I am obviusly curious about the impact this will all have both both sides of the border. I am a self-described economics nerd: having never studied economics, I try to read and listen about when I have spare time. One other topic that’s been on my mind recently is the recent release of the DeepSeek R1 model and the the release of the OpenAI O3 model that followed. Both are SOTA (as of Feb 2025) LLM models that were trained to “reason” before providing an answer through a chain of thought Reinforcement Learning: ...

February 2, 2025

Experiments with OpenAI's Function Calling

Intro This notebook (also on github) demonstrates how to use Function Calling functionality with the OpenAI API. In this demo, we’ll use the Northwind database to convert natural language queries into SQL: "What is the total revenue for each product in the database?" -> -> "SELECT ... FROM ..." -> DataFrame There will be two function calling examples: A simple one-step function call to convert a natural language query into SQL, where we’ll put the database schema into the system prompt and them use function calling to convert a natural language query into SQL. A two-step function call first gets the schema of the database and then converts a natural language query into SQL. At the end, we’ll compare the two approaches and do a quick-and-dirty evaluation of the results using a hand-curated list of questions and their expected SQL queries in eval_questions.csv. ...

May 5, 2024