Convert Any Text into a Knowledge Graph

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Medium Post: towardsdatasci...
    Code: github.com/rah...
    Schema method: • Graph ML: Build Knowl...
    #datascience #machinelearning #deeplearning #datanalytics #predictiveanalytics #artificialintelligence #generativeai #largelanguagemodels #computervision #naturallanguageprocessing #agents #transformers #embedding #graphml #graphdatascience #datavisualization #businessintelligence #optimization #montecarlosimulation #simulation #LLMs #python #aws #azure #gcp

КОМЕНТАРІ • 58

  • @SridharKumarKannam
    @SridharKumarKannam  2 місяці тому

    If you found this content useful, pleases consider sharing it with others who might benefit. Your support is greatly appreciated :)

  • @AnjanaVMurthy
    @AnjanaVMurthy 3 дні тому

    Thanks for the video! Can you share the exact source code you have used in the video, I'm not able to find the exact source code in the github link you have provided.

    • @SridharKumarKannam
      @SridharKumarKannam  День тому

      Check this - github.com/rahulnyk/knowledge_graph/blob/main/extract_graph.ipynb

  • @chandrasekharsubramanyam9386
    @chandrasekharsubramanyam9386 23 дні тому

    Great Video on Text to Knowledge Graph. Can you please tell me how to add context extracted from Knowledge Graph to Retrieval Augmented Generation to get a better response fromLLM

    • @SridharKumarKannam
      @SridharKumarKannam  22 дні тому

      Pls look at GraphRAG or combining Graphs with RAG. I've a number of video on this topic.
      If you found this content helpful, please consider sharing it with others who might benefit. Your support is greatly appreciated :)

  • @Sriyaa-p8o
    @Sriyaa-p8o 3 місяці тому +1

    sir, i tried running the code in the way shown by you, but in google colab it's saying ollama.client is not being able to be imported error, i tried to use chatgpt but it is unable to rectify it. how can i modify this code using my own dataset and is it going to work in google colab

    • @SridharKumarKannam
      @SridharKumarKannam  3 місяці тому

      whats the error? Can you pls share your colab notebook?

    • @Sriyaa-p8o
      @Sriyaa-p8o 3 місяці тому

      @@SridharKumarKannam sure sir, could you send your gmail, ill forward it to you

    • @Sriyaa-p8o
      @Sriyaa-p8o 3 місяці тому

      @@SridharKumarKannam sure sir, can you please send your email, ill forward it to you

  • @adawiaananda7353
    @adawiaananda7353 5 днів тому

    hello sir, is this completely free to use or is there any API key or anything else that I need to purchase? thanks for the video!

    • @SridharKumarKannam
      @SridharKumarKannam  День тому

      you need a language model (LLM) for this. You can get free API from OpenAI, Groq, HuggingFace etc or run the LLM locally using Ollama, vLLM, etc.

  • @ZochSong
    @ZochSong 4 місяці тому +1

    sir, when running the "res = extractConcepts(prompt = pages[0].page_content)",
    an error occurred that "Max retries exceeded with url: /api/generate".
    Can you help me pls

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

      Pls check/increase your openAI rate limits or use open source llms using ollama.

  • @writtenkannadalyrics
    @writtenkannadalyrics Місяць тому

    Hey! What's the python package to use helpers library.

    • @SridharKumarKannam
      @SridharKumarKannam  Місяць тому

      Those helper functions are in the same codebase - github.com/rahulnyk/knowledge_graph/tree/main/helpers
      If you found this content helpful, please consider sharing it with others who might benefit. Your support is greatly appreciated :)

  • @andydataguy
    @andydataguy 5 місяців тому +2

    Great video! Thank you for patiently explaining this so deeply

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

    Hi, thanks so much for putting this video. It is great. I see you three videos for same thing - text to Graph.. one is this, second one using langchain and third one using libraries similar to this. what are high level differences between the three videos and which approach would you recommend if the scale is more?

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

      the main difference is control over what entities and relationships you want in your model. You can start with open ended or unbounded schema, but eventually want to refine it to have only the desirable entities and relationships

  • @JavierHernandez-xo5nb
    @JavierHernandez-xo5nb 21 день тому

    Great video mate. You save me a lot of time......🚀🚀🚀🚀🚀🚀🚀

    • @SridharKumarKannam
      @SridharKumarKannam  19 днів тому

      If you found this content helpful, please consider sharing it with others who might benefit. Your support is greatly appreciated :)

  • @iham1313
    @iham1313 3 місяці тому +1

    most common format for text: pdf. txt and md are already “easy” to build a graph…

  • @yazeedmohammed7715
    @yazeedmohammed7715 5 місяців тому +2

    first, thank you for the video, second, i tried to use the code but it seems i have problem with ollama, i installed it but i get no model named ollama.client, is there any way to fix it?

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

      Are you able to fix the issue, otherwise, pls let me know, I'll help...

    • @sofiakindstrom
      @sofiakindstrom Місяць тому

      @@SridharKumarKannam I have the same problem. Is there a way to fix it? Im working on a Mac. Btw, super useful video!:D

    • @sofiakindstrom
      @sofiakindstrom Місяць тому +1

      @@SridharKumarKannam Nvm, Im stupid! Have a nice day:D

  • @kundeyrajesh9506
    @kundeyrajesh9506 6 місяців тому +1

    Can we also create Knowledge graph for Time series data?

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому

      Thanks for the suggestion, using KGs we represent entities and the relationships between them. For a time series data we don't have such a thing. Pls see - stackoverflow.com/questions/71780910/knowledge-graph-for-time-series-data

  • @BlueDattebayo
    @BlueDattebayo 2 місяці тому

    Hi there! I'm having some troubles at the part before calculating contextual proximity:
    "ConnectError: [WinError 10061] No connection could be made because the target machine actively refused it"
    Do I have to open ollama client (on my local machine) before running the code?
    Also there were quite a number of tweaks I had to make to the code before it could run, is that typical from your experiences?
    Some examples of these changes are:
    helpers.df_helpers -> df_helpers
    .prompts -> prompts
    model_name -> model (mistral-openocra)
    etc.
    I'd imagine this might be due to my file management within Jupyter itself? But when I create a folder within the folder, it seems to not be able to find or extract the file. So I've positioned it into the same main folder.
    Looking forward to hearing from you! Thank you so much in advance for your time and informative video.

    • @SridharKumarKannam
      @SridharKumarKannam  2 місяці тому

      >> Do I have to open ollama client (on my local machine) before running the code?
      Yes
      >> Also there were quite a number of tweaks I had to make to the code before it could run, is that typical from your experiences?
      Yes, thats my experience too, these libraries are new and being developed actively by many. The APIs have been keep changing.
      It hard to say whats going on without running the code myself. I'm sure you will be able to fix all the issues one by one, it takes some time, but same with me too. All the best

  • @saurabhmukherjee9757
    @saurabhmukherjee9757 8 днів тому

    Nice sir, ❤

    • @SridharKumarKannam
      @SridharKumarKannam  8 днів тому

      Thank you.
      If you found this content helpful, please consider sharing it with others who might benefit. Your support is greatly appreciated :)

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

    4 points: ❗❗❗❗
    1 = The wording of the edge descriptions seems to be different than the short edge descriptions I've seen in the past. 👎
    2 = The edge descriptions also seems to repeat the words used in node1 or node2. 👎
    3 = I wish the examples used some text that could be broken down in to factual statements and relations like a description of a Github project, or Documentation, or textbook style text. 👎
    4 = I hate sports and the example edge descriptions just seem stupid and useless. 👎

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

      these are meant for quickly getting started and learning. Thanks for your support

  • @user-he1nx1rn4m
    @user-he1nx1rn4m 7 місяців тому

    Are you using neo4j for the graph? If so how can i access it from neo4j Database

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому

      In this video, I've used networkx not neo4j. Once you have the nodes and relationships exacted, you can load them any graph DB of your choice...

  • @pavanpraneeth4659
    @pavanpraneeth4659 6 місяців тому

    can u share here the previous video link where we have explicit relation and built a knowledge graph

  • @ronass-sm9sv
    @ronass-sm9sv 6 місяців тому

    I would like to build a taxonomy of skills and an ontology of skills, can I use the same process you used ?

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому

      Pls check this video - ua-cam.com/video/sK61Y22wvr8/v-deo.html I've a few other videos on defining the entities and relationships, taxonomy, pls check...

  • @deathdefier45
    @deathdefier45 7 місяців тому +1

    Thank you so much for this ❤

    • @SridharKumarKannam
      @SridharKumarKannam  7 місяців тому +1

      Thanks for your support. Pls share with your friends :)

  • @killerdrama5521
    @killerdrama5521 6 місяців тому

    How can we do this for Wikipedia content. Where we need each every possible mode and relationship type between nodes.

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому +1

      As I mentioned, broadly we have 2 methods, one is open ended where by default LLM extract all nodes and relationship, if it misses any, you can guide the LLM using the prompt. In the 2nd method, you can explicitly define all types of nodes and relationships you want to extract.

    • @killerdrama5521
      @killerdrama5521 6 місяців тому

      @@SridharKumarKannam when can we have next part of the vedio. Actually we are trying to identify nodes relationships and then ontology or knowledge graph based on that. What approach can help us better here. Is there any other generative models which can identify entities and relationships and their properties

  • @pavanpraneeth4659
    @pavanpraneeth4659 6 місяців тому

    awesome video

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

    Thanks for putting this together. 👍🏾

  • @suryaankam7856
    @suryaankam7856 6 місяців тому

    Thank you🙏

  • @Ankitist
    @Ankitist 6 місяців тому +1

    Can you also cover how we can add this to neo4j and run query on that data.

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому

      I've a couple of videos on adding such nodes/relationships to neo4j. Pls check - ua-cam.com/video/sK61Y22wvr8/v-deo.html

  • @sunilsamson6220
    @sunilsamson6220 7 місяців тому

    How can I use this .html as LLamaIndex KnowledgeGraphIndex?

    • @SridharKumarKannam
      @SridharKumarKannam  6 місяців тому

      Simple Directory Reader should read all docs including html in the folder - docs.llamaindex.ai/en/stable/examples/data_connectors/simple_directory_reader.html