Long-bond yields are at 19-year highs, and every speech from a Fed official gets read for a hint about what comes next. This build tracks 20 of them. A Task searches the web for each official's recent remarks, classifies every comment as hawkish, dovish, or neutral with a confidence score, and writes the new ones to an Airtable base. Run it once a day and the base turns into a dataset.
What's covered
- The table: date, speaker, role, stance, confidence, quote, venue, and rationale columns in Airtable
- The script: a list of 20 officials and a table schema at the top, then an orchestration that fetches or creates the table, searches in parallel, classifies, deduplicates, writes, and summarises
- The classification prompt, with a structured output whose fields map one to one onto the columns
- A live run: 21 snippets collected, each one classified, the records created, and a chat with the results
Why each remark gets a row
A summary of what the Fed said this week is easy to get from any chat window, and it is gone next week. Writing each remark to its own row means the rows accumulate. After a month there is a record of who said what, where, and how hawkish it read.
Airtable is in the demo because the rows appear while the Task runs. Postgres, MySQL, or anything else reachable from Python would hold the same table.
The script
The top of the script is constants: the 20 officials to track, and a schema for the table that matches the Airtable columns. The orchestration underneath does six things in order.
- Fetch the table from Airtable, or create it if it does not exist yet.
- Search the web for each official's recent comments, with the 20 searches running in parallel.
- Classify every snippet with the prompt described below.
- Deduplicate against what is already in the table, so a remark quoted in several articles is recorded once.
- Write the new rows to Airtable.
- Generate a summary of the run.
The prompt
The classification is one inline prompt that takes a snippet and its source URL. Its output is structured: speaker, role, date, venue, quote, stance, confidence as a number, and a rationale, all required. Those are the column names in the table, so each result becomes a row without a parsing step in between.
The run
The run starts at Airtable, confirming the table exists. Then the searches go out, five in flight at a time, with a new one starting as each finishes. This run collected 21 snippets and classified each one. The Task created the records, then opened a chat listing every comment with its stance and confidence. The Airtable base held the same rows with every column filled in.
The next video builds daily summaries and notifications on top of this table.
Video transcript
If you're watching the news, you know the global bond markets are going crazy. To get a handle on it, we're going to track what 20 different US Fed officials are saying and classify their comments as dovish, hawkish, or neutral. In a later video, we'll use that data to create daily summaries and notifications. Here's an empty table I created in Airtable. You could just as easily use Postgres, MySQL, or any database you like.
This is nice cuz I can show you the data in real time. You see I have columns up here: date, speaker role stance confidence quote, et cetera. This is what we're going to fill when our task runs. Our task is going to run maybe once a day, and it's going to look for new comments, and it's going to fill in this table. Over time, we'll get more and more comments, and we can mine deeper and deeper for data and trends.
Here's the Python task that actually powers this. At the top, we have some constants. We have a list of officials, 20 of them. And we have a schema for our table. This matches what we just saw in Airtable, with the same columns.
If we skip down to the main orchestration, we see what this really does. First, it gets the table from Airtable, or creates it if it doesn't exist. It's going to web search for 20 different Fed officials' comments, and it will do this in parallel, so it's faster. We'll then classify each comment using a prompt, which I'll show you in a second. Then we do some deduplication to ensure we're not recording the same comment twice.
We write new comments to the Airtable, and we generate a summary. The prompt that actually does the classification is here, and you can see the fields that it's going to generate, and this prompt has a structured output. So, we're going to get a JSON object out of this with fields like speaker, role, date, venue, quote stance confidence rationale. And these map directly to the columns that we saw in the table. All right, let's run it and see what we get.
Can see first it's going to access Airtable. Make sure our table exists. We can see the parallel web search is happening. So, we have five running at a time. As soon as one finishes, another will start.
All right, we can see at this point we've collected 21 snippets. Now, for each snippet, we are running this prompt and we are calculating confidence, date, etc. And we're done. In the background here, you can see that we've created the records. And in the foreground, we have a dialogue to open our chat.
Here's the chat. And inside, we can see the individual comments along with confidence. Finally, here's our Airtable populated with the comments. Date, speaker role stance confidence quote. It's all here.
Next time, we'll use this data to create some analyses and some notifications.