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

Build a Transparent Question-Answering Bot for Your Documents with LangChain and GPT-3

11 min readJul 22, 2023

--

Photo by Justin Ha on Unsplash.

A Question Answering system can be of great help in analyzing large amounts of your data or documents. However, the sources (i.e., parts of your document) that the model used to create the answer are usually not shown in the final answer.

Understanding the context and origin of responses is valuable not only for users seeking accurate information, but also for developers wanting to continuously improve their QA bots. With the sources included in the answer, developers gain valuable insights into the model’s decision-making process, facilitating iterative improvements and fine-tuning.

This article shows how to use LangChain and GPT-3 (text-davinci-003) to create a transparent Question-Answering bot that displays the sources used to generate the answer by using two examples.

In the first example, you’ll learn how to create a transparent QA bot that leverages your website’s content to answer questions. In the second example, we’ll explore the use of transcripts from different YouTube videos, both with and without timestamps.

Process the Data and Create a Vector Store

--

--

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.