Build a RAG System With LlamaIndex(v0.10), OpenAI, and MongoDB Vector Data

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

Комментарии • 22

  • @matten_zero
    @matten_zero 6 месяцев назад +1

    Im building an MVP for my startup and was on my way to building this as a way to search a database and this is a great start.

  • @richmond_a
    @richmond_a  6 месяцев назад

    🧾 Article:
    mdblink.com/polm_ai_stack
    💻 Code:
    bit.ly/3UJVbOc
    📈 Hugging Face Dataset:
    huggingface.co/datasets/AIatM...

  • @Vibhakara
    @Vibhakara 6 месяцев назад +2

    Very concise and informative. Good stuff. Link to github repo is broken !! Please fix it. Thanks and keep up the good work.

    • @richmond_a
      @richmond_a  6 месяцев назад +1

      Thanks for watching.
      And the link is updateted now.

  • @matten_zero
    @matten_zero 6 месяцев назад +1

    @2:30 I vote AI Engineers. A nice simple title (not to be confused with ML engineers)

  • @matten_zero
    @matten_zero 6 месяцев назад +1

    4:13 PALM stack? Ok I can dig that terminology

    • @richmond_a
      @richmond_a  6 месяцев назад +2

      It's POLM stack, the O for OpenAI
      But PALM stack does work for Anthropic.
      That might just be the next video I do 😉

    • @matten_zero
      @matten_zero 6 месяцев назад

      @@richmond_a true haha.

  • @matten_zero
    @matten_zero 6 месяцев назад

    A MongoDB vector database isnt as widely covered with RAG. Well done

  • @DonatFeher
    @DonatFeher 4 месяца назад

    Where are you from Sir? I like your accent and the vid is great too

  • @DonatFeher
    @DonatFeher 4 месяца назад

    At the second step of the article has problems

    • @richmond_a
      @richmond_a  4 месяца назад +1

      Thanks for bringing this up.
      The dataset in Step 2 of the article is located here: huggingface.co/datasets/MongoDB/embedded_movies

  • @abhaysaini9406
    @abhaysaini9406 5 месяцев назад

    hey, iam doing the same thing. can i ask you specific questions ?

  • @Raptor3Falcon
    @Raptor3Falcon 5 месяцев назад

    how to reuse these embeddings so that we don't have to recreate them?

    • @richmond_a
      @richmond_a  5 месяцев назад

      You can access the dataset with the embeddings here: huggingface.co/datasets/MongoDB/embedded_movies

    • @Raptor3Falcon
      @Raptor3Falcon 5 месяцев назад

      @@richmond_a no i meant that we have a function called "load_index_from_storage" which we use if we don't want to re-index our embeddings. This is for local.
      Is there something similar so that I can query directly the mongodb database and extract the embeddings from there.

    • @richmond_a
      @richmond_a  5 месяцев назад +1

      @@Raptor3Falcon This should be possible by following these steps:
      1. Initialize a MongoDB vector store with LlamaIndex, specifying the database, collection and index name
      2. Ensure that the embedding field in your database is named 'embedding'
      3. Create an index from the loaded MongoDB vector store
      4. Create a query engine from the index
      These steps should enable you to use preexisitng embeddings.
      And as usual ensure you have an appropriately set up vector index definition for your collection.
      Also ensure the same embedding model used in your existing development environment to embed user queries.

    • @Raptor3Falcon
      @Raptor3Falcon 5 месяцев назад

      @@richmond_a can u write a small sample code ?

    • @richmond_a
      @richmond_a  4 месяца назад

      It should look something like this:
      from llama_index.vector_stores.mongodb import MongoDBAtlasVectorSearch
      from llama_index.core import VectorStoreIndex
      vector_store = MongoDBAtlasVectorSearch(mongo_client, db_name=DB_NAME, collection_name=COLLECTION_NAME, index_name="vector_index")
      index = VectorStoreIndex.from_vector_store(vector_store)
      query_engine = index.as_query_engine(similarity_top_k=3)
      query = "Recommend a romantic movie suitable for the christmas season and justify your selecton"
      response = query_engine.query(query)
      print(response)