diff --git a/src/content/docs/reference/graphrag/basic-retriever.md b/src/content/docs/reference/graphrag/basic-retriever.md index 0f6af71..87546e8 100644 --- a/src/content/docs/reference/graphrag/basic-retriever.md +++ b/src/content/docs/reference/graphrag/basic-retriever.md @@ -14,9 +14,8 @@ tags: ["Basic"] ## Required Graph Shape -[Lexical Graph](/reference/knowledge-graph/lexical-graph) - ![](../../../../assets/images/knowledge-graph-lexical-graph.svg) +[Lexical Graph](/reference/knowledge-graph/lexical-graph/) ## Context diff --git a/src/content/docs/reference/graphrag/cypher-templates.md b/src/content/docs/reference/graphrag/cypher-templates.md index e97973e..bcc2a23 100644 --- a/src/content/docs/reference/graphrag/cypher-templates.md +++ b/src/content/docs/reference/graphrag/cypher-templates.md @@ -7,7 +7,7 @@ tags: ["Intermediate"] ## Required Graph Shape ![Domain Graph](../../../../assets/images/domain-graph.svg) -[Domain Graph](/reference/knowledge-graph/domain-graph) +[Domain Graph](/reference/knowledge-graph/domain-graph/) ## Context diff --git a/src/content/docs/reference/graphrag/dynamic-cypher-generation.md b/src/content/docs/reference/graphrag/dynamic-cypher-generation.md index c4a2ff7..f9f295a 100644 --- a/src/content/docs/reference/graphrag/dynamic-cypher-generation.md +++ b/src/content/docs/reference/graphrag/dynamic-cypher-generation.md @@ -7,7 +7,7 @@ tags: ["Intermediate"] ## Required Graph Shape ![Domain Graph](../../../../assets/images/domain-graph.svg) -[Domain Graph](/reference/knowledge-graph/domain-graph) +[Domain Graph](/reference/knowledge-graph/domain-graph/) ## Context @@ -33,7 +33,7 @@ Multiple templates can also be used in a chain or loop, which then leads to an a ## Usage -This pattern is an evolution of [Cypher Templates](/reference/graphrag/cypher-templates). +This pattern is an evolution of [Cypher Templates](/reference/graphrag/cypher-templates/). It is much more flexible allowing for more diverse user questions to be answered. Still, the range of questions is limited by the provided snippets. diff --git a/src/content/docs/reference/graphrag/global-community-summary-retriever.md b/src/content/docs/reference/graphrag/global-community-summary-retriever.md index 78ad4ba..8104217 100644 --- a/src/content/docs/reference/graphrag/global-community-summary-retriever.md +++ b/src/content/docs/reference/graphrag/global-community-summary-retriever.md @@ -13,7 +13,7 @@ tags: ["Advanced"] ## Required Graph Shape ![](../../../../assets/images/knowledge-graph-lexical-graph-extracted-entities-community-summaries.svg) -[Lexical Graph with Extracted Entities and Community Summaries](/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries) +[Lexical Graph with Extracted Entities and Community Summaries](/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries/) ## Context @@ -51,7 +51,7 @@ RETURN c.full_content AS output There are several variations in which you could use the Lexical Graph with extracted entities, communities, and community summaries: -* A [Local Retriever](/reference/graphrag/local-retriever) could start by executing a vector search on the entity embeddings and traversing to related entities, chunks, or communities (e.g., see Integrating Microsoft GraphRAG into Neo4j). +* A [Local Retriever](/reference/graphrag/local-retriever/) could start by executing a vector search on the entity embeddings and traversing to related entities, chunks, or communities (e.g., see Integrating Microsoft GraphRAG into Neo4j). * Depending on the question, we could also execute a vector similarity search on embeddings of the Community Summaries first to identify which subgraph is relevant for the question, then traverse from the communities to its entities and chunks to retrieve additional information. diff --git a/src/content/docs/reference/graphrag/graph-enhanced-vector-search.md b/src/content/docs/reference/graphrag/graph-enhanced-vector-search.md index 5156900..17e4f1d 100644 --- a/src/content/docs/reference/graphrag/graph-enhanced-vector-search.md +++ b/src/content/docs/reference/graphrag/graph-enhanced-vector-search.md @@ -12,7 +12,7 @@ tags: ["Advanced"] ## Required Graph Shape ![](../../../../assets/images/knowledge-graph-lexical-graph-extracted-entities.svg) -[Lexical Graph with Extracted Entities](/reference/knowledge-graph/lexical-graph-extracted-entities) +[Lexical Graph with Extracted Entities](/reference/knowledge-graph/lexical-graph-extracted-entities/) ## Context @@ -29,7 +29,7 @@ A traversal starting at the found chunks is executed to retrieve more context. ## Usage -This pattern is useful for retrieving more enriched context than the results of executing only a vector search as in e.g. [Basic Retrievers](/reference/graphrag/basic-retriever) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever). +This pattern is useful for retrieving more enriched context than the results of executing only a vector search as in e.g. [Basic Retrievers](/reference/graphrag/basic-retriever/) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever/). The additional traversal retrieves the interaction of entities within the provided data which reveals much richer information than the retrieval of specific text chunks. Naturally, the preprocessing for this GraphRAG pattern is effort. Furthermore, the amount of context that is returned by the Graph Traversal can be much larger context which the LLM needs be able to process. @@ -69,4 +69,4 @@ There are some variations of this retriever: ## Example Implementations -- [Neo4j's Knowledge Graph Builder](https://github.com/neo4j-labs/llm-graph-builder) +- [Neo4j's Knowledge Graph Builder](https://github.com/neo4j-labs/llm-graph-builder/) diff --git a/src/content/docs/reference/graphrag/hypothetical-question-retriever.md b/src/content/docs/reference/graphrag/hypothetical-question-retriever.md index 5e8ffc7..7c2616a 100644 --- a/src/content/docs/reference/graphrag/hypothetical-question-retriever.md +++ b/src/content/docs/reference/graphrag/hypothetical-question-retriever.md @@ -6,8 +6,8 @@ tags: ["Basic"] ## Required Graph Shape -[Lexical Graph with Hypothetical Questions](/reference/knowledge-graph/lexical-graph-hypothetical-questions) ![Lexical Graph with Hypothetical Questions](../../../../assets/images/knowledge-graph-lexical-graph-hypothetical-questions.svg) +[Lexical Graph with Hypothetical Questions](/reference/knowledge-graph/lexical-graph-hypothetical-questions/) ## Context @@ -21,7 +21,7 @@ A vector similarity search is executed on the previously generated questions. `k ## Usage -This pattern can yield better results in the vector similarity search than a question-to-chunk similarity search as used in e.g. [Basic Retrievers](/reference/graphrag/basic-retriever) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever). +This pattern can yield better results in the vector similarity search than a question-to-chunk similarity search as used in e.g. [Basic Retrievers](/reference/graphrag/basic-retriever/) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever/). However, it also requires more pre-processing effort and cost in LLM calls for the question generation. ## Required pre-processing diff --git a/src/content/docs/reference/graphrag/parent-child-retriever.md b/src/content/docs/reference/graphrag/parent-child-retriever.md index c6ec774..4dec244 100644 --- a/src/content/docs/reference/graphrag/parent-child-retriever.md +++ b/src/content/docs/reference/graphrag/parent-child-retriever.md @@ -11,7 +11,7 @@ tags: ["Basic"] ## Required Graph Shape ![Parent-Child Lexical Graph](../../../../assets/images/knowledge-graph-lexical-graph-parent-child.svg) -[Parent-Child Lexical Graph](/reference/knowledge-graph/lexical-graph-parent-child) +[Parent-Child Lexical Graph](/reference/knowledge-graph/lexical-graph-parent-child/) ## Context @@ -29,7 +29,7 @@ Optionally chunks for the same parent are aggregated and their scores are averag ## Usage -This pattern is a useful evolution of the [Basic Retriever](/reference/graphrag/basic-retriever). +This pattern is a useful evolution of the [Basic Retriever](/reference/graphrag/basic-retriever/). It is especially useful when several topics are covered in a chunk which subsequently influence the embedding negatively while smaller chunks will have more meaningful vector representations which can then lead to better similarity search results. With limited additional effort, better results can be obtained. @@ -62,7 +62,7 @@ RETURN parent.title + reduce(r="", c in chunks | r + "\n\n" + c.text) AS text, ## Similar Patterns -Similar patterns can be implemented on [Lexical Graphs With a Sibling Structure](../knowledge-graph/lexical-graph-sibling-structure) or [Lexical Graphs With a Hierarchical Structure](../knowledge-graph/lexical-graph-hierarchical-structure), where the additional context does not come from retrieving just the parent document but sibling documents or a previously set depth of structures. +Similar patterns can be implemented on [Lexical Graphs With a Sibling Structure](/reference/knowledge-graph/lexical-graph-sibling-structure/) or [Lexical Graphs With a Hierarchical Structure](/reference/knowledge-graph/lexical-graph-hierarchical-structure/), where the additional context does not come from retrieving just the parent document but sibling documents or a previously set depth of structures. The Lexical Graph With Sibling Structure is, for example, currently implemented in [Neo4j’s LLM Knowledge Graph Builder](https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/). Note that there are two kinds of retrievers possible on a Lexical Graph With a Hierarchical Structure: diff --git a/src/content/docs/reference/graphrag/text2cypher.md b/src/content/docs/reference/graphrag/text2cypher.md index 52ce4a4..6ef8ef5 100644 --- a/src/content/docs/reference/graphrag/text2cypher.md +++ b/src/content/docs/reference/graphrag/text2cypher.md @@ -7,11 +7,11 @@ tags: ["Intermediate"] ## Required Graph Shape ![Domain Graph](../../../../assets/images/domain-graph.svg) -[Domain Graph](/reference/knowledge-graph/domain-graph) +[Domain Graph](/reference/knowledge-graph/domain-graph/) ## Context -The two related GraphRAG patterns [Cypher Templates](/reference/graphrag/cypher-templates) and [Dynamic Cypher Generation](/reference/graphrag/dynamic-cypher-generation) are both limited by the queries / query snippets that are defined during implementation. +The two related GraphRAG patterns [Cypher Templates](/reference/graphrag/cypher-templates/) and [Dynamic Cypher Generation](/reference/graphrag/dynamic-cypher-generation/) are both limited by the queries / query snippets that are defined during implementation. ## Description @@ -35,7 +35,7 @@ The schema can be optionally enhanced by actual data value samples, distribution ## Further Considerations -If we compare [Cypher Templates](/reference/graphrag/cypher-templates), [Dynamic Cypher Generation](/reference/graphrag/dynamic-cypher-generation), and Text2Cypher, we could use the following analogy (illustrated in the images below) +If we compare [Cypher Templates](/reference/graphrag/cypher-templates/), [Dynamic Cypher Generation](/reference/graphrag/dynamic-cypher-generation/), and Text2Cypher, we could use the following analogy (illustrated in the images below) ![](https://dist.neo4j.com/wp-content/uploads/20240917100605/1mLD1YAwWzz14neLgHwi-Kg.png) diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries.md b/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries.md index b6ca19d..903ce6f 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities-community-summaries.md @@ -43,4 +43,4 @@ Additionally to extracting entities and their relationships, we need to form hie ## GraphRAG Pattern -A Lexical Graph with Extracted Entities and Community Summaries is used in [Global Community Summary Retrievers](/reference/graphrag/global-community-summary-retriever) and [Local Retrievers](/reference/graphrag/local-retriever). +A Lexical Graph with Extracted Entities and Community Summaries is used in [Global Community Summary Retrievers](/reference/graphrag/global-community-summary-retriever/) and [Local Retrievers](/reference/graphrag/local-retriever/). diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities.md b/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities.md index 4bc5a8c..5bf4eb8 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-extracted-entities.md @@ -5,7 +5,7 @@ description: A Lexical Graph that additionally contains extracted entities and r ## Context -The biggest problem with the vector search approach as in the e.g. [Basic Retrievers](/reference/graphrag/basic-retriever) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever) is finding all relevant context that is necessary to answer a question. The context can be spread across many chunks not being found by the search. Relating the real-world entities from the chunks to each other and retrieving these relationships together with a vector search provides additional context about these entities that the chunks deal with. +The biggest problem with the vector search approach as in the e.g. [Basic Retrievers](/reference/graphrag/basic-retriever/) or [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever/) is finding all relevant context that is necessary to answer a question. The context can be spread across many chunks not being found by the search. Relating the real-world entities from the chunks to each other and retrieving these relationships together with a vector search provides additional context about these entities that the chunks deal with. ## Graph Pattern diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-hierarchical-structure.md b/src/content/docs/reference/knowledge-graph/lexical-graph-hierarchical-structure.md index d60dcbc..9006624 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-hierarchical-structure.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-hierarchical-structure.md @@ -6,7 +6,7 @@ description: A Lexical Graph that additionally contains a Hierarchical Structure ## Context If the given documents have pre-defined structures, it is useful to persist them into the chunk structure. -This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph) +This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph/) ## Graph Pattern diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-hypothetical-questions.md b/src/content/docs/reference/knowledge-graph/lexical-graph-hypothetical-questions.md index 7621062..3a1094b 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-hypothetical-questions.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-hypothetical-questions.md @@ -6,7 +6,7 @@ description: A Lexical Graph that additionally contains hypothetical questions t ## Context The vector similarity between a question’s embedding and the text embedding of an appropriate answer might be quite different from each other. If we have question-chunk pairs available, we can execute a vector similarity search on the question embeddings which will probably deliver much better results than a vector similarity search on the chunks. -This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph) +This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph/) ## Graph Pattern @@ -37,4 +37,4 @@ Use an LLM to generate hypothetical questions that are answered within the chunk ## GraphRAG Pattern -A Lexical Graph with Hypothetical Questions is used in [Hypothetical Question Retrievers](/reference/graphrag/hypothetical-question-retriever). +A Lexical Graph with Hypothetical Questions is used in [Hypothetical Question Retrievers](/reference/graphrag/hypothetical-question-retriever/). diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-parent-child.md b/src/content/docs/reference/knowledge-graph/lexical-graph-parent-child.md index ebf9857..fd20edc 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-parent-child.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-parent-child.md @@ -7,7 +7,7 @@ description: A Lexical Graph that additionally contains a Parent-Child Structure It is useful to chunk large documents into smaller pieces for creating embeddings. An embedding is a text’s semantic representation capturing the meaning of what the text is about. If the given text is long and contains too many diverse subjects, the informative value of its embedding deteriorates. A more narrow piece of text will yield a more meaningful vector representation than a broader one since there is less noise from multiple topics. However if the LLM only receives a very small piece of information for answer generation, the information might be missing context. Retrieving the broader piece of text that the found information resides in solves the problem. -This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph) +This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph/) ## Graph Pattern @@ -36,4 +36,4 @@ When chunking documents, split them into (bigger) chunks (aka Parent Chunks) and ## GraphRAG Pattern -A Parent-Child Lexical Graph is used in [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever). +A Parent-Child Lexical Graph is used in [Parent-Child Retrievers](/reference/graphrag/parent-child-retriever/). diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph-sibling-structure.md b/src/content/docs/reference/knowledge-graph/lexical-graph-sibling-structure.md index fbc7743..99462e6 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph-sibling-structure.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph-sibling-structure.md @@ -6,7 +6,7 @@ description: A Lexical Graph that additionally contains a relationships between ## Context It is useful to keep track of adjacent chunks for a possible retrieval of them. -This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph) +This pattern is an evolution of the [Lexical Graph](/reference/knowledge-graph/lexical-graph/) ## Graph Pattern diff --git a/src/content/docs/reference/knowledge-graph/lexical-graph.md b/src/content/docs/reference/knowledge-graph/lexical-graph.md index 2fe4247..ea9a3b6 100644 --- a/src/content/docs/reference/knowledge-graph/lexical-graph.md +++ b/src/content/docs/reference/knowledge-graph/lexical-graph.md @@ -31,4 +31,4 @@ Split documents into chunks and use an embedding model to embed the text content ## GraphRAG Pattern -A Lexical Graph is used in [Basic Retrievers](/reference/graphrag/basic-retriever). +A Lexical Graph is used in [Basic Retrievers](/reference/graphrag/basic-retriever/). diff --git a/src/content/docs/reference/knowledge-graph/text-seq.md b/src/content/docs/reference/knowledge-graph/text-seq.md index 1b1e502..2169acb 100644 --- a/src/content/docs/reference/knowledge-graph/text-seq.md +++ b/src/content/docs/reference/knowledge-graph/text-seq.md @@ -37,4 +37,4 @@ metadata like a source reference. ## See also -- [Lexical Graph](/reference/knowledge-graph/lexical-graph) +- [Lexical Graph](/reference/knowledge-graph/lexical-graph/)