From the course: Developing RAG Apps with LlamaIndex and Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Hands-on: Querying a PDF file

Hands-on: Querying a PDF file

Next we are going to do yet another RAG system application here and we have this Berkshire PDF file. So this is the annual report that Charlie Munger and Warren Buffett usually write for their investors and everybody. So this is what we're going to be using to drop in to add into our RAG system so that we're able to converse with it. Now the idea here is very simple. I want to be able to show you how we can actually use some of the loaders, such as PDF Reader in this case, to read this PDF file in our data. Remember, you're going to have access to all of this, so no worries, okay? All right, so let's go back and to our Berkshire RAG TS, that's what I created here, and we do the same thing that we do all the time. We're importing dot env, path, and everything, okay? So we are loading the environment variables, and what I've done also is that I just imported the pdf reader and the vector store index from llama index okay so let's go ahead and create our async function here and what it…

Contents