---
title: "Comment by Ben MacDonald on \"Building a Document-based Question Answering System with LangChain, Pinecone, and LLMs like GPT-4 and ChatGPT\" | Hashnode"
description: "thanks so much for this guide! in step 4 &#39;importing necessary libraries:&#39;, the third function throws an error for me. do we need to &#39;import pinecone"
url: "https://hashnode.com/posts/building-a-document-based-question-answering-system-with-langchain-pinecone-and-llms-like-gpt-4-and-chatgpt/64380ce4f13ae38acfbfe03f/comment/6453cb86970f6d0644b289de"
---

[Discussion](https://hashnode.com/posts/building-a-document-based-question-answering-system-with-langchain-pinecone-and-llms-like-gpt-4-and-chatgpt/64380ce4f13ae38acfbfe03f)

Comment [Building a Document-based Question Answering System with LangChain, Pinecone, and LLMs like GPT-4 and ChatGPT](https://hashnode.com/posts/building-a-document-based-question-answering-system-with-langchain-pinecone-and-llms-like-gpt-4-and-chatgpt/64380ce4f13ae38acfbfe03f)

[Ben MacDonald](https://hashnode.com/@bennymac)

[May 4, 2023](https://hashnode.com/posts/building-a-document-based-question-answering-system-with-langchain-pinecone-and-llms-like-gpt-4-and-chatgpt/64380ce4f13ae38acfbfe03f/comment/6453cb86970f6d0644b289de)

thanks so much for this guide! in step 4 'importing necessary libraries:', the third function throws an error for me. do we need to 'import pinecone' if we also have 'from langchain.vectorstores import Pinecone' further below?
