Skip to content

Commit

Permalink
fixed URL endings to /
Browse files Browse the repository at this point in the history
  • Loading branch information
jexp committed Dec 13, 2024
1 parent 1bc9bc3 commit 33317c9
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 28 deletions.
3 changes: 1 addition & 2 deletions src/content/docs/reference/graphrag/basic-retriever.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/reference/graphrag/cypher-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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/)
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/reference/graphrag/parent-child-retriever.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/reference/graphrag/text2cypher.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/).
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/).
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
2 changes: 1 addition & 1 deletion src/content/docs/reference/knowledge-graph/text-seq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

0 comments on commit 33317c9

Please sign in to comment.