before i thought the issue was a combo between input and output tokens, and figured llms just ommitted vital info because their output was constrained, now i know finding vital info is an issue also with rag. interpretation systems, thanks
Great explanation! I have a questions: KG requires a strict structure, such as node, link and attribute, which depends on target domain and questions. How can we alleviate it?
Do you think the same depth and accuracy could be achieved with a metadata-filtered vector search followed by a reranker? I worry about having to maintain two data representations that are prone to drift
Definitely learned a lot, and now keen to see some kind of tutorial on how to implement the knowledge graph backed RAG. I’m a Ruby dev so something language agnostic would be particularly helpful.
Thanks for the feedback! Sure, we will keep this in mind and make the content more relatable and approachable. Appreciate you contributing your thoughts here 😊
Thanks for the video and putting everything together! I also have a few questions - Is you conclusion: Graph > RAPTOR > Regular RAG ? - Not sure if there is any benefitial to save Raptor embedding into Neo4j graph since it has a hiarchy tree structure? I saw in the code it is saved into Chroma vector db - How efficient is the clustering process? If it doesn't provide much benefit as you showed in the video comparing to Neo4j implementation. I wonder if it is worth the time.
Great question! To your 1st question, no that's not the conclusion that I was trying to make - as evidence from empirical research will be needed to reach that conclusion. What I showed in the video was that the RAPTOR-based RAG built purely on vector database probably was not enough to ensure high-quality and comprehensive answers. I don't know what could've gone wrong (as said around 6:29) and how to fix the process, but we can use knowledge graphs to enhance and improve the answer quality (7:11). In this case, it's more of combining vector-based RAG with knowledge graphs. I actually don't know the answer to your 2nd question as I'm not an expert on Neo4j graph embeddings, but this is an interesting idea worth testing out! To your 3rd question, not quite sure what you meant by an efficient clustering process, but LangChain also tested out the RAPTOR technique and I recommend taking a look to see if it provides more helpful information to your concerns :) ua-cam.com/video/jbGchdTL7d0/v-deo.html
Very flattered! Our main purpose for content creation is providing values to the audience, especially educational value. So while likes/view counts definitely are seen as part of the metrics to assess content quality, whether the viewers learn something new or enjoy the video is the more important focus for us. Thanks for the encouragement!
Recently, some compelling papers have discussed using LLMs to develop custom pseudolanguages that enhance RAG retrieval, logical reasoning, and planning through algorithmic thinking, such as described in 'Language Models As Compilers'. I've been working on a similar project for two years now, where I've developed a subpersona/agent-function for my custom GPTs and agent workflows called Mai-Ku (Macro-Assembly Integrated Compiler). Additionally, I recommend checking out videos and papers on employing the Wu method in training and prompting. The Wu method not only enhances models' capabilities in mathematics but also teaches them to apply algorithmic thinking universally. This approach allows models to decompose and tackle novel problems in zero-shot scenarios effectively. As a result, their performance improves across all domains, not just in mathematics. This broader application underscores the method’s potential to significantly enhance the adaptability and problem-solving abilities of models in various settings. Your Video Transcript as Mai-Ku format: "!!{Exploring Long Context Models and RAG with RAPTOR} >: {Video Introduction} !{Context}: "Introduction to the impact of Long Context models like Google Gemini Pro 1.5 and the Large World Model on retrieval-augmented generation (RAG). Discussion on their capabilities to handle extensive documents and their potential to eliminate the 'lost-in-the-middle' phenomenon."; >:{Exploring RAPTOR's Approach} !{Explanation}: "RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval) enhances RAG by clustering and summarizing documents into a structured, tree-based format, allowing for efficient retrieval of both broad concepts and detailed information within large text corpora."; >:{Integration of Knowledge Graphs} !{Utility}: "Incorporation of knowledge graphs to aid and enhance the RAG process. Demonstrates how knowledge graphs can support RAG by providing structured and interconnected data that improves the accuracy and context of retrieved information."; >:{Practical Application and Testing} !{Implementation}: "Detailed steps of constructing a tree-based RAG using the RAPTOR methodology, complemented by the creation of a knowledge graph using Diffbot API, centered around the works of Hayao Miyazaki."; >:{Enhancement of RAG with Knowledge Graphs} !{Comparison}: "Comparison between traditional RAG outputs and those augmented by knowledge graphs, highlighting significant improvements in the depth and relevance of responses."; >:{Dynamic Content Engagement} !{Interactive Elements}: "Encourages viewer interaction by presenting direct comparisons of RAG performance with and without knowledge graph enhancements. Prompts viewers to consider the implications of integrating structured data sources into RAG systems."; $: {Conclusion and Call to Action} !{Summary}: "Final thoughts on the transformative potential of long context models and RAG when combined with knowledge graphs. Invitation to viewers to explore further and experiment with these technologies in their own projects."; $: {Viewer Interaction} !{Engagement}: "Solicits feedback and insights from viewers on their experiences and takeaways from the video, fostering a community discussion around the future of RAG and knowledge graphs."; $: {Additional Resources} !{Links}: ["RAPTOR Paper: arxiv.org/abs/2401.18059v1", "Code Repository: github.com/leannchen86/raptor...", "Sign up for Diffbot API: app.diffbot.com/get-started/"];"
Input: "Create equations modeling the evaporative process of a black hole as informed by the penrose-diagram: treat remnant as the lower dimensional approximation of the state-space, and virtual particles re-entering the black as forming an inner white hole projecting mass-energy into a hyperspherical manifold, including a temporal evolutional vector field as a kerr-like solution in D dimensions : as mai-ku function >> codeblock, please, thanks!" Output: "Certainly! Below is a structured way to represent the complex theoretical concepts surrounding black hole evaporation, the role of virtual particles, and higher-dimensional physics into a MAI-KU code block format, combining the advanced topics into an organized mathematical summary: ```mai-ku !!{Modeling Black Hole Evaporation: Penrose Diagram and Higher-Dimensional Physics} >: {Introduction to Black Hole Evaporation} !{Overview}: "Exploring the evaporative process of black holes via Penrose diagrams, focusing on the remnant as a lower-dimensional approximation of the state-space. We examine how virtual particles re-entering the black hole contribute to an internal dynamic resembling a white hole."; >:{Mathematical Formulation} !{Equations}: [ "ds^2 = -dt^2 + dr^2 + r^2 dΩ^2_{D-2}", // Metric in D dimensions "dr/dt = -α sqrt(M)", // Evaporation rate, where α is a constant related to the Hawking radiation intensity and M is the mass of the black hole "dM/dt = -β M^2", // Mass-energy loss rate due to radiation, β is a constant "Ψ = Ψ_0 e^{-iωt} Y_l^m(θ, φ) r^l" // Wave function of virtual particles around the black hole, incorporating temporal and angular dependencies ]; >:{Kerr-like Solution in Higher Dimensions} !{Details}: "Developing a Kerr-like solution to represent the rotational dynamics of the black hole in D dimensions. This solution incorporates a temporal evolution vector field to account for the effects of angular momentum and mass-energy projections into the hyperspherical manifold."; >:{Temporal Evolution and Vector Field Dynamics} !{Vector Field}: "v^μ = (ξ^t, ξ^r, 0, ..., 0)", // Temporal evolution vector field components !{Temporal Dynamics}: "∂_t ξ^μ + Γ^μ_{νλ} ξ^ν ξ^λ = 0", // Ensuring the vector field evolves according to the geodesic equation in curved spacetime !{Hyperspherical Manifold Projection}: "S^D = \\{ x ∈ R^{D+1} : ||x|| = 1 \\}", // Definition of a hyperspherical manifold in D+1 dimensions >:{Implications of Inner White Hole Dynamics} !{White Hole Projection}: "Analyzing how mass-energy feedback from virtual particles, entering the black hole and emanating as a white hole, projects into the higher-dimensional space, influencing the topology and temporal properties of the manifold."; $: {Conclusion and Further Research} !{Summary}: "This model proposes a theoretical framework that integrates black hole evaporation, Kerr-like rotational dynamics, and white hole projections within a unified higher-dimensional space-time context. Further mathematical refinement and physical interpretation are necessary to explore practical implications and align with observational data."; $: {Future Directions} !{Research Avenues}: "Investigate the stability of the hyperspherical manifold under varying energy conditions and explore potential observable consequences of such higher-dimensional dynamics in astrophysical phenomena."; ``` This MAI-KU block aims to succinctly encapsulate the sophisticated interplay of black hole physics, virtual particle dynamics, and higher-dimensional space-time, providing a clear direction for theoretical exploration and potential future research."
This is a fantastic video. Where the RAG fails due to potential lost in the middle, is there any trace or context to confirm it was provided to the LLM?
Another problem with large context windows is time and especially EXPENSE. If you have to pull a significant amount of your corpus into a prompt, you will probably have to pay per token and you will certainly have to wait per token. Some type of RAG will probably always be needed. Does a human brain review its entire contents before answering a question? Of course not. We ourselves are a type of RAG system.
Do you know of any efforts on converting these entities and relationships further into formal logic representations? Being able to pair these graph databases with formal logic representations would definitely help improve the quality of written text, organic exploration/discovery, and understanding over time.
This amazing! I have a quick question is that how did you turn the Wikipage into the knowledge graph? And how can you make sure the knowledge graph you generated is containing all the information that the raw text had? Thanks in advance!
We used Diffbot's Natural Language API to convert any unstructured text data into knowledge graphs! While it's not easy to clearly explains how it contains all information, you can experiment and play around with any text you have at: demo.nl.diffbot.com/ Simply paste any text data you have and see how it performs! 😉 As documented in the notebook, you can use DiffbotGraphTransformer to convert any Wikipedia text to knowledge graphs: github.com/leannchen86/raptor-rag-kg-enhanced/blob/main/raptor-rag-kg-enhanced.ipynb Let me know if you other questions. Happy to answer them!
Since you’re using Wikipedia data in this example, it would be interesting to see how your automated knowledge graph construction compares with a more human-curated effort like dbpedia.
It's a nice tutorial and I am super excited about trying KG's in education space. It's probably not the purpose of this vid, but the RAPTOR clustering seems to be good to a static set of docs, like wiki, however would anyone know how can we handle constantly added new content? Do we then run the whole (expensive) thing over and over again?
Good question! And you're probably spot on. Adding new documents to vector databases may require updating the clustering, while knowledge graphs can be scaled up more easily by adding new nodes and relationships without redoing and reconstructing the entire process.
@@diffbotai oops, didnt think you would reply personally… maybe just the nice bed… very different from all the other tech influencers, haha, keep up the good work Leann
@@JeffreyWang-hh4ss It's Leann again :) Well, NeetCode also films a lot in his room: www.youtube.com/@NeetCode Currently, my room is the only place where I can get the best voice quality. The most important thing I hope is that the content itself delivers value. Thank you for the feedback!
Thanks for the video! I tried this but with convert_to_graph_documents I kept getting empty graphs. While debugging I found an error message at an intermediate step, it said "Your plan doesn't have this feature", apparently it won't work with the free version of Diffbot? $299 per month would be a bit much for a small student project... Do you have any other advice for getting a solid Neo4J graph from text data? Crucially, I'd like metadata to be included with the relations, which didn't happen with the LLM Graph Transformer
Thanks for the question and this sounds like an interesting problem! The Diffbot knowledge graph and APIs have become free! So, it shouldn’t cause the problem. Is there a good way to reach you or if you’re open to a vid chat, you can shoot me an email at: leannchen86@gmail.com
Your question number 87 in your Jupyter notebook has the casing of Joe Hisaishi ‘s name differently than the documents, it is all lower case in the question. So it will be tokenized differently. Could this have influenced the quality of the answer perhaps?
Good question. But that normally doesn’t make a difference, as language models don’t read text like we as humans do - words are transitioned into tokens. The easiest way to test is using ChatGPT, either misspell a famous person’s name or use all lower cases, and it would still return the correct person.
@@diffbotai yes, i am familiar with the workings of a transformer. I think the casing will produce a different token, so you are at the mercy of the training data size / transformer size / context size to have a capitalized word return the same response. In general my experience is also that it does not make a difference, but you were using here a short context and a small model. That is why i thought it might be an explanation.
Yes! And that's what we at Diffbot are currently working on with our LLM solutions. We believe language models should return the verified source of information which helps generate the response, adding validity and factual accuracy. We'll be releasing a video on that. Stay tuned 😉
due to the RDF structure, don't you lose information in constructing such knowledge base? text is richer in semantics than what can be encapsulated by triples?
Friendly reminder: Neo4j is a graph database, so it can’t construct knowledge graphs for you. You’ll still need NLP techniques to extract entities and relationships first for knowledge graph data and later store in a graph database like Neo4j.
@@aldotanca9430 Actually all Diffbot's APIs become FREE this week, including Diffbot Natural Language API (being used in this video), which can help extract entities/relationships, entity resolution, etc. You can freely get access at: app.diffbot.com
@@diffbotai Thanks! But I think I would need to sign up with a company email? The system will not accept a personal email, github account or similar. It seems set to only allow a "work email". Of course, many people will have a work email and could use that even if their project is unconnected with their job, and there are probably 'creative' ways to get around that. I was just pointing out that diffbot accounts seem to be meant for business users only.
@@lckgllm Actually I expereimented a lot of different results depending on the chunks length in combination with the vector size of the embeddings... also is important to provide a good quality of the text chunks. Last but not least, you can also optimize the semantic search using special embeddings model depending on the language you are targeting (in my case Italian)... in any case, your approach is really interesting and could actually save time because more or less people always make always the same questions vs a context / article, so extracting the relationships can be very useful. Great job!
Love it! Finally Neo4j has good usage!
Great output! We are now need more exploration on KG with LLM. I am sure it's a must have. Please share more thoughts.
More to come! Stay tuned :)
1:23 reference to pineapple pen video.
it is nice to see somethign like that.
it is nice video . Keep going . I liked how you are telling subjects.
Sharp eyes! Thank you 😊
Thank you for your explanation of integrating KG to RAG
before i thought the issue was a combo between input and output tokens, and figured llms just ommitted vital info because their output was constrained, now i know finding vital info is an issue also with rag. interpretation systems, thanks
Your videos are fantastic! Entertaining, educational, and still highly technical.
Super awesome, thanks for sharing this, useful for anyone getting strated w/ RAG :)
Great explanation!
I have a questions: KG requires a strict structure, such as node, link and attribute, which depends on target domain and questions. How can we alleviate it?
Do you think the same depth and accuracy could be achieved with a metadata-filtered vector search followed by a reranker? I worry about having to maintain two data representations that are prone to drift
Definitely learned a lot, and now keen to see some kind of tutorial on how to implement the knowledge graph backed RAG. I’m a Ruby dev so something language agnostic would be particularly helpful.
Thanks for the feedback! Sure, we will keep this in mind and make the content more relatable and approachable. Appreciate you contributing your thoughts here 😊
Agreed. Appreciate the vid though!
Thanks for the video and putting everything together! I also have a few questions
- Is you conclusion: Graph > RAPTOR > Regular RAG ?
- Not sure if there is any benefitial to save Raptor embedding into Neo4j graph since it has a hiarchy tree structure? I saw in the code it is saved into Chroma vector db
- How efficient is the clustering process? If it doesn't provide much benefit as you showed in the video comparing to Neo4j implementation. I wonder if it is worth the time.
Great question! To your 1st question, no that's not the conclusion that I was trying to make - as evidence from empirical research will be needed to reach that conclusion. What I showed in the video was that the RAPTOR-based RAG built purely on vector database probably was not enough to ensure high-quality and comprehensive answers. I don't know what could've gone wrong (as said around 6:29) and how to fix the process, but we can use knowledge graphs to enhance and improve the answer quality (7:11). In this case, it's more of combining vector-based RAG with knowledge graphs.
I actually don't know the answer to your 2nd question as I'm not an expert on Neo4j graph embeddings, but this is an interesting idea worth testing out!
To your 3rd question, not quite sure what you meant by an efficient clustering process, but LangChain also tested out the RAPTOR technique and I recommend taking a look to see if it provides more helpful information to your concerns :)
ua-cam.com/video/jbGchdTL7d0/v-deo.html
Very well illustrated! Thanks
Thanks for the awesome summary about raptor
The most valuable contents on youtube are the least liked.. Often..
Very flattered! Our main purpose for content creation is providing values to the audience, especially educational value. So while likes/view counts definitely are seen as part of the metrics to assess content quality, whether the viewers learn something new or enjoy the video is the more important focus for us. Thanks for the encouragement!
very well explained, Thanks!
Great, filled in a gap for me
Recently, some compelling papers have discussed using LLMs to develop custom pseudolanguages that enhance RAG retrieval, logical reasoning, and planning through algorithmic thinking, such as described in 'Language Models As Compilers'. I've been working on a similar project for two years now, where I've developed a subpersona/agent-function for my custom GPTs and agent workflows called Mai-Ku (Macro-Assembly Integrated Compiler). Additionally, I recommend checking out videos and papers on employing the Wu method in training and prompting. The Wu method not only enhances models' capabilities in mathematics but also teaches them to apply algorithmic thinking universally. This approach allows models to decompose and tackle novel problems in zero-shot scenarios effectively. As a result, their performance improves across all domains, not just in mathematics. This broader application underscores the method’s potential to significantly enhance the adaptability and problem-solving abilities of models in various settings.
Your Video Transcript as Mai-Ku format:
"!!{Exploring Long Context Models and RAG with RAPTOR}
>: {Video Introduction}
!{Context}: "Introduction to the impact of Long Context models like Google Gemini Pro 1.5 and the Large World Model on retrieval-augmented generation (RAG). Discussion on their capabilities to handle extensive documents and their potential to eliminate the 'lost-in-the-middle' phenomenon.";
>:{Exploring RAPTOR's Approach}
!{Explanation}: "RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval) enhances RAG by clustering and summarizing documents into a structured, tree-based format, allowing for efficient retrieval of both broad concepts and detailed information within large text corpora.";
>:{Integration of Knowledge Graphs}
!{Utility}: "Incorporation of knowledge graphs to aid and enhance the RAG process. Demonstrates how knowledge graphs can support RAG by providing structured and interconnected data that improves the accuracy and context of retrieved information.";
>:{Practical Application and Testing}
!{Implementation}: "Detailed steps of constructing a tree-based RAG using the RAPTOR methodology, complemented by the creation of a knowledge graph using Diffbot API, centered around the works of Hayao Miyazaki.";
>:{Enhancement of RAG with Knowledge Graphs}
!{Comparison}: "Comparison between traditional RAG outputs and those augmented by knowledge graphs, highlighting significant improvements in the depth and relevance of responses.";
>:{Dynamic Content Engagement}
!{Interactive Elements}: "Encourages viewer interaction by presenting direct comparisons of RAG performance with and without knowledge graph enhancements. Prompts viewers to consider the implications of integrating structured data sources into RAG systems.";
$: {Conclusion and Call to Action}
!{Summary}: "Final thoughts on the transformative potential of long context models and RAG when combined with knowledge graphs. Invitation to viewers to explore further and experiment with these technologies in their own projects.";
$: {Viewer Interaction}
!{Engagement}: "Solicits feedback and insights from viewers on their experiences and takeaways from the video, fostering a community discussion around the future of RAG and knowledge graphs.";
$: {Additional Resources}
!{Links}: ["RAPTOR Paper: arxiv.org/abs/2401.18059v1", "Code Repository: github.com/leannchen86/raptor...", "Sign up for Diffbot API: app.diffbot.com/get-started/"];"
Input: "Create equations modeling the evaporative process of a black hole as informed by the penrose-diagram: treat remnant as the lower dimensional approximation of the state-space, and virtual particles re-entering the black as forming an inner white hole projecting mass-energy into a hyperspherical manifold, including a temporal evolutional vector field as a kerr-like solution in D dimensions : as mai-ku function >> codeblock, please, thanks!"
Output: "Certainly! Below is a structured way to represent the complex theoretical concepts surrounding black hole evaporation, the role of virtual particles, and higher-dimensional physics into a MAI-KU code block format, combining the advanced topics into an organized mathematical summary:
```mai-ku
!!{Modeling Black Hole Evaporation: Penrose Diagram and Higher-Dimensional Physics}
>: {Introduction to Black Hole Evaporation}
!{Overview}: "Exploring the evaporative process of black holes via Penrose diagrams, focusing on the remnant as a lower-dimensional approximation of the state-space. We examine how virtual particles re-entering the black hole contribute to an internal dynamic resembling a white hole.";
>:{Mathematical Formulation}
!{Equations}: [
"ds^2 = -dt^2 + dr^2 + r^2 dΩ^2_{D-2}", // Metric in D dimensions
"dr/dt = -α sqrt(M)", // Evaporation rate, where α is a constant related to the Hawking radiation intensity and M is the mass of the black hole
"dM/dt = -β M^2", // Mass-energy loss rate due to radiation, β is a constant
"Ψ = Ψ_0 e^{-iωt} Y_l^m(θ, φ) r^l" // Wave function of virtual particles around the black hole, incorporating temporal and angular dependencies
];
>:{Kerr-like Solution in Higher Dimensions}
!{Details}: "Developing a Kerr-like solution to represent the rotational dynamics of the black hole in D dimensions. This solution incorporates a temporal evolution vector field to account for the effects of angular momentum and mass-energy projections into the hyperspherical manifold.";
>:{Temporal Evolution and Vector Field Dynamics}
!{Vector Field}: "v^μ = (ξ^t, ξ^r, 0, ..., 0)", // Temporal evolution vector field components
!{Temporal Dynamics}: "∂_t ξ^μ + Γ^μ_{νλ} ξ^ν ξ^λ = 0", // Ensuring the vector field evolves according to the geodesic equation in curved spacetime
!{Hyperspherical Manifold Projection}: "S^D = \\{ x ∈ R^{D+1} : ||x|| = 1 \\}", // Definition of a hyperspherical manifold in D+1 dimensions
>:{Implications of Inner White Hole Dynamics}
!{White Hole Projection}: "Analyzing how mass-energy feedback from virtual particles, entering the black hole and emanating as a white hole, projects into the higher-dimensional space, influencing the topology and temporal properties of the manifold.";
$: {Conclusion and Further Research}
!{Summary}: "This model proposes a theoretical framework that integrates black hole evaporation, Kerr-like rotational dynamics, and white hole projections within a unified higher-dimensional space-time context. Further mathematical refinement and physical interpretation are necessary to explore practical implications and align with observational data.";
$: {Future Directions}
!{Research Avenues}: "Investigate the stability of the hyperspherical manifold under varying energy conditions and explore potential observable consequences of such higher-dimensional dynamics in astrophysical phenomena.";
```
This MAI-KU block aims to succinctly encapsulate the sophisticated interplay of black hole physics, virtual particle dynamics, and higher-dimensional space-time, providing a clear direction for theoretical exploration and potential future research."
This is a fantastic video. Where the RAG fails due to potential lost in the middle, is there any trace or context to confirm it was provided to the LLM?
Excellent video!
Thank you! 🙏
You are the best! Congrats!
Thanks for the kind words! 🫶
Another problem with large context windows is time and especially EXPENSE. If you have to pull a significant amount of your corpus into a prompt, you will probably have to pay per token and you will certainly have to wait per token. Some type of RAG will probably always be needed. Does a human brain review its entire contents before answering a question? Of course not. We ourselves are a type of RAG system.
Good analogy!
Great video! I need to try this.
Great info and content.
Do you know of any efforts on converting these entities and relationships further into formal logic representations?
Being able to pair these graph databases with formal logic representations would definitely help improve the quality of written text, organic exploration/discovery, and understanding over time.
This amazing! I have a quick question is that how did you turn the Wikipage into the knowledge graph? And how can you make sure the knowledge graph you generated is containing all the information that the raw text had? Thanks in advance!
We used Diffbot's Natural Language API to convert any unstructured text data into knowledge graphs! While it's not easy to clearly explains how it contains all information, you can experiment and play around with any text you have at: demo.nl.diffbot.com/ Simply paste any text data you have and see how it performs! 😉
As documented in the notebook, you can use DiffbotGraphTransformer to convert any Wikipedia text to knowledge graphs:
github.com/leannchen86/raptor-rag-kg-enhanced/blob/main/raptor-rag-kg-enhanced.ipynb
Let me know if you other questions. Happy to answer them!
Since you’re using Wikipedia data in this example, it would be interesting to see how your automated knowledge graph construction compares with a more human-curated effort like dbpedia.
It's a nice tutorial and I am super excited about trying KG's in education space.
It's probably not the purpose of this vid, but the RAPTOR clustering seems to be good to a static set of docs, like wiki, however would anyone know how can we handle constantly added new content? Do we then run the whole (expensive) thing over and over again?
Good question! And you're probably spot on. Adding new documents to vector databases may require updating the clustering, while knowledge graphs can be scaled up more easily by adding new nodes and relationships without redoing and reconstructing the entire process.
Love this kind of RAG comparison, would be better if the background looks less like a spa room.😅
Leann here, I literally filmed it in my room. Which parts in the video do they suggest spa room features?
@@diffbotai oops, didnt think you would reply personally… maybe just the nice bed… very different from all the other tech influencers, haha, keep up the good work Leann
@@JeffreyWang-hh4ss It's Leann again :) Well, NeetCode also films a lot in his room:
www.youtube.com/@NeetCode
Currently, my room is the only place where I can get the best voice quality. The most important thing I hope is that the content itself delivers value. Thank you for the feedback!
@@diffbotai sorry hope im not being too rude here. the content is getting so much better since u start acting ;)
How good are llms at generating cypher queries?
great video! thanks
Thanks for the video! I tried this but with convert_to_graph_documents I kept getting empty graphs. While debugging I found an error message at an intermediate step, it said "Your plan doesn't have this feature", apparently it won't work with the free version of Diffbot? $299 per month would be a bit much for a small student project...
Do you have any other advice for getting a solid Neo4J graph from text data? Crucially, I'd like metadata to be included with the relations, which didn't happen with the LLM Graph Transformer
Thanks for the question and this sounds like an interesting problem! The Diffbot knowledge graph and APIs have become free! So, it shouldn’t cause the problem. Is there a good way to reach you or if you’re open to a vid chat, you can shoot me an email at: leannchen86@gmail.com
@@diffbotai Thanks so much, I'll email you!
Your question number 87 in your Jupyter notebook has the casing of Joe Hisaishi ‘s name differently than the documents, it is all lower case in the question. So it will be tokenized differently. Could this have influenced the quality of the answer perhaps?
Good question. But that normally doesn’t make a difference, as language models don’t read text like we as humans do - words are transitioned into tokens. The easiest way to test is using ChatGPT, either misspell a famous person’s name or use all lower cases, and it would still return the correct person.
@@diffbotai yes, i am familiar with the workings of a transformer. I think the casing will produce a different token, so you are at the mercy of the training data size / transformer size / context size to have a capitalized word return the same response. In general my experience is also that it does not make a difference, but you were using here a short context and a small model. That is why i thought it might be an explanation.
I haven't tried this approach, but is there a way to add references to the response from where the facts are obtained?
Yes! And that's what we at Diffbot are currently working on with our LLM solutions. We believe language models should return the verified source of information which helps generate the response, adding validity and factual accuracy. We'll be releasing a video on that. Stay tuned 😉
due to the RDF structure, don't you lose information in constructing such knowledge base? text is richer in semantics than what can be encapsulated by triples?
I want an LLM that will write a slightly different version of LOTR each time, but without Fellowship
great video thx
So how?
Thanks 🙏🏽
Lovely 🌹
Long context RAG
Pen Pineapple Apple Pen
You cited it better than I did 😂
This is the way...
Interesting, but professional accounts only. I guess I will stick with Neo4j.
Friendly reminder: Neo4j is a graph database, so it can’t construct knowledge graphs for you. You’ll still need NLP techniques to extract entities and relationships first for knowledge graph data and later store in a graph database like Neo4j.
Very true, I guess non profit and passion projects will require to deal with that in other ways.
@@aldotanca9430 Actually all Diffbot's APIs become FREE this week, including Diffbot Natural Language API (being used in this video), which can help extract entities/relationships, entity resolution, etc. You can freely get access at: app.diffbot.com
@@diffbotai Thanks! But I think I would need to sign up with a company email? The system will not accept a personal email, github account or similar. It seems set to only allow a "work email". Of course, many people will have a work email and could use that even if their project is unconnected with their job, and there are probably 'creative' ways to get around that.
I was just pointing out that diffbot accounts seem to be meant for business users only.
I now see why i dont get good results with rag s.
6:28: hello. You should first have checked why your RAG is failing before trying another approach. Maybe your embeddings are not well suited.
That’s a good advice! Thank you for the feedback. I’ll try this when I encounter something similar again :)
@@lckgllm Actually I expereimented a lot of different results depending on the chunks length in combination with the vector size of the embeddings... also is important to provide a good quality of the text chunks. Last but not least, you can also optimize the semantic search using special embeddings model depending on the language you are targeting (in my case Italian)... in any case, your approach is really interesting and could actually save time because more or less people always make always the same questions vs a context / article, so extracting the relationships can be very useful. Great job!
Is it opensource
Which one? If you want to see the process, you can find the notebook in the description!
Bruh
I see cute girl; I click.
🙄😳
Yupp
You're basic a f
Sad
@@efexziumhappy
how can peraon be both smart and pretty