Code Riff
one of us can't code. the other's been coding since he was 13. every episode, someone brings us a real problem - and we try to solve it with AI in one hour. live. no scripts. no safety net.
we talk through our prompts, we show you the mess, and we explain everything along the way. sometimes it works beautifully. sometimes it breaks. either way, you'll know enough to try it yourself.
messy real-world problems, solved with AI - so you can too.
hosted by eric tan and yaohong ch'ng (superuser hq).
got a real and painful problem you want us to work through? https://forms.gle/DSyLzPAoR6x2M4Np9
Code Riff
Oil Analyst Saves HOURS Analyzing News (Live Build)
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
Bryan is an oil market analyst. Every morning he spends one to two hours reading news - Reuters, CNN, CNBC - trying to pull out the actual facts from opinion and spin. Two articles about the same event sometimes say opposite things.
We tried building him an AI tool using Claude Code. It scraped hundreds of articles, stripped out the editorializing, and pulled just the verifiable facts. It covered about 80-90% of what he needs.
What you'll hear in this episode:
- An oil analyst explaining the daily problem: separating fact from spin in news headlines
- Building a fact extraction tool with Claude Code, live in one session
- The moment two articles about the Strait of Hormuz directly contradicted each other
- Why "dangerously skip permissions" exists in Claude Code (cowboy mode)
- Bryan's live feedback: what worked, what didn't, and what he'd actually use
- Yaohong on why confidence scores without defined criteria will hallucinate
Hosts: Eric Tan (non-technical builder) & Yaohong Ch'ng (engineer, Superuser HQ, ex-Stashaway head of Data)
Guest: Bryan - oil market analyst
Got a problem you want us to solve live? Fill out the form:
https://forms.gle/DSyLzPAoR6x2M4Np9
Connect with us:
- Eric on LinkedIn: https://www.linkedin.com/in/erictisme/
- Yaohong on LinkedIn: https://www.linkedin.com/in/yaohongchng/
- WhatsApp community: https://chat.whatsapp.com/Dmp5eEEsAZhJTB6LjcIG3c?mode=gi_t
- Substack: https://substack.com/@coderiff
- Email: code.riffs.ai@gmail.com
Tools used in this episode:
- Claude Code: https://claude.ai/code
- Gemini API (news classification/analysis): https://ai.google.dev/
- Python (RSS scraping + fact extraction)
Tools we use:
- Buzzsprout (podcast hosting): https://www.buzzsprout.com/?referrer_id=2371679
- Snipd (AI podcast highlights): https://get.snipd.com/pAbF/36jzrvki
LEARN ALONG - Glossary:
- RSS feeds: A way to automatically pull articles from news sites without visiting each one. Like a subscription pipe that delivers headlines to your tool.
- API keys: Password-like codes that let your tool access paid services like AI models. You keep them secret and they track your usage.
- Hallucination: When AI confidently generates information that sounds right but isn't real. The biggest risk when you need verified facts for trading decisions.
- Sandbox: A restricted environment that limits what code can do on your computer. A safety net when running AI-generated code.
- Dangerously skip permissions: A Claude Code setting that removes the safety sandbox. Useful for speed, risky if you don't trust what the code is doing.
- Scenario analysis: A structured way of thinking through "if X happens, then Y follows." Bryan uses a specific framework: impact, market response, price implications.
ABOUT:
Code Riff - messy real-world problems, solved with AI, so you can too.
One of us can't code. The other's been coding since he was 13. Every episode, someone brings us a real problem and we try to solve it with AI in one hour live.
How an oil analyst sifts facts from news (with Claude Code)
SPEAKER_01Uh it would take about one to two hours throughout the day just to screen and look through different uh news articles like CNN, uh CNBC.
SPEAKER_00Let's run this dangerously, you know, cowboy mode. Oh. And since we're talking about oil trading, I guess uh cowboys will be listening.
SPEAKER_01One article is saying no vessels are passing through the street at all. And then the second article is saying, oh actually an Indian vessel passed through.
SPEAKER_02I think we are setting the new standard, right? Like Brian's gonna be the forerunner of what it means to be uh a market analyst in 2026.
SPEAKER_01So you make sure everyone is as good as you laugh crazy that they actually went through so many articles in just a few seconds. Yeah. And for me, it's like one hour max I have to read like what five, six, seven articles.
SPEAKER_02Yeah, hi everyone, uh welcome to the Code Rift Podcast. I'm Eric, AI Vibecoder. Along with me, we have Yao Hong, who is an AI orchestrator, and we have Brian, who is uh oi market analyst. Is that right?
SPEAKER_01Yeah, correct.
The problem: flashy headlines vs actual facts
SPEAKER_02Alright, cool. And today we're gonna be figuring out how to automate some part of the research process when it comes to reading the news. Brian spends about one or two hours a day reading news and presenting that to traders, I think. So uh Brian, do you mind just sharing a bit more about what you do in a day and what we are hoping to solve today?
SPEAKER_01Okay, yeah, so for context, this part of my work is more um consolidating data or news uh throughout the day, you know, and presenting it in a concise manner to the traders. So as we had mentioned, um I will take about one to two hours throughout the day just to screen and look through different uh news articles like CNN, uh CNBC routers, or just across many news sites. So I think the nuance here is that some of these news articles are uh left-leaning or right-leaning, or they have very flashy headlines as well. And it's a bit difficult to uh look through the articles and sift out the facts in a nice concise manner to the traders for them to make better trading decisions. So that's why I reached out for um some help. Yeah.
SPEAKER_00In a way it's similar to the ESG episode. Um I think yes.
SPEAKER_02Yeah. Yeah. So if you haven't watched that, for those who are who are listening, uh our first episode was on scraping news headlines uh for an ESG analyst in a bank. And today's episode is a bit different in a sense that we we do want to get into the details of the news. And there is sort of uh a sifting process behind that. Where uh do you do you mind explaining a bit more, Brian, about the left slash right leaning and maybe other factors that you are looking out for when you read a piece of news?
SPEAKER_01Okay, so um perhaps the on the point on left or right leaning, so some news sites or news articles like for example, Fox or um maybe CNN or CNBC, some of them are uh you know catered towards like the the political right in the US or the political left. So some of them um they have headlines that are quite biased, or uh news uh or the content might be biased, and I think the other factors will include, for example, uh very flashy headlines, but um the article might say otherwise, or there's some facts or very hard numbers in the articles that I would uh very much prefer to sift out over the headlines. Yeah. Yeah.
SPEAKER_02So it's kind of stripping out the facts from the headlines, you know, because sometimes headlines are for the clicks and the views. Correct. You really just want the cool hard facts that leads to something. Do you mind explaining what the facts usually leads to and how your your thought process usually goes from the facts?
SPEAKER_01So after pulling out the facts throughout the day or throughout the past few days or the week, then um it might be good or it might be nice for AI or to have this sort of this thing that we are building, uh come up with a structured uh approach on what can happen to prices. So maybe an example would be, or very current example would be the Iran war or uh closure of the Homus Strait. So that is like a global oil choke point, which is 20% of global oil flows. So maybe a very brief example would be okay, headline uh war closure of Homus Strait, then the impact would be okay, then the Strait of Homus is closed. So what would that lead to? The impact would be supply from the Arab Gulf stops, and there's not enough supply to meet existing demand in Asia. Yeah. So the short term would be, so maybe there would be a short-term and long-term impact. So the short-term impact would be depletion of inventory, and then they would buy more from refineries in the West, and then um in the long term, for example, it would uh incentivize refineries to increase production if the war persists. Yeah, so how that would maybe impact prices in the near term would be um prices because oil trades on a curve, right? They call it futures. So the prices now would be a lot more expensive than in the future, and that's called backwardation. Yeah, so I think that can be traded as well, yeah. Or they can also trade like location spreads like east-west. So, for example, the prices in the east would be a lot more expensive than the west. So they trade that differential as well.
SPEAKER_00All right. So, in the process, do you have to analyze to that degree to provide to the traders, or do you just take out the facts and maybe some related facts? Right now it's just some related facts, but you know, I'm just hoping that eventually he can give you okay, okay, okay. Yeah, that's true.
SPEAKER_01But I think for now, maybe if it we are not so ambitious or something that is realistic, then the hard facts would be very good already. Yeah.
SPEAKER_00Well no, we should try, we should try. Uh provided that we have a certain structure, I think it's possible.
Eric breaks down the problem
SPEAKER_03Yeah, yeah. Yeah.
SPEAKER_02Alright, so we can do it a few ways. I see it as three main things. The first part is really just getting the news. Step two is sifting the information out um according to uh the facts, and of course, maybe putting in some of the the biases. Yeah, remove the bias. The last stage is where you you output it or you do the scenario analysis. It's like three things you mentioned the impact, the response, and the price of the event. And would the impact, response, and price be tied to one piece of fact, or would it be tied to one article, usually?
SPEAKER_01Um ideally it would be across multiple pieces of facts across multiple articles. Yeah. Because not all articles hold the same facts.
Claude Code "Dangerously skip permissions" - cowboy mode
SPEAKER_02There might be multiple facts in one article, right? Yeah, correct. Yeah, okay. Okay. Okay, so I'm just going to start sharing my screen and we are going to code today. Nice. Um because I still think it's important for people to try to code their own stuff. Ya Hong, are you okay if I if I go dangerously skip permissions or go ahead, go ahead.
SPEAKER_00Yeah, go ahead. You don't need to keep pressing button. Okay. Anyway, it's not my laptop, so it's okay.
SPEAKER_02Okay, I am going to do this thing called um dangerously skip permissions.
SPEAKER_00Uh, for for Brian's uh benefit, right? So essentially when you use plot code or codecs, this these um coding agents usually we run them in a sandbox because they they have a lot of um permissions to do a lot of things, right? But you can actually pass in a command to say just run this dangerously, you know, cowboy mode. Oh and since we're talking about oil trading, I guess uh also cowboys to be listening.
SPEAKER_02Yeah, so uh you could type clot and then you type this thing, of course. Um dangerously. Once again, uh we are using the more advanced version of clot code, um, which you can access starting from 30 bucks, uh Sync dollars. But yeah, so basically I have a command where when I press X it helps me skip permissions. Uh they call it an alias. So I am actually recording our conversation. Um and I'm going to I'm going to copy what we just talked about.
SPEAKER_00Yeah. So for brilliant sake, uh because Eric is trying to be lazy, doesn't want to type out what we talked about. Oh, okay. So you just like copy and paste the whole.
SPEAKER_02Actually, one thing I needed to do was to make it in plan mode. So I'm gonna just stop this whole thing. Um and I'm gonna copy this. This is a transcript of a user interview with an oil market analyst. Please plan out the approach and let's build. And then I will have the transcript below and we'll let it uh run. So now it's just going to kind of spend a few minutes uh planning out how it's going to build it. Um but I think we we gave it enough uh context to to think about yeah how it's going to approach it. Brian, uh would you be able to share any articles that you have just in case you know some of these articles are behind a paywall? Anyways, the plan right now is to build. Oh you know what? I think it's actually reading some stuff from the episode one. Oh, that's pretty smart actually. So why not? Sorry about that. Uh this is building on episode one, so if you haven't watched that, please do. Then you uh get more context. So that's that's very smart. It's on fetching, classifying, generating.
SPEAKER_00And it's when you do dangerously, man.
SPEAKER_02Yeah, we can read a lot of things on my computer. Yeah. Um so it's always good to sandbox, right? Which I'm actually not. But anyways, um for you guys, I will risk my my computer. Um, what we're building, step one is to fetch oil news uh for those that are just listening. Uh stage one is to fetch oil news from Reuters CNN. Stage two is to extract the facts, stage three is scenario analysis, and then the output format would be a morning briefing and an evening update. Oh, which it did understand as well. Um and then in terms of the format, actually it's it's mentioning that it wants a word doc.
SPEAKER_00Do you want a word dog or do you want Excel?
SPEAKER_02So there is actually a particular format that we want, right? Uh Brian. So uh yes, correct. But um but I think it's fine, we can do that later. Uh let's just proceed. I'm just going to I'm just gonna clear context and and bypass permissions so that we start building this. Okay, everything was built.
SPEAKER_00Uh we have so they built a Python project as uh configuration with fetches, okay, quite similar to what we did the first round with fetch and extract. But now we have an additional analyze uh path. Yeah.
SPEAKER_02Yep, so we do need to install requirements and then create an n file.
SPEAKER_00I think you need to do that in the file that actually, not in the this open uh open. So I just maybe go back here. Cd dash, yeah. Okay. Enter. Go back to your last known folder.
SPEAKER_02Okay, and then install requirements.
SPEAKER_00Okay, so we're uh for Brian's sake, we're just installing a bunch of stuff that you don't know what installing onto your computer to run your project.
SPEAKER_01Well, there's so much stuff to download.
SPEAKER_00Yeah, because these are all libraries, you know, open source libraries that people have created and we are building on top of on the shoulders of giants, right? Oh, that's crazy. Okay. Yeah, and and it's uh yeah, how how people build stuff these days now? We've been installing things on uh from the internet for the last I don't know how many years. Yeah. So there were somewhere in the world there is this one small library that everybody references, which uh if it goes down, then half the internet will go down. Yeah, and it has happened before.
SPEAKER_01But then no one will add to the library anymore, right?
SPEAKER_00Since we've like uh not really. I mean people maintain the existing libraries and all that, right? Because it's always been there. I see. And yeah, everything is open source, so it's it's pretty cool how how things work. Interesting.
SPEAKER_02Okay, so I'm just gonna paste my key into the.env file.
SPEAKER_00Um but let me not expose your key. Okay, so for Brian's sake, uh these API keys are quite sensitive. And there are sniffers out there on the internet that looks for people who expose their keys and then they get free access to your Entropic or your Gemini account and they can do crazy things. Oh shit. Okay, yeah. So part of the security reason that we have to be a bit more careful because if some people they save the keys into their repository, which is and then they put it on public uh access. Yeah, so quite I mean it's not super dangerous, it's just be more careful. Yeah, like a password, right? Like a key to correct, correct, correct. Yeah, yeah.
SPEAKER_02So I just asked uh Clock Code to open the.env file for me to paste it in. Uh paste the API key in, and then now I will say, okay, I have put it in. Um this is also an example GOAT standard output, which is based off this article that I will paste uh below. This is so that you would return the facts in this um or you would process the facts and return it in this format, which is what we call a scenario analysis, so that every fact uh that is retrieved from an article would be able to be um be returned in this format. Okay, hopefully that's clear enough. I'm just gonna paste the article um below here, and then I am going to paste uh the picture of the ideal output that Brian sent me, and then I will paste what I just said. Um, let's go. Okay, so it's probably going. I think it was already kind of done. Uh we should have checked how it looked. Um but now we're just updating the scenario prompt. Uh just assume that it's quite good. Yeah, I think based on the previous episode we saw it was decently feasible.
SPEAKER_00Of course, uh in reality, we would spend more time on this. Yeah. We would spend more time to make sure that uh whatever you put in is is correct and what you intend it to be.
Question: Tokens and cost
SPEAKER_01Yeah, just from my understanding, right? This this tokens thing that I see are sort of like uh like you know, the more tokens you use, the more you have to pay.
SPEAKER_00Yeah, yeah. If you're using the API for now, because um Eric's running it on the max plan, so uh he he's paid a fixed fee for the month and they give you a set limit.
SPEAKER_01Oh, okay.
Moment of truth: First test
SPEAKER_00Yeah, yeah. Unfortunately, mine is almost 99% already. I I I hit my limit like two days into the second day of the week already. I've been struggling for the last couple of days. Definitely uh tomorrow morning it resets. So it's uh bit of a challenge. I need to definitely upgrade my plan to the$200 one.
SPEAKER_02Time to go for it. Okay, I'm just going to test this thing. Um with the the Python.
SPEAKER_00Okay, let's see what's happening here. That's very cool. Like Oil News Intelligence 2, maximum eight articles. It's fetching the news now. Okay, see all the uh different news feeds that it's fetching from. So interesting that it's in the terminal, as in no.
748 articles fetched in seconds
SPEAKER_03Yeah. Yeah.
SPEAKER_00And actually, I guess it's ironic that the UI UX now is going back to the terminal after decades of our graphical user interfaces. I mean, for someone like me, it's like, oh man, so back to the roots. When we started playing computers, it was all black screens like this. Yeah.
SPEAKER_02And also because it's low latency, it's very fast. You can see whether you're getting what you need. It has so for those who are listening in, um, it already processed step one, which was fetching the news, and it fetched about 748 articles. Um, and then after duplication, it's about 600 articles. Wow, I don't know if it's bluffing us.
SPEAKER_00It sounds a bit crazy, but uh I think maybe we forgot to put in a filter for the date to only process the last 24 hours.
unknownYeah.
SPEAKER_02So as I'm as we're reading this, I think we can start giving feedback, right?
SPEAKER_00Oh, it's about 48 hours and it's not for six.
SPEAKER_0248 hours. Feel free to give feedback. We we'll feed this back into the system. Okay. Yeah. So so what's your feedback so far looking at this?
unknownYeah.
SPEAKER_01Oh, I think it's it's it's quite crazy that they actually went through so many articles in just a few seconds. Yeah. And yeah. For me, it's like one hour max, I have to read like what five, six, seven articles.
SPEAKER_00Your job is at risk.
SPEAKER_02No, I think we are setting the new standard, right? Like Brian's gonna be the forerunner of what it means to be uh a market analyst in 2026. So you make sure everyone is is as good as you, lah. Hopefully you probably will be able to figure out something similar or even better because you know your process the best. You have your own data in your stored in your computer, right? So that's also yeah. So okay, maybe for those who are listening in, step one, it fetched the news. Step two, it extracted the facts from about 600 plus articles. Step three, it ran the scenario analysis, um and grouped by and it grouped the facts by different events.
SPEAKER_00Uh whatever that means. Uh event groups, that's pretty interesting. So event group one, Malaysia's Prime Minister's business dealings. Although I I don't know how relevant that is to your work, but uh maybe we we were too open-ended on the filtering part. Yeah.
SPEAKER_01Yeah, maybe it's a little bit broad, but perhaps we could like um narrow it to macroeconomics or geopolitics, and also just oil uh physical fundamentals like storages or oil flows, anything physical related to oil.
SPEAKER_02Yeah. Um another thing was were you okay with the 48 hours, or do you feel like it's too much?
SPEAKER_01Well, maybe one day would be fine as well. I think 24 will be 24 will be better.
Evaluating the scenario analyses
SPEAKER_02Yeah, let's do 24 hours. Any any other feedback? Uh no, no more. Okay. I'm gonna paste this in. Here's some feedback for you. Um friendly. Thank you. Okay. So now it has done this file. Uh which I will read this file and see what happens now. I will find it in my desktop. Okay, so we have uh okay, very weirdly written, but we have uh oil market intelligence briefing. Six articles analyzed, six scenarios. Brian, is there any event that you you think this event is okay to read out?
SPEAKER_01Like, or maybe the uh the Indian one or Indian one.
Bryan's real and honest feedback and one last prompt
SPEAKER_02Okay. So for India, I'm just gonna read out uh India's gas diversion measures. So it has a TLDR, which is the emergency gas diversion to priority sectors, is tightening domestic supply, likely boosting sport LNG demand and prices globally. So there's an impact on the supply-demand, trade flow policy, infrastructure. It viewed it as a short term response. I think I think it classified it as a short term uh response. And then the impact on prices uh on the global L and G, sport prices on Indian domestic gas prices, on diesel prices, and there's a confidence level which is medium as well. Oh, that's quite a nice uh addition.
unknownYeah.
SPEAKER_02So what's your your thought on this?
SPEAKER_01Um I think it's it's pretty good, like the way that it actually knew how to separate or follow the format that I gave you, which is split into impact, response, and uh how the price reacted to the impact, which was also based on the facts from the article. Um yeah, so also it's very good in this part, but then I think it's a bit too broad. It's like anything energy, but I wanted more like flows or um yeah, anything related to physical uh oil. Yeah.
SPEAKER_02Okay. Cool. I'm gonna copy that in. Um so I'm gonna copy in your your feedback as a prompt, um, which is how we want more physical uh we want more physical oil. How do you say that again?
SPEAKER_01Um flows like f L O W S. All flows. More feedback for you. Sorry, one more one more thing is macroeconomics and uh geopolitics.
SPEAKER_02Okay. Macroeconomics and geopolitics. Yeah. And then of course you also sent me two articles just now, right? Like correct. Was that what you wanted, Brian? Like were those the articles you you wanted to analyze or like were those the the likes of you wanted the likes of those, is it?
SPEAKER_01Yeah, correct. So maybe perhaps something similar.
SPEAKER_02Um these kind of topics, will you say that? Something else similar. Okay. Okay.
unknownOkay.
SPEAKER_01So yeah, for context, the two articles that I sent was uh one of it was not a litter of oil to pass straight of hormuz, expect$200 price tag. And then the second article was first India bound vessel to cross Hormuz amid crisis docked at Mumbai port. So I think that was this was what I was trying to explain in that um the headlines are flashy. Like they are saying one article is saying no vessels are passing through the strait at all. And then the second article is saying, oh, actually an Indian vessel passed through. So I think that was the nuance that I was trying to capture. I see.
SPEAKER_02Okay, I'm just showing that on the screen now. Okay, three changes made. Um okay, how do we test again? Okay, so caveat is that this is currently still a script that is running on my computer. Right. So my computer basically needs to be remain on for this to even run. And it's running in my terminal, which is obviously not what you want you wanna be looking at, uh Brian. So there there is still probably a few, if not tens more, tens tens of hours more required to kind of make this production great, you know, to be able to share with your your team or be able to use with multiple people on it. Uh definitely. But but what we are doing now is just kind of show showing that we can get um get to the value of what we are um we are promising or what we are we are talking about.
unknownYeah.
SPEAKER_01Yeah. It was already impressive that you could just pull out the the facts, even if it was yeah.
SPEAKER_02Yeah, so I'm just going to ask for the command to run. So just run these commands again. Short. Short? What is short? I'm just gonna ask it, you know, it's like it's an intuition teacher. Just read the code and not waste your tokens, my friend. That is true too. Yes. I am at 40 almost 40% now of the context window. Oh, that's okay. Limits it to eight articles max, medium is 20 articles, long is all articles, no limit. I see. Interesting. It's okay. Okay. Wait, it fetched a thousand articles now. Oh my gosh.
SPEAKER_00I think it expanded the stuff that it wants to look at. Okay, wait. So short. Oh, you see, okay, what okay? Let's uh for those listening in, what's happening now? Right first it has um RSS feeds, which are all your news articles from different sources, right? Then it's uh fetching also from Google News RSS with specific keywords. So that's part two. You see that, right? Fetching Google News physical flows, crude oil shipment tanker. Or then it has an oil cargo reroute shipping. So it's not say very smart, but pretty smart at the same time. Because you are just brute forcing all the different types of uh scenarios that can happen. See, there's even uh OPEC, Saudi Arabia, Russia, oil. So if something happens outside of these keywords, then you will not pick up.
SPEAKER_01What do you think of that, Brian? Um actually, I think this is actually what I what I want. Like this is what uh we see on the table.
SPEAKER_00It's good enough, uh it's good enough to fill it covers most of the things we see.
SPEAKER_01Yeah, correct, like almost 80, 90 percent. Yeah. The keywords that I just saw, it was also very relevant to what I try and shift out when I read through articles, yeah.
SPEAKER_02No, but that's great. We uh 90% is good for for just one hour anyway. Yeah, I think I think 90% is okay.
SPEAKER_00So um to scroll 100%, yeah.
SPEAKER_02Yeah, so we we fetched the news, step one, fetch the news, step two, extracted the facts from the articles. Step three, we did a scenario analysis, and then step four generated the briefing, uh, which I can find somewhere. Yeah. Oh, okay. Wait, did it just replace the previous one?
SPEAKER_00Yeah, yeah, replaced the one.
SPEAKER_02Oh, but it's still South Korea. No, it's a bit weird. Oh, South East. South Korea will come out again. Yeah, investment bill. Uh probably thought it was quite. But Middle East is not India guest diversion, Cathay.
SPEAKER_00Oh, close this one again, open again. Uh close, close, close.
SPEAKER_02Oh, your API key. Uh this is weird, actually. This is weird. Today at 1022. Let me open it again. Okay, Middle East, India, South Korea, Pyongyang. Okay, so this is the new one.
SPEAKER_01Um, I think the the first one was is is good. It's very targeted.
SPEAKER_02First one, okay, on Middle East.
SPEAKER_01And what makes you say that? Okay, so I think um what we generally want to see would be some keywords like Middle East, which is where most of the oil uh exports are. Uh maybe 20% of the world's uh oil exports. We also like to see, for example, product grades instead of just oil. We want to see, for example, jet fuel or diesel. So I think very specific product grids would be very important uh for us as well. Yeah.
SPEAKER_02Which we have here, right? It's talking about jet. Yeah, correct. So that's what we have here. Anything else when you read through this that you will improve on or that you think is good?
SPEAKER_01I think for now this is very good already, as in the fact that it can just scrape out uh the data from the articles, but um I think it's still a little bit too uh broad also. But this this first example right is is perfect, yeah.
SPEAKER_02Yeah, source-wise, it's not really showing the source, right? Yeah, some bug there. Yeah. So I think that's one thing to improve on. It doesn't show the sources. Um so actually, I don't even know whether this is good, but you probably know because you've you might have read this already, right?
SPEAKER_01Yeah, I think I read this somewhere before. Jet fuel prices actually shot up. Um because of the conflict.
SPEAKER_02Yeah. So I know we have maybe like 10-ish minutes. I think what we could do to wrap it up, maybe is just to um talk about how um the sources are not showing up clearly.
SPEAKER_00Give an example of what's the wrong thing that is showing. So not showing up clearly in the event analysis.
SPEAKER_02Uh sis example this.
SPEAKER_00So for these kind of things, we uh sometimes need to be a bit more pointed so it doesn't go around wasting your tokens searching for things.
SPEAKER_03Yeah.
SPEAKER_02Yeah. And then because we also want this to be okay, we also want this to be kind of usable, right? Um so if okay, I'm gonna prompt. Uh today we were really trying to see whether it could copy the thought process when it comes to you know looking through articles, and actually behind this thought process, there might have even been a prompt, right?
SPEAKER_00And we go to analyze.py on the left side in the the code, yeah, yeah. Take a look at that.
SPEAKER_02Yeah, analyze.py. So as you can see, there is a few prompts here already, right? You can see that.
SPEAKER_00So it's running through Gemini to analyze the news as uh as a toy analyst. Yeah, then group the facts. Okay, down, down, down. Right. So this is why it appears in the format that we talk about, right? Yeah, yeah, because you see you give it quite quite good. So if you want to make changes, you edit the instructions here.
SPEAKER_01Well, I think for a very brief evaluation of an article, it's already very good. Yeah, it will take some time to think about it also.
SPEAKER_00This is the immediate correct, correct, correct, correct. Yeah, yeah. And in fact, the the confidence seems a bit iffy to me. Because you ask the the model to come out with a high, medium, low, but you don't give it what it means to be high, medium, low, then it will definitely hallucinate there.
SPEAKER_02Yeah, so here's where you would actually manually go in, and it would be very valuable to type in what what a high thing would look like, you know. And then when it comes to of course, you know you might you might change your thought process someday, correct? Whether you want it to be a three-part framework of impact response and price. Um so here's where you would really want to like inspect and and be very careful about how the system is creating its own prompt, which is fantastic because one year ago, you know, putting prompt pipelines um together was very, very difficult to do um with just vibe coding. Not even one year ago, just a couple of months ago. Oh, like yeah, it's in doing yeah, you know, these kind of prompt pipelines are actually quite quite tough to do.
SPEAKER_00We spent a lot of time working on the prompts. Last year we were working on some projects and most of the time was spent trying to tweak the prompt to give us certain output because the LM is just not behaving, and now it's like we literally we didn't do anything. Yeah, we were just there. Exactly. Yeah. So I mean I also have no job, so I don't know. That's why I'm on a podcast. Hopefully to become a full-time comedian or something.
SPEAKER_02Yeah, I mean, of course, Brian, I can share this, uh, share whatever all the code that we made with you. Yeah, and you can you can kind of figure out how to change it.
SPEAKER_00So you need to first get uh Cloud um subscription, the$30 one, and ask it to explain to you how this works, how to use all this thing.
Concluding with a mermaid diagram to understand your vibecode
SPEAKER_02Or you could just use your your$30 like Chat GPT. And then just ask like, how do I run how do I run this uh Python script? And then how do I how do I put in my API key? And how do I do that safely? Because you don't want it to be leaked. Yeah. So I think I think that's how you could um theoretically take it forward from there. And then of course you could also play around with with uh clock code as well. So I just wanted to conclude this with a mermit flowchart, which I find quite helpful in just understanding you know the flow of data sometimes. Sometimes it gets very complicated, but so I'm not sure whether this will be hard to understand. So yeah, I mean maybe maybe Yao Hong if you don't mind just explaining this briefly.
SPEAKER_00Alright, so this explains the code, uh what the how the code works, right? So earlier we talked about Google News, RSS feeds, the few sources we have for Reuters Energy, Reuters commodities, etc. If filter and dedupe. Okay, so dedupe is short form for D because a lot of the headlines repeat again, right? So we need a step to clean up. So in the last um 24 hour, I assume that it just filters by that, and they use title similarity with an 80% threshold. So how similar are they? Are they uh in in terms of the title? Right? And from here, Gemini would extract uh them with the hard facts only, right? Uh with some guidelines on the claims, the source bias label. I don't know what that means actually. So you see price and cost, yeah. Okay, anyway. Yeah, and then it goes in. Finally, they analyze the problem that we saw earlier. So this is actually quite helpful for someone who doesn't really understand code, right? You can kind of visualize what's happening at each step.
SPEAKER_02Yeah, and I think that's still quite important, right? Because it's very important, yeah. You don't want to just like rely on the system and blindly accept things without knowing how it works or without even seeing the prompt that is going on behind it. Um so I thought it was just good to end off with this.
SPEAKER_01So that's like a very nice um uh this is like sort of a mind map, right?
SPEAKER_00Yeah. Correct, correct.
SPEAKER_01On how the code works.
Reflections and conclusions
SPEAKER_00Yes, yeah, yeah. So that's you can explain to your boss. Oh, like why I did this. Yeah, what how each step works, right? You will sound so much smarter. Yes, yeah. Yeah.
SPEAKER_02Yeah, yeah. It is the new skill, right? To to be able to uh orchestrate, like or to be able to picture what the flows look like. But maybe I'll just stop sharing my screen. So maybe Brian, we had one hour just kind of jamming on this. Uh it was quite unconventional from our past two episodes because we skipped a lot of permissions. Yeah, and we just jumped right straight without really planning. Yeah, and maybe to caveat like that requires some experience so you wouldn't jump straight to to dangerously skipping permissions uh on your first day of like vibe coding. But maybe, maybe Brian, if there's any um any reflections on what you saw so far that you didn't manage to mention just now?
SPEAKER_01I think overall it was very good. Genuinely, I thought it wouldn't work, but then like in such a short span of time, they managed to scrape out so many news articles, like hundreds over, and from there pull out um actual hard facts and from there also draw a conclusion. So I believe this was also quite different from the previous two episodes, right? So I think that was very interesting, and um I'll definitely take a look and try on my end also. Yeah, so thank you for thank you for that.
SPEAKER_02Yeah, yeah. Anything you would like to close with?
SPEAKER_00Uh there are quite a lot of few things that I would improve in the process for scoring and and evaluation. I'm we didn't get time to go through. Uh that makes the difference between vibe coding and actually making something in production. Yeah. But it's okay, one hour quite short. But yeah, so we got pretty far already.
unknownYeah.
SPEAKER_02Maybe if we had like another half an hour, right? Like the the eval evaluation process that Yao Hong's talking about. Correct. Did you do you mind sharing a bit how that half how that time would look like?
SPEAKER_00Like in terms of how that time would look like uh we will probably get one of those or a few out of those articles and uh give it more quantitative in terms of how it calculates the scoring. And also like specifically which part of the text that we want to see, right? And then using those evals, we run the model through it and say, okay, this is the output that we want. So in case you make any changes prior to the steps, we should actually still come back to the output that we desire now. So it's a bit more involved and maybe too advanced for a beginner, but so maybe yeah, maybe not the right thing to do. Yeah, it's not a good idea. Just tell people that there's a possibility.
SPEAKER_02We'll get there, we'll get there. If you didn't catch that, uh yeah, it's it's just you know, realizing that you know, I I think a lot of the outputs that AI will produce will take days, if not weeks, if if not even months, to improve sometimes. Uh maybe this one would be a bit would lie on the shorter time frame, but you would not immediately trust everything. I mean, you will be extremely skeptical until you do enough kind of evaluations and test that you know the outputs are actually something you could trust, and then you could go and have fun with your the extra time you have. Trying to tweak your models.
SPEAKER_00Yeah. There's so much more to be done now, actually. Yeah.
SPEAKER_02But but anyways, um Brian, uh um I'll send over the files, of course. Uh sorry we didn't get to do a bot, but I think the purpose was quite different today. Um we basically tried to see if uh we could build something that replicated the way that you would analyze uh news articles. So it seems like it it performed uh pretty up to expectations, if not more.
SPEAKER_00Uh I will give it a six out of ten just plus.
SPEAKER_01I think I think eight, lah.
SPEAKER_00Oh yeah, that's so nice, right? Uh uncle more demanding.
SPEAKER_02Yeah. But but thanks so much for joining us, Brian. Oh, thank you for having me. Thank you for helping. Yeah. All great. And yeah, have a good evening.
SPEAKER_01Hey, you too.
SPEAKER_02Alright. Alright. See ya. See you. Thanks so much for joining us for this episode. If you found this helpful, feel free to leave us a rating on your favorite podcasting apps or like, share, subscribe on YouTube. And if you want to get into the next episode, feel free to fill up the form as well. So, yeah, thanks so much for joining us. Uh, really appreciate that you even made it to the end. And see you on our next episode. Bye.