OpenAI’s new GPT-4 api to ‘chat’ with a 56-page PDF document based on a real supreme court legal case.
OpenAI recently announced GPT-4 (it’s most powerful AI) that can process up to 25,000 words – about eight times as many as GPT-3 – process images and handle much more nuanced instructions than GPT-3.5.
You’ll learn how to use LangChain (a framework that makes it easier to assemble the components to build a chatbot) and Pinecone – a ‘vectorstore’ to store your documents in number ‘vectors’. You’ll also learn how to create a frontend chat interface to display the results alongside source documents.
A similar process can be applied to other usecases you want to build a chatbot for: PDF’s, websites, excel, or other file formats.
There is a Langchain cookbook that goes through how to use the components.
0:00 – Introduction
1:12 – Conceptual Docs
1:54 – Cookbook introduction
2:27 – What is LangChain?
5:10 – Schema (Text, Messages, Documents)
8:54 – Models (Language, Chat, Embeddings)
12:03 – Prompts (Template, Examples, Output Parse)
20:45 – Indexes (Loaders, Splitters, Retrievers, Vectorstores)
26:39 – Memory (Chat History)
28:12 – Chains (Simple, Summarize)
32:52 – Agents (Toolkits, Agents)
Some are not impressed with Langchain. It is just automating tasks which sysadmins have many ways to do. However, Langchain is quite easy to get going with GPT-4 and a lot of people are using Langchain and Pinecone.
Brian Wang is a Futurist Thought Leader and a popular Science blogger with 1 million readers per month. His blog Nextbigfuture.com is ranked #1 Science News Blog. It covers many disruptive technology and trends including Space, Robotics, Artificial Intelligence, Medicine, Anti-aging Biotechnology, and Nanotechnology.
Known for identifying cutting edge technologies, he is currently a Co-Founder of a startup and fundraiser for high potential early-stage companies. He is the Head of Research for Allocations for deep technology investments and an Angel Investor at Space Angels.
A frequent speaker at corporations, he has been a TEDx speaker, a Singularity University speaker and guest at numerous interviews for radio and podcasts. He is open to public speaking and advising engagements.