How to Chat With Knowledge Graphs (python tutorial)

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 39

  • @maximilianstaebler4288
    @maximilianstaebler4288 10 місяців тому +3

    Thanks for sharing your experience and knowledge on classic coding problems beginners run into!

  • @123unhooked
    @123unhooked 9 місяців тому +3

    An absolute treat! Thank you again!

  • @mrrohitjadhav470
    @mrrohitjadhav470 10 місяців тому +3

    Awesome tutorial would love to see "How to Build Knowledge Graphs With open source LLMs "

    • @johannesjolkkonen
      @johannesjolkkonen  10 місяців тому +3

      Thank you!
      I'm definitely planning to make more content with open source LLMs, like how to fine tune and deploy them to an API you can use just like you would use the OpenAI or Azure APIs 🙂

    • @mrrohitjadhav470
      @mrrohitjadhav470 10 місяців тому +1

      @@johannesjolkkonen Awesome 😍

    • @thanartchamnanyantarakij9950
      @thanartchamnanyantarakij9950 7 місяців тому +2

      waiting for this

    • @mrrohitjadhav470
      @mrrohitjadhav470 7 місяців тому +3

      ​@@johannesjolkkonen thanks, looking forward to building custom Knowledge Graphs from our own data using open source llm.

    • @ScottzPlaylists
      @ScottzPlaylists 5 місяців тому +1

      I'm gung ho for Open Source❗ What about Neo4J -- can you replace it too❓

  • @noduslabs
    @noduslabs 9 місяців тому +1

    Really enjoy your tutorials! We should once do a session together, will be fun!

    • @johannesjolkkonen
      @johannesjolkkonen  9 місяців тому +1

      Hey Dmitry, glad to hear it!
      Let's make it happen. Sent you a connect-invite on LinkedIn 🙂

  • @mwdcodeninja
    @mwdcodeninja 4 місяці тому

    Love the solution. I would really appreciate a larger font size though.

  • @8eck
    @8eck 8 місяців тому +1

    Thank you for sharing.

  • @AnilDhimanSvg
    @AnilDhimanSvg 10 місяців тому +2

    Challenge is coming up with domain specific schema when dealing with unstructured data i.e. mostly text. Any pointers about that ?

    • @johannesjolkkonen
      @johannesjolkkonen  10 місяців тому

      The main pointer is to make the graph objects as easily distinguishable as possible, i.e name your node-types, relationship-types and their attributes in a way where the names are descriptive and do not get easily mixed.
      Really this applies for schema design in general, but is especially helpful to reduce the chances that the LLM will mix any of the objects when generating Cypher. Good luck!

  • @jdutchak67
    @jdutchak67 8 місяців тому

    Good but can you do these with just ChatOpenAI not Microsoft stuff Azure etc ? that way its more open source?

  • @RedCloudServices
    @RedCloudServices 10 місяців тому +1

    We use all of these resources except we are not allowed to send anything to openai can this be accomplished with a local llm?

    • @johannesjolkkonen
      @johannesjolkkonen  10 місяців тому +1

      Hey, sure! Performance generating the cypher will of course vary with open-source models but otherwise the principles are exactly same (:
      You might also consider running OpenAI's models on Azure if privacy is a concern. That way you will have Azure's enterprise-grade data privacy guarantees, and you can also choose the region where the model is hosted

  • @fourhourlife8594
    @fourhourlife8594 9 місяців тому +1

    brah what happens when u use random stream of text. imagine u have a k. graph already, and u continiously stream new data to it. how do u make sure that the entities stay the same, if in round 1 entity was John Mayer, and in round 2, the text used John M. or Johnny Mayer how can u sync this up?

    • @johannesjolkkonen
      @johannesjolkkonen  9 місяців тому

      Hey, great question. This problem of "syncing" similar entities is a key challenge in making this work in real-life. There are some promising methods, which you can learn more about in these two links:
      margin.re/2023/06/entity-resolution-in-reagent/ (in the second part)
      ua-cam.com/video/dNGV4sLkOcA/v-deo.html
      I'm not sure how soon I'll manage it, but I definitely want to make a video on this as well, hopefully before too long

  • @kingsleykelechionwuchekwa7508
    @kingsleykelechionwuchekwa7508 5 місяців тому

    Is there any way to apply this to the HTML Tree?

  • @MohammedQuazi-m9k
    @MohammedQuazi-m9k 10 місяців тому +3

    NameError: name 'cypher_query' is not defined

    • @AlexD_20
      @AlexD_20 10 місяців тому +1

      same here I get the following error:
      ValidationError: 3 validation errors for GraphCypherQAChain cypher_generation_chain field required (type=value_error.missing) qa_chain field required (type=value_error.missing) graph_schema field required (type=value_error.missing
      would also like to know how to solve this issue

    • @D1zZit
      @D1zZit 8 місяців тому

      Late to the party, but it's because of your connection string to your neo4j database. Check that you have configured it correctly.

    • @setop123
      @setop123 5 місяців тому

      Problem is the code isn't parsed properly and any error will end up showing 'cypher_query' not defined.
      Mine was OPENAI_API_BASE in env without value that i left there and made the whole thing bug because it was overwritting the openai API URL in my from langchain_community.chat_models import ChatOpenAI

  • @solidkundi
    @solidkundi 5 місяців тому

    is SurrealDB any good for these ?

    • @johannesjolkkonen
      @johannesjolkkonen  5 місяців тому

      Actually wasn't aware of SurrealDB before now, looks interesting!
      I think it should work with the same principles, but with the caveat that SurrealQL being a new dialect of SQL, I think LLMs will struggle to generate it reliably.
      This is already a significant challenge for Cypher (as I mention in the video) and even standard SQL, so for SurrealQL I think you'd definitely need to fine-tune a model for it.

  • @carthagely122
    @carthagely122 9 місяців тому +2

    I have to really thank you ، how i can contact you

  • @zz-dy7bz
    @zz-dy7bz 26 днів тому

    You look like Homelander. lol

  • @maxizon3631
    @maxizon3631 10 місяців тому +2

    a shame is has music

    • @johannesjolkkonen
      @johannesjolkkonen  10 місяців тому +1

      Thanks for the feedback! I'm still figuring out how to best edit these videos, and here I tried to balance it by only having music in the intro and outro.
      Do you think the music is too loud, or would you prefer no music at all?

    • @maxizon3631
      @maxizon3631 10 місяців тому +2

      @johannesjolkkonen I thought the reason was to avoid your audio being scrapped by skynet! I personally cannot understand well when there is any music on the background and is distracting, but others might disagree. I only watch channels without music as I want the hear clearly.

    • @ScriptureFirst
      @ScriptureFirst 5 місяців тому +1

      Second for no music 🙏🏼

    • @ScottzPlaylists
      @ScottzPlaylists 5 місяців тому +1

      @@johannesjolkkonen I'm not here for no stinking music❗ 😏 I need info as efficient as possible - No fluff. Good Job overall 👍