Skip to content

Question answering to the youtube Video with the help of Langchain and LLM(OpenAI API)

Notifications You must be signed in to change notification settings

Utsav0702/Youtube-Video-QnA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

YouTube Video QnA using LLM

Overview

YouTube Video QnA is a project that leverages the LangChain Python library to perform question and answer (QnA) operations on YouTube video transcripts. The project utilizes various modules from LangChain, including document loaders, text splitters, vector stores, and retrievers, to create a seamless QnA experience for users.

How It Works

  1. Transcript Retrieval:

  2. User Embeddings:

    • The text chunks are converted into embeddings and stored in a vector database. This is achieved using LangChain's vector stores module.
  3. Vector Database Indexing:

  4. Query Retrieval:

    • When a user submits a query, the vector database retrieves relevant documents using Chroma Self Query.
  5. QA Chain Integration:

    • The retrieved documents are loaded into the Question Answering (QA) Chain, which is documented here.
  6. Answer Generation:

    • The user's query is used to fetch the relevant document from the vector database.
    • The document is then fed into the LangChain Language Model (LLM) chain for answer generation. This process is detailed in the Question Answering documentation.

Usage

To use YouTube Video QnA, follow these steps:

  1. You will need your OpenAI's API key.
  2. Install the required dependencies using the provided links.
  3. Retrieve the YouTube transcript and save it locally or in a database.
  4. Split the transcribed text into chunks using the specified text splitter.
  5. Convert text chunks into embeddings and store them in a vector database.
  6. Submit user queries to retrieve relevant documents.
  7. Load the QA Chain and feed the document to the LLM chain for answer generation.

Dependencies

  • LangChain Python library: LangChain Documentation
  • Other dependencies specified in the provided links for loaders, splitters, vector stores, and retrievers.

License

This project is licensed under the MIT License.

About

Question answering to the youtube Video with the help of Langchain and LLM(OpenAI API)

Topics

Resources

Stars

Watchers

Forks