Anand: Let's rebuild. Now, let's ask it the following: "Find errors in the analysis that generated the data visualization."
One small correction, "that generated D". And no question mark. Instead, you could add a full stop please. "Focus on numerical errors." Numerical and statistical errors.
Right, go ahead. Uh, no, wait, let's… okay, let it run, let it run. No harm. No, no, no, let it go ahead. What I would have added, and this is something that we can explore going forward is, reading the output from here, from this window, has two problems. One, the format is somewhat constrained, copy-pasting is a little difficult, that sort of a thing. I usually have it generate any output that I want to substantially review into a markdown file. You can always add that later and say, "save this into errors.md" and it will do the job. But doing it upfront allows me to review it as a markdown file and save it and so on. This is behind the scenes using codex or not?
Suresh: This is, I think this is, this model is using, what am I using? I think it's using Claude or something. Backend, this ID is wrapped under Claude only.
Anand: Okay, fine. I what I will do is show how you can, in case this sort of a thing happens, you how you can go back to the logs, and the logs analysis can be pretty powerful. But why don't we scroll up, maybe increase the font size for others to read, and we'll see some of the errors.
Suresh: Control plus. Yeah.
Anand: Let's scroll up a bit.
Suresh: Yeah, for the third prompt, it has analyzed that analysis file, Python file that we have tried just…
Anand: Good. Let's jump straight to the critical errors below.
Suresh: Yeah. Go ahead. Ah, critical… memory growth calculation error.
Suresh: Let's skip the recording that I liked and the analysis, the analysis. And generally the data visualization focused on the numerical. Okay.
Anand: Now the first one it's saying is, in case the denominator is zero, there'll be a...
Suresh: Inaudible. As division by zero is correct, wrong. Problem, if finished, number is zero, it's called division by zero. This condition should be showing correct calculation. What is wrong calculation as wrong. Okay, but how do I analyze it?
Anand: That and the second one are somewhat smallish issues. Take a look at the third one.
Suresh: Frame latency values not, not on, rendering data.
Anand: It's saying that there is a frame that took 44 minutes, which is crazy.
Suresh: Middle seconds. The suggested data is either two timestamps instead of frame rates. Inaudible, microsecond data. This file has some. Okay.
Anand: Which is an interesting observation. And this is the sort of thing that will lead us deeper to figuring out, forget whether the analysis is right or wrong, whether the data itself has issues.
Suresh: Yeah.
Anand: And item number five is also seems interesting. Could you scroll down? So it's saying, and this is a subtle one, it's saying that this is the peak and average, but we're not looking at the distribution around it. Arguably not an error of commission, more an error of omission. We have not considered something. A different kind of issue that we're looking at.
What I find is if you have, well, you know the saying, right? Many eyes make all bugs shallow. If you have not one reviewer, but a dozen reviewers, and synthesize across those, invariably it will find stuff that is wrong. Many of which we may want to say, "Yeah, I will excuse it." But the odds of something that is incorrect going through become less and less. It's like a sieve. And we can have multiple sieves as filters, run potentially by different LLMs. And each has its own flavor of doing the analysis.
Now, let's try one other thing. And then we shall move on. Sorry, I was wondering who had the third dataset. Sorry, somebody else had an… Okay, Vidul, you had another dataset, right? So, before we move on to Vidul in a few minutes, Suresh, how might we add test cases to this? Any thoughts?
Suresh: Test cases. See, the data that you're looking at, right? If you look at the test case, if you... not line of thought. Let me see.
Anand: And others, please feel free to pitch in if you have any thoughts as well. How might we test or add test cases in something like this?
Suresh: This is based upon, see, based upon the problem statement, we should generate test cases.
Anand: Correct.
Suresh: The ideal principle. Yes. If you say energy score statistic error is is something that I have to look at. Yeah. Let me vibe it. The list of…
Anand: Cool. I'll just read that out. What are the list of test cases that the performance QA team has to test to debug and do a deep down QA for the energy statistical score issue? Which is great. Now, what this was doing was, firstly, a great thing to ask the LLM the question. And was using a specific issue. You obviously have the option of going broader in two ways. One, doing the same thing for each of the issues, and you could even upfront ask, "How do I go about testing these?" Or potentially even a broader question, which is, I have this codebase, this is the problem that I'm trying to tackle. How might I go about testing it? Why don't you, in while the session is going on, try that out, while in the meantime, Vidul let's...
Suresh: I don't have a codebase. This is an external app. I don't have the codebase to identify why this energy, if you say one problem statement, energy score statistics error, right? I don't have the codebase to analyze what method or function is using this energy score. This is a third-party, some random dataset I have pulled in. Right. So I don't have the master code to analyze, to deep down, right?
Anand: The analysis.py script that it generated is our code, right?
Suresh: Sorry, can you come back?
Anand: analysis.py on the left is the code.
Suresh: Okay.
Anand: We've just generated the code already. Why don't you click on it? On analysis.py. Here it is.
Suresh: Analyze data from CSV files and generate a comprehensive Excel report. It has analyzed the data, the original data, and created this comprehensive report. Right. That's what this Py code has. But it doesn't have, it doesn't have the root cause of this energy score statistics error.
Anand: Maybe, maybe not. I see your point because that is coming from the underlying… Okay, wait. Let's take a look at the energy statistical score issue. Where exactly did we see this?
Suresh: Yeah. So this is an issue. This is a battery usage issue of an app, saying that it has touched 99.67% of utility of peak energy score.
Anand: Could you select that?
Suresh: This one.
Anand: Yeah. Now, it's not saying 99. something percent. It is saying an absolute value of 999.67.
Suresh: This is something like this. Battery related kuch graph file hai. Energy consumption analysis. Okay. With respect to timestamp when I'm using that app, there's a touch point at this time period that has a maximum utility of 99.67. Out of all the allocated battery, it has touched 90, if say at the, the battery of that phone is sitting on 80%, at that point, I have used 99.67 utility there, out of that is allocated. Got you. That's one hotspot that it is giving it to me. So now if I have to test it, I have test cases that. But answering back to your query, if I want to deep dive and analyze what's causing this, right?
Anand: I see what you're saying. What we want to do is test the analysis process.
Suresh: Okay. Okay.
Anand: Which is what analyze.py does and it is entirely possible that this statistical error is an analysis issue, unlikely.
Suresh: Okay. Okay. Not a real issue. Okay.
Anand: And in which case, how would we go about writing test cases for our analysis process? We've asked an LLM, "Do the analysis." It has done the analysis. We asked it, "What mistakes did you make?" It told us. Now, we don't want to ask it every time what mistake you made. What we are now abstracting it out to is, I did vibe analysis, I got a result. From the analysis, I'm converting it into repeatable code. But the testing that I did, I want to convert that to repeatable testing as well. That is the direction that we are going in. Okay. So put another way, how can we add test cases to analysis.py?
Do give it a shot. In the meantime, Vidul, could you share your screen? We'll try a few other techniques now. But in the meantime, my request to others is, please use whatever public data you have. Create a data story out of that. And put it onto GitHub and share the link on the Google Sheet. Let me pause here for a minute. Does anyone have any problem with this? Okay, let's do one thing.
Could I request all of you to fill in column H? I'll share my screen first. And Suresh, maybe you could stop sharing your... Okay, you've stopped sharing your screen, perhaps. I think my screen is visible. Could someone confirm?
Vidul: Yes.
Anand: Okay, thanks. So, please fill in column H, which takes the question, what data set are you playing around with? Any public data set that you have. Please create a data story. It doesn't take more than 10 minutes for the application to run. And you can put in any prompt that you want. If you've started, please put in the data set. If you've completed even better, fill in the GitHub repo link. Since most of you have GitHub repos, and for those of you who don't, just create a repo the way we just saw Debabrata create it. And if anyone has any issues, please let me know. What I'm hoping is as at least one part of the outcome of this workshop is all of you have one published data story with public data. Okay, Vidul, I'll stop sharing my screen. Maybe you could share yours.
Vidul: Yeah. Okay, it's coming up for me. Should be able to see it in a few seconds. Yeah, I can see your screen. Great. Yeah, so I have created this mock data using like two, three rows. And so basically what we do is we have an N8N workflow wherein we upload a CSV file and we have particular short prompts. So suppose for a product you want the model to, like to pose in a certain way, we give each short prompts, which you can see here, short one, short two. So we have around 10 short prompts. And accordingly, we have input images also. So right now we have mannequin images and overlay images of the product, which we give so that Nano Banana can work on the prompt and give me the output image.
Now there are many issues which we see wherein we see that okay, maybe due to rate limiting or maybe due to latency issues, the, like the model does not give us the correct amount of output images or sometimes it also does not generate the correct output based on the prompts. So I've just collated everything inside this data as per like what QC we do and how do we pass or fail the product and what do we go about for each product. And we also have the time, how much time does it take and how much time does it take for each person to QC and and so on. So yeah.
Anand: Great. Now are you using Codex or something else?
Vidul: Yeah, Codex. So I downloaded VS Code and I have Codex plugin.
Anand: Perfect. There seems to be a bit of an echo. Maybe it's some other... Okay, yeah, the echo's gone. Perfect. Let's do this now. Rather than asking it to, or okay, why don't you go ahead and type out a prompt as to what analysis you want to do? Okay. Don't press enter at the end. Yes. I was just trying to...
Anand: Yes, please. No, if it's, you've opened the same folder, right?
Vidul: Yeah, I have opened the same folder. Do you not want me to add it?
Anand: Auto context should... Okay, no, no, go ahead. Nothing, no harm. Please add.
Vidul: So what I did was I added, like I have two files. I'll just delete one maybe.
Anand: Ah, yeah, okay, I understood. Yes. All right, perfect. But still, no harm in explicitly providing it a context. So please feel free. But after you do that, yeah, wait, you go ahead. And then I'll guide you on the next step. No, no, don't, don't, don't submit. And if you have submitted, stop it. Yeah, copy this prompt.
Vidul: Okay.
Anand: We'll try a slightly different technique, meta-prompting. Copy it. Now open a new chat, new session, whatever. Right. Paste the same thing, but don't submit. Now, here's the thing. We are not prompting experts. Even if we are, the next model that comes up ends up changing the rules of the prompting game. So, let's ask it how we can improve our prompting. Part of that is largely the planning step. So, in the bottom left, instead of agent, could you select chat? This, yeah, the chat option makes sure that it's not going to write the code. Now, what I'd like you to do is in this prompt, press shift enter a couple of times to add a few new lines and say, suggest a prompt, suggest an improved prompt for this. Suggest an improved prompt for this. I'm giving you very concise versions just to make it easier to type. Normally, I would have said this out louder. Now submit.
So, you have explained your intent. It's like, here's my prompt. But in addition, we're just adding one more thing, which is roughly the equivalent of, yeah, give me a better prompt. Now, why does this help? Invariably, our prompts are, they they include contradictions, ambiguities, and omissions. It has the data, it understands English pretty well, it's pretty logical. Have it do one round of clarification so that we give it better instructions. Let's scroll up. Just glance through it.
Vidul: I mean, is it like it is explaining what to do instead of doing it?
Anand: Yeah. And what I find powerful here, for instance, is, let's read it backwards. It's explicitly asking for actionable recommendations. That is useful. That is exactly what we wanted, even though we didn't specify that right up front. It's also asking for the top and bottom performers and significant gaps. Again, something that we didn't explicitly ask for. But without a doubt, a useful thing to put in. Metrics it's captured properly. So this is effectively only a small improvement to the prompt, but in our original prompt, if there are any mistakes, the amount of comprehension that it has to do to circumvent that, overcome that, etc., we do in in one conversation. And then take that clean prompt, put it into a new conversation to avoid any kind of context rot or confusion. Yeah, copy it. New chat now, not the same chat. The whole point is to avoid polluting the conversation. Now, don't submit it yet. Just paste. Now, in that drop-down where it says chat, you can select execute, or sorry, agent. And now go ahead and submit.
This, as a meta-prompting approach, or you could also call this planning, but planning is slightly different. Planning is where you actually ask it to do, ask it how it's going to execute it step by step and correct it if required. That has value, but for vibe analysis, I find meta-prompting more powerful. And let it run. Oh, yeah, okay, you're going to have to, sorry, can you stop this? And new chat. Paste the same thing. Except, instead of agent, choose agent full access. It's a safe enough operation for this and submit. Great.
Next thing that I want to cover is, over time, you will be using AI coding agents for code analysis, whatever, a fair bit, and these things will pile up. When they pile up, you will want to go back to one of your previous conversations, see what we learned, that sort of a thing.