The LLM Knowledge Graph tool can be used to extract key entities and relationships from long text documents. It creates detailed knowledge graphs from text, and the GraphReader agent facilitates RAG with high accuracy for complex queries.
The Graph Builder component processes long-form text such as Wikipedia articles, and extracts key entities, relationships, and atomic facts to construct a knowledge graph. This graph is stored in a Neo4j database for efficient querying and visualization.
The Graph Reader is a querying agent designed to form a rational plan, traverse the knowledge graph, and form answers to complex, multi-hop questions. By leveraging embeddings and graph-based reasoning, it creates responses that traditional RAG approaches struggle with.
----- Initial -----
Question: A popular novel was compared by the Sunday Times to works by Roald Dahls. How many copies of this novel have been sold?
----- Step: 1 -----
Rational Plan: To answer the question about how many copies of the novel have been sold, we need to:
1. Identify the novel that was compared by the Sunday Times to works by Roald Dahl.
2. Find specific sales figures or estimates for this novel, which might be mentioned in the article.
3. Provide the number of copies sold based on the information available in the article.
----- Step: 2 -----
Check Atomic Facts Queue: ['the sunday times', 'roald dahl', 'book sales', '8.3 million copies', '10.8 million copies']
>>> returned atomic facts shown in graph screenshot.
----- Step: 3 -----
Read Chunk: ['d112ff4558f29fcb3077101f5ada5229']
>>> returned a chunk of text (identified by hash) from the original article related to the above facts.
----- Step: 4 -----
Next Action: Termination
Rational for Next Action: The current chunk provides the sales figures for Harry Potter and the Philosopher's Stone, which is the novel compared to Roald Dahl's works by the Sunday Times. Therefore, the information needed to answer the question is complete.
----- Step: 5 -----
Analysis: The notebook entry provides a direct answer to the question. It states that the novel Harry Potter and the Philosopher's Stone was compared by the Sunday Times to works by Roald Dahl and that it has sold 120 million copies. There is no conflicting information or need for further analysis as the notebook content is clear and directly answers the question.
Answer: The novel has sold 120 million copies.
----- Return -----
Answer: The novel has sold 120 million copies.
This project is heavily inspired by the following research: