From the course: Hands-On AI: Building LLM-Powered Apps
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Solution: Enabling load PDF to Chainlit app - Python Tutorial
From the course: Hands-On AI: Building LLM-Powered Apps
Solution: Enabling load PDF to Chainlit app
- [Instructor] Welcome back. Hopefully you enjoyed the exercise to add PDF loading and processing capability to our chat with PDF application. So that's go to app slash app.py. Let's first load the PDF file. We will use PDF plumber loader to load the temporary file that user have uploaded and then we can use loader.load. There are a wide variety of PDF loaders in the lichen library and I am picking PDF plumber only because I am familiar with it. You are free to use other PDF loader as well. After we load the PDF file, the file is long so we will have to chunk them into smaller documents as we mentioned previously. So we will use one of Lichen's document transformer called recursive character text Splitter to split our document into pieces. As we mentioned in the previous videos, we do have to budget and keep in mind about large language models contact length. Since we're using GPT 3.5, 16K, it has 16K context length. So if we set chunk size to 3000 and we are retrieving five tokens…
Contents
-
-
-
-
(Locked)
Retrieval augmented generation3m 30s
-
(Locked)
Search engine basics2m 32s
-
(Locked)
Embedding search3m
-
(Locked)
Embedding model limitations3m 15s
-
(Locked)
Challenge: Enabling load PDF to Chainlit app48s
-
(Locked)
Solution: Enabling load PDF to Chainlit app5m 4s
-
(Locked)
Challenge: Indexing documents into a vector database1m 50s
-
(Locked)
Solution: Indexing documents into a vector database1m 43s
-
(Locked)
Challenge: Putting it all together1m 10s
-
(Locked)
Solution: Putting it all together3m 17s
-
(Locked)
Trying out your chat with the PDF app2m 15s
-
(Locked)
-
-