30 秒でわかる
In April 2023, Matthew Berman walks through a Google Colab notebook that downloads a PDF, builds a temporary vector index with LangChain and Chroma, and queries an OpenAI model. Although he calls the workflow fine-tuning, it retrieves document context rather than updating the model’s weights. Its answer of $104.2 billion for Meta’s 2022 revenue is incorrect: Meta reported $116.609 billion. No sponsor is disclosed in the video.
- 1PDF retrieval rather than fine-tuningThe notebook indexes PDF content and queries a model; it does not train or update model weights.
- 2The componentsLangChain coordinates the workflow, an OpenAI API supplies model services, and Chroma stores vectors in the shown session.
- 3Load the documentThe walkthrough downloads a PDF, puts it in a docs folder and creates document loaders.
- 4Temporary vector indexThe shown Chroma configuration is non-persistent, so its data does not survive the runtime.
- 5An incorrect financial answerThe model says $104.2 billion; Meta’s official 2022 revenue was $116.609 billion.
ポイント
- The demonstrated approach is retrieval-augmented question answering, not model fine-tuning: indexing document text does not change model weights.
- The 2023 notebook uses LangChain, an OpenAI API, PDF tools and a temporary Chroma index; APIs and dependencies may have changed.
- The shown $104.2 billion answer for Meta’s 2022 revenue is wrong; Meta reported $116.609 billion.
- A temporary index is lost with the runtime unless persistence is configured, and API calls may transmit document content to a provider.
- Keep API keys out of shared notebooks and validate answers against the source document.
チャプターごとに整えた全文を読む
A Colab PDF question-answering workflow
Berman introduces the notebook and its libraries. The approach retrieves context rather than fine-tuning model weights.
I show a Google Colab notebook for asking questions and requesting summaries from a PDF. I call it fine-tuning ChatGPT, but the shown workflow is retrieval-augmented question answering: it indexes document text and supplies retrieved context to a model, without updating that model’s weights. It was recorded in April 2023 and library interfaces may have changed.
The notebook draws on an earlier GitHub project and combines LangChain, an OpenAI API, Chroma and PDF-processing libraries. LangChain connects the components; text is extracted and indexed as vectors so relevant passages can be retrieved for a question. Embeddings and model calls can involve external services, so document content and service terms matter.

Setup, PDF loading and indexing
The video installs dependencies, configures an API key, downloads a PDF and creates an index. The example uses temporary storage.
I run the installation cells and configure an OpenAI API key. The screen uses a placeholder, but for actual use a key should be stored in a secret or environment mechanism rather than embedded in a notebook that may be shared. API use can incur charges, and the old package versions and installation steps are not guaranteed to work unchanged today.
The example imports an unstructured PDF loader and a vector-store index creator. I configure document processing to use a CPU and mention that a suitable Colab GPU may accelerate some operations. Whether a GPU helps depends on the installed tools and workload; enabling one does not alter the model through fine-tuning.
I download Meta’s earnings PDF from the web, create a docs directory and move the file into it. I set the folder path and instantiate loaders for its contents. For a different PDF the filename and location must match, and scanned documents or complex layouts can require different extraction or OCR handling.
I install Poppler utilities after encountering a missing dependency, then create a vector index from the loaders. The output identifies an embedded Chroma setup without persistence. In this demonstration the index is temporary and will be lost when the Colab runtime ends unless persistence is configured.

Querying and checking results
Berman asks about revenue and risks. The generated revenue answer conflicts with Meta’s official report.

I ask how much revenue Meta made in 2022, and the displayed answer says $104.2 billion. That answer is incorrect: Meta’s [official full-year results](https://investor.atmeta.com/investor-news/press-release-details/2023/Meta-Reports-Fourth-Quarter-and-Full-Year-2022-Results/default.aspx) report $116.609 billion. This illustrates why retrieved answers, especially financial figures, must be checked against the original document.
I also ask about Meta’s biggest risks; the response summarizes topics including macroeconomic conditions. I encourage viewers to adapt the notebook to other documents and questions. Retrieval and generation can omit context or make mistakes, so useful results still need source verification.
同じチャンネルの記事
34:21EN
0:26EN
0:36EN
0:21EN
25:50EN
32:20EN