While Sneha is typing, just a broad instruction here: the prompt makes a big difference to the output. But nobody has really mastered what prompt we should give in what context. So for now, we'll just try whatever comes to our mind. It's okay. Over time, we will learn.
So I'm going to zoom in a bit on the screen because the font is a little small. "I want to convert a PDF to XML output. Please give some Python code." Okay. Let's make a small change to this, Sneha. Remove the second sentence. Yeah, let it write code, let it not write code, who cares? It will figure it out.
Now, we're saying, "I want to convert a PDF to XML output." We haven't told it what PDF. We haven't told it what XML. Doesn't matter. Why don't you go ahead and submit?
Let's see what it does. It's thinking. Now, one thing you may notice is that at the bottom, Sneha has "agent full access" enabled. Sneha, could you click on that "agent full access" at the bottom? Yeah, that icon has three options. Agent full access means it won't ask you for permission; it will happily go ahead and run code on your machine. That can be good because you are not bothered, meaning it will not bother you, but it can be bad because we don't know what code it is running, and that code might delete some files that you didn't want it to delete. So for now, decide whether you want to go the risky route but convenient route, or less risky route but less convenient route. I toggle between these depending on my mood, really, or depending on the question.
Okay. Now you'll notice that it's doing a bunch of things. The whole point of vibe coding is to not worry about what it's doing, how it's doing, etc., but rather to see if it is able to get to a good output.
Question: Anand, just to interrupt, sorry. I just ran the same prompt, but in my case, within a fraction of a second, it gave a Python snippet, a code snippet. It does not go through all the steps.
Answer: Interesting. And then what we'll do, Sushant, is maybe look at your screen in a few minutes. We'll get there shortly.
Question: Raja's question was, "Shall we follow the same settings for agent full access?"
Answer: For now, yeah, go ahead, Raja. If your machine gets deleted, you can blame me later. But very unlikely. Okay, thank you.
Answer: Okay. So what it's done is it's created a Python file. But at the end, notice that the last comment it says is, "If you share the PDF path, I can run the conversion now." Okay. So, Sneha, why don't you tell it, "Run it on all my PDFs in this..." Don't, don't, don't give it... the whole point of vibe coding is to do as little work as possible. Tell it, "Find the PDFs and run it." Let it do the work. While it's doing it, Sushant, could you share your screen, please?
Question: Yeah, I think now it is happening. I actually gave the full access to the agent. Now it is doing the same. Previously, I, the access was limited. That's why it just threw me a Python code.
Answer: Interesting. Let's take a look at the screen.
Question: Yes, yes, yes.
Answer: So you will notice that tradeoff, and this is a possible approach you could use. You could start with agent access and then switch over to full access if it's bothering you too much or it's not doing the stuff. Yeah.
Question: Yeah, initially I gave this one, but without full agent access, it threw me this output, this snippet, code snippet. But then I again I gave it with full agent access, then it started going all the steps. Thinking.
Answer: Nice. Perfect. Now the good part here is it is able to correct itself. It will run, it will find errors, it will change the code, and get to the output. But as far as this workshop is concerned, we are less worried about the code and more worried about the output. So if it gets there, good. If not, we will tell it to do something different.
Question: Has anyone managed to complete a script and gotten some XML output? If so, just unmute and speak or put a "yes" in the chat window.
Answer: Okay, well, now Sushant, you have one. But here's a request to everyone: if you, once you have, okay, Sneha, you got a "yes" as well. Once you have gotten an XML, please put in a "yes" in the... Actually, let me add a column here in the Excel sheet: "Generated XML," and on that, you could please fill in a "yes" or a "no."
Question: Sushant, could you open the XML file that it generated for you?
Answer: Yes. The one below that, yes. Okay, "Bank of New York Annual Report 2023." Yeah, if you click on it, it might open. If not, it may have generated it somewhere in that file.
Question: It is not opening actually.
Answer: Got you. Could you increase the size of Visual Studio Code so that we see it in the full window? Yeah. Now on the top left, there is... or okay, can you go to File > Open? Or yeah, click that, either way is fine. Open File. Uhm, not here. All right. Can you click "Cancel"? And just ask it, "Where did you create this file?" And once you have it, please open it. In the meantime, Sneha, could you share your screen and let's see if we can see your output.
Question: After that, Souvik, you are getting an error starting conversation. We will take a look at your error very soon. Anupama, your hand is raised.
Answer: Yeah, Anand, I have not given the full access. I am in the agent mode right now. It is asking me to do a lot of installations, PDFMiner.six and everything. So where are all these installations being done and so I had that question.
Question: I also have that question. I have no idea. Why don't you ask it?
Answer: Okay, sure, I'll do that. Thank you.
Answer: So, let's take a look, Sneha, at the XML file that you just had open. Okay. What are your observations about this? Is this what you wanted?
Question: No, because my PDF file contains some content text.
Answer: Hmm. Got you. So what do you want in the XML?
Question: So I want some text which is present in my PDF.
Answer: Got you. Then as a next step, why don't you say, "I want some text that is present in my PDF"? Just continue that conversation and let's see where it goes.
Now, in the meantime, Souvik, could you share your screen? We'll see if we can resolve the error.
While Souvik is bringing the screen up, I'll make an observation. When we give a prompt like, "Convert this PDF to XML," I, as a programmer, don't know what I'm supposed to do. It doesn't know any better. If we take it a step further and say, "Give me the text," give the text what, as one big chunk? Should we structure it in some way? What am I supposed to do? Again, I, as a programmer, don't know what to do.
There is, in fact, literally a profession of people whose job is to explain to programmers what we want. We call them business analysts, sometimes they play the role of project managers, whatever. But effectively, all of you now have changed your roles to also be analysts. Meaning, earlier, you would tell somebody, "This is my requirement," and they would translate it, figure it out, explain it to a programmer, whatever. Now you are having to do that to a somewhat dumb programmer. An LLM doesn't really understand you well. Soon, you will pick up the skill, just like everyone picked up Excel. We will also pick this up, and it's largely practice.
Cool. Souvik, I can see your screen. Let's take a look at what Codex says. Just type "hi." Or anything, yeah, for that matter. Okay, still running. Fine. Can you open, can you click on the config.toml that you have open? That looks fine. Could you open the environment settings? You had opened the environment settings using the Start menu.
Question: Yes.
Answer: Yeah, could you open that?
Question: I got the problem. Yes.
Answer: Yeah. And it does not look like the LLM Foundry environment variable is set. So click on "New." Type LLM_FOUNDRY_TOKEN in caps. No underscore between LLM and Foundry. LLM Foundry is one word. After that, there is an underscore, token. LLM_FOUNDRY_TOKEN.
Question: Not there.
Answer: No, here in variable name, LLM Foundry. After that, type an underscore, and then a token. Yes. Now, copy your LLM Foundry token as the variable value. You'll find that...
Question: Yeah, I think the problem was, I, the token was not saved or something. That's why it is not running maybe, because I saved this one.
Answer: Got you.
Question: Anyway, I got the problem. Yeah, thank you.
Answer: Perfect. No worries.
Answer: Okay. So, I'll just check the chat to see if anyone else has... okay, we have Venkatesh and Nitin generating XML files. Venkateshwaran, maybe you could share your screen and let's take a look at the XML that you've generated. And I also see on the Google Sheet that Srini has generated an Excel, Praveen has generated an XML, and cool, at least a couple of people there. No issues, Venkateshwaran, we can maybe go on to Nitin. We'll skip you for a bit. Ganesh, maybe you could share your screen?
Question: Yes, Anand. I'll do that.
Answer: Let's take a look at the XML.
Question: Yeah.
Answer: What we'll do next is make some tweaks to it, see how it improves.
Question: This is the XML I got, where it is taken the character bounding boxes. It has taken the bounding box for each character.
Answer: Perfect. What do you want, though?
Question: It should be converted into an NLM XML or any other, like, JATS XML like that, so where the paragraphs will be like, you know, like paragraphs, and math will be in MathML like that. Those kind of conversions we require.
Answer: Great. Why don't you ask it to do one of those? And let's see how it works.
Question: I already done it. Okay, here I had done it. Convert PDF to NLM XML. But it is giving the things and then it is asking me to integrate any of these particular things, okay? Grobid or Sermat to get scholarly structure like that.
Answer: Okay, sure. Which of these are, if you want it to do all of these, you can ask it to do all of these also.
Question: Okay. So integrate like that, I can type?
Answer: Yeah, why not?
Answer: One of the things I find powerful is the model itself giving us guidance on what to do. In this case, it is giving us ideas. And that sort of a thing can be pretty useful. So the next step that we will take is, how do we encourage certain kinds of behaviors? So we will come to that.
Okay, Raghav, you mentioned in your case, you got the XML without it asking you which PDF file. So maybe it found some PDF files somewhere. Why don't you ask it, "Where did you get the PDF file?"
Question: Vinod, your question was how to install Python. Could you share your screen? And we'll try two things. One, we will ask it how to install Python. And then, let's see if we face any issues with that. Are you in a position to share screens, Vinod?
Answer: Okay, I guess your screen is coming up. You may want to unmute yourself.
Question: Yes.
Answer: Perfect. Sure. Now, let's go to Visual Studio Code, please. Great. And you can open Codex and ask it, "How to install Python?" Just enter. Could you make this, make this full screen and also press Control and Plus to increase the font size a little? Control and Plus will increase the font size. Yeah, great. That makes it more readable.
The beauty of this is that Codex can be used just like you're using Gemini or LLM Foundry. The only difference is that it is additionally writing code to do whatever you want it to do. Now just scroll up a little bit. It's saying blah blah blah, download something, blah blah blah.