Git Product home page Git Product logo

bao's Introduction

BaoGPT

BobGPT is an AI project that allows you to ask questions about youtube videos.

  • Web UI (based on Gradio) Gradio Web UI
  • Discrod Discord

In the case, the target youtube video is Let's build the GPT Tokenizer from Andrej Karpathy.

How it works

RAG Diagram

  1. In the pipeline, a input question will be routed to the proper branch, greeting-like or query & answer(QA).
  2. When comes to QA, the LLM will do query analysis: extracted attributes as filters and the question will be optimised and rewriten for better vector retrieving in the vector DB.
  3. The filter conditions and optimised question will be passed to the retriever chain and get some top-k candidates for reranking.
  4. The reranking chain will call cohere API to do the reranking and return the top-n result to LLM for summarisation
  5. The LLM will do the summarisation based on the reraking output and provide the answer and attach the sources to the user.

Install & Run

Before running below cmd, make sure you have figured out the settings in settings.yaml based on your real scenarios.

Install dependencies

# validated on python 3.11.4
# create vitual env 
python3 -m venv .venv
source venv/bin/activate
pip install -Urq requirements.txt

step 1: crawl subtitle from youtube

# Note that below steps take Youtube: https://www.youtube.com/watch?v=zduSFxRajkE as example.

python -m bao.components.crawler.youtube_transcript.crawl -v "https://www.youtube.com/watch?v=zduSFxRajkE"

step 2: data ingest:

python -m bao.components.injest.injest --injest

step 3: launch the serving for both Discord and Web UI

python -m bao

bao's People

Contributors

metaswang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.