Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

Member-only story

Leverage LLMs Like GPT to Analyze Your Documents or Transcripts

6 min readMar 31, 2023

--

(Original) photo by Laura Rivera on Unsplash.

ChatGPT is definitely one of the most popular Large Language Models (LLMs). Since the release of its beta version at the end of 2022, everyone can use the convenient chat function to ask questions or interact with the language model.

But what if we would like to ask ChatGPT questions about our own documents or about a podcast we just listened to?

The goal of this article is to show you how to leverage LLMs like GPT to analyze our documents or transcripts and then ask questions and receive answers in a ChatGPT way about the content in the documents.

tl;dr

  • This article uses OpenAI’s ChatGPT gpt-3.5-turbo model, which requires an API key.
  • The langchain package, a framework built around LLMs, is used to load and process our documents (Prompt Engineering) and to interact with the model.
  • A colab notebook containing the whole code of the article can be found here.

Prerequisites

Before writing all the code, we have to make sure that all the necessary packages are…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.