Searching PDFs, Prompt Engineering Marketplaces
Use Case of the Week - Search Tables in PDFs
I’m trying something new. I’m going to accompany a Use Case of the Week module with a blog post that shows it in action with actual code.
This past week I dug into searching tables in PDFs and extracting answers from them. PDFs show up everywhere and are a foundational part of the knowledge economy. Given how widespread it is, it’s shocking how bad the search experience still is. At best you have Control-F available which results in either a hundred matches or zero matches and still requires you to scroll through all the hits in the hope you find what you’re looking for. If the PDF is a scanned document, then all bets are off.
However, both OCR and NLP have made significant leaps in the past few years mainly thanks to deep learning. You can use services like AWS Textract to extract text from both text and scanned PDFs including text that’s located in the table cells and then index them with semantic search models. Finally, you can apply a question-answering model such as GPT-3 on top of the search results to generate a concise answer. The entire pipeline of technologies is explained in greater detail in my blog post.
Prompt Engineering Marketplace
Louie Bacaj (who runs a great course called Newsletter Launchpad and is a big reason why this newsletter exists in the first place) sent me a TechCrunch article that highlighted a startup called PromptBase.
PromptBase is a marketplace for buying and selling GPT-3 and DALLE prompts. Currently, its listings are mainly geared toward generating images and art. I predict we’re going to see many prompt marketplaces pop up, especially for specific types of domains and tasks.
Taking a step back, why is a prompt marketplace useful?
Prompts are nuanced. You have to tell the model exactly what you want it to do with words and different wording can have a huge impact on the output. How the model exactly behaves is still being heavily researched but for now, prompt engineering is definitely more art and trial-error than science. This has cost implications since LLMs such as GPT-3 are pay per use.
The trial and error required to nail each type of task lead me to believe that there will be a demand for task-specific prompts which will save the buyer a lot of time and money.