Skip to content

Commit a96ca43

Browse files
authored
Merge branch 'memgraph-2-21' into update-algorithm-pages
2 parents 325e4ab + 86097b7 commit a96ca43

34 files changed

+899
-128
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @hal-eisen-MG
1+
* @katarinasupe @gitbuda

.github/pull_request_template.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ PR this doc page is related to:
1717
Closes:
1818
(paste the link to the issue it closes)
1919

20-
2120
### Checklist:
2221

22+
- [ ] Make sure all relevant tech details are documented
23+
- [ ] Update reference pages (e.g. [clauses](https://memgraph.com/docs/querying/clauses), [functions](https://memgraph.com/docs/querying/functions), [flags](https://memgraph.com/docs/database-management/configuration#list-of-configuration-flags), [experimental](https://memgraph.com/docs/database-management/experimental-features), [monitoring](https://memgraph.com/docs/database-management/monitoring))
24+
- [ ] Search for the feature you are working on (mentions) and make updates if needed
25+
- [ ] Provide a basic example of usage
26+
- [ ] In case your feature is an Enterprise one, list it under [ME page](https://memgraph.com/docs/database-management/enabling-memgraph-enterprise) and mark its page with Enterprise ([example](https://memgraph.com/docs/database-management/authentication-and-authorization/role-based-access-control)).
2327
- [ ] Check all content with Grammarly
2428
- [ ] Perform a self-review of my code
25-
- [ ] Make corresponding changes to the rest of the documentation (consult with the DX team)
2629
- [ ] The build passes locally
2730
- [ ] My changes generate no new warnings or errors
2831
- [ ] Add a corresponding label
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Create Issue on Release PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
create_issue:
9+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.base.ref, 'main') # Only when merged to main
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check for Specific Label
14+
id: label_check
15+
run: |
16+
LABEL_FOUND=$(echo "${{ github.event.pull_request.labels[*].name }}" | grep -c "release-pr")
17+
echo "label_found=$LABEL_FOUND" >> $GITHUB_ENV
18+
19+
- name: Create GitHub Issue
20+
if: env.label_found == '1'
21+
uses: actions/github-script@v6
22+
with:
23+
script: |
24+
const { data: issue } = await github.issues.create({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
title: `Update hardcoded Memgraph versions under Getting Started`,
28+
body: `This issue was automatically created after PR #${{ github.event.pull_request.number }}. https://www.notion.so/memgraph/WIP-Documentation-branching-and-release-strategy-814417bb95ae45848071f535013d3d83?pvs=4#10b6b158b981801c9f0cc43f9f122462`
29+
assignees: ["katarinasupe"]
30+
});
31+
console.log(`Created issue: ${issue.html_url}`);

components/code-snippet/CodeSnippet.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ export default function CodeSnippet(props: { code: string; page: string, os: str
2929

3030
const copyToClipboard = () => {
3131
navigator.clipboard.writeText(props.code);
32-
global.window.analytics.track("Docker Run Copied", {
33-
source: "docs",
34-
page: props.page,
35-
os: props.os
36-
});
32+
// global.window.analytics.track("Docker Run Copied", {
33+
// source: "docs",
34+
// page: props.page,
35+
// os: props.os
36+
// });
3737
document.getElementById(idCopy)?.classList.add("hidden");
3838
document.getElementById(idCopied)?.classList.remove("hidden");
3939
setTimeout(() => {

components/link-click/LinkClick.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

pages/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"index": "Home",
33
"getting-started": "Getting started",
44
"client-libraries": "Client libraries",
5+
"ai-ecosystem": "AI ecosystem",
56
"fundamentals": "Fundamentals",
67
"data-migration": "Data migration",
78
"querying": "Querying",

pages/advanced-algorithms/available-algorithms/leiden_community_detection.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ CALL leiden_community_detection.get()
101101
YIELD node, community_id, communities;
102102
```
103103

104+
<Callout type="info">
105+
The algorithm throws an exception if no communities are detected. This can happen if in the first iteration
106+
all nodes merge into a single community or if each node forms its own. If this occurs, try adjusting the algorithm's `gamma` parameter.
107+
</Callout>
108+
104109
### `get_subgraph()`
105110

106111
Computes graph communities over a subgraph using the Leiden method.

pages/advanced-algorithms/available-algorithms/pagerank_online.mdx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,18 @@ its expectation, which is Rank(v).
4848
| **Edge weights** | unweighted |
4949
| **Parallelism** | sequential |
5050

51+
<Callout type="info">
52+
This algorithm is currently running in a sequential manner, but can be parallelized.
53+
If you have a use case for parallelizing this algorithm, please contact us over
54+
**[Discord](https://discord.gg/memgraph).**
55+
</Callout>
56+
5157
## Procedures
5258

5359
Online PageRank should be used by executing the procedures in the following way:
54-
1. Parameters and the context is set using the `set()` procedure.
60+
1. With the `set()` procedure, the PageRank values are calculated on the graph for the first time. This function
61+
is also important as it sets the streaming context for this algorithm, so further updates of the graph
62+
can result in faster execution.
5563

5664
2. To make the incremental flow, set the proper trigger using the `update()` function:
5765

@@ -63,7 +71,9 @@ Online PageRank should be used by executing the procedures in the following way:
6371
SET node.rank = rank;
6472
```
6573

66-
3. Use the `get()` procedure to return the resulting values stored in the cache.
74+
3. Use the `get()` procedure to return the resulting values stored in the cache. If the user hasn't previously run
75+
`set()`, the procedure will also do the `set()` functionality first in order to initialize the streaming context of
76+
this algorithm.
6777
4. Finally, the `reset()` function resets the context and enables you to start new runs.
6878

6979
<Callout type="info">
@@ -72,13 +82,15 @@ You can execute this algorithm on [graph projections, subgraphs or portions of t
7282

7383
### `set()`
7484

75-
The procedure calculates PageRank for the nodes in the graph.
85+
The procedure calculates PageRank for the nodes in the graph. The procedure is currently running in a
86+
sequential manner, but can be parallelized
87+
(the [non-streaming version of pagerank](/advanced-algorithms/available-algorithms/pagerank) offers
88+
parallelism, but is not applicable as it doesn't set the streaming context for the algorithm).
7689

7790
{<h4> Input: </h4>}
7891

7992
- `subgraph: Graph` (**OPTIONAL**) ➡ A specific subgraph, which is an [object of type Graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph) returned by the `project()` function, on which the algorithm is run.
8093
If subgraph is not specified, the algorithm is computed on the entire graph by default.
81-
8294
- `walks_per_node: integer (default=10)` ➡ Number of sampled walks per node.
8395
- `walk_stop_epsilon: double (default=0.1)` ➡ The probability of stopping when deriving
8496
the random walk. On average, it will create walks of length `1 /
@@ -95,7 +107,7 @@ If subgraph is not specified, the algorithm is computed on the entire graph by d
95107
Use the following query to calculate PageRank:
96108

97109
```cypher
98-
CALL pagerank_online.set(100, 0.2)
110+
CALL pagerank_online.set()
99111
YIELD node, rank;
100112
```
101113

@@ -135,7 +147,6 @@ changes in the graph.
135147

136148
- `subgraph: Graph` (**OPTIONAL**) ➡ A specific subgraph, which is an [object of type Graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph) returned by the `project()` function, on which the algorithm is run.
137149
If subgraph is not specified, the algorithm is computed on the entire graph by default.
138-
139150
- `created_vertices` ➡ Nodes that were created in the last transaction.
140151
- `created_edges` ➡ Relationships created in a period from the last transaction.
141152
- `deleted_vertices` ➡ Nodes deleted from the last transaction.

pages/advanced-algorithms/available-algorithms/path.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ procedure uses bfs.
381381

382382
| Name | Type | Default | Description |
383383
|- |- |- |- |
384-
| minLevel | Int | 0 | The minimum number of hops in the traversal. Set to `0` if the start node should be included in the subgraph, or `1` otherwise. |
385-
| maxLevel | Int | -1 | The maximum number of hops in the traversal. |
384+
| minHops | Int | 0 | The minimum number of hops in the traversal. Set to `0` if the start node should be included in the subgraph, or `1` otherwise. |
385+
| maxHops | Int | -1 | The maximum number of hops in the traversal. |
386386
| relationshipFilter | List | [ ] | List of relationships which the subgraph formation will follow. Relationships
387387
can be filtered using the notation described below. |
388388
| labelFilter | List | [ ] | List of labels which will define filtering. Labels
@@ -489,8 +489,8 @@ MATCH (w:Wolf), (d:Dog), (c:Cat), (m:Mouse), (h:Human)
489489
CALL path.subgraph_all(d, {
490490
relationshipFilter: ["CATCHES>","<HATES"],
491491
labelFilter: [">Mouse", ">Human"],
492-
minLevel: 0,
493-
maxLevel: 4
492+
minHops: 0,
493+
maxHops: 4
494494
})
495495
YIELD nodes, rels
496496
RETURN nodes, rels;
@@ -534,8 +534,8 @@ MATCH (w:Wolf), (d:Dog), (c:Cat), (m:Mouse), (h:Human)
534534
CALL path.subgraph_all(d, {
535535
relationshipFilter: ["<"],
536536
labelFilter: ["-Human"],
537-
minLevel: 0,
538-
maxLevel: 4
537+
minHops: 0,
538+
maxHops: 4
539539
})
540540
YIELD nodes, rels
541541
RETURN nodes, rels;
@@ -583,8 +583,8 @@ relationship and label filters, and ensures each node is visited only once.
583583

584584
| Name | Type | Default | Description |
585585
|- |- |- |- |
586-
| minLevel | Int | 0 | The minimum number of hops in the traversal. Set to `0` if the start node should be included in the subgraph, or `1` otherwise. |
587-
| maxLevel | Int | -1 | The maximum number of hops in the traversal. |
586+
| minHops | Int | 0 | The minimum number of hops in the traversal. Set to `0` if the start node should be included in the subgraph, or `1` otherwise. |
587+
| maxHops | Int | -1 | The maximum number of hops in the traversal. |
588588
| relationshipFilter | List | [ ] | List of relationships which the subgraph formation will follow. Explained in detail below. |
589589
| labelFilter | List | [ ] | List of labels which will define filtering. Explained in detail below. |
590590
| filterStartNode | Bool | False | Whether the labelFilter applies to the start nodes. |
@@ -683,8 +683,8 @@ MATCH (w:Wolf), (d:Dog), (c:Cat), (m:Mouse), (h:Human)
683683
CALL path.subgraph_nodes(d, {
684684
relationshipFilter: ["CATCHES>","<HATES"],
685685
labelFilter: [">Mouse", ">Human"],
686-
minLevel: 0,
687-
maxLevel: 4
686+
minHops: 0,
687+
maxHops: 4
688688
})
689689
YIELD nodes
690690
RETURN nodes;
@@ -729,8 +729,8 @@ MATCH (w:Wolf), (d:Dog), (c:Cat), (m:Mouse), (h:Human)
729729
CALL path.subgraph_nodes(d, {
730730
relationshipFilter: ["<"],
731731
labelFilter: ["-Human"],
732-
minLevel: 0,
733-
maxLevel: 4
732+
minHops: 0,
733+
maxHops: 4
734734
})
735735
YIELD nodes
736736
RETURN nodes
@@ -763,4 +763,4 @@ that depend on the internal database `id` values.
763763
| "type": "node" |
764764
| } |
765765
+----------------------------+
766-
```
766+
```

pages/ai-ecosystem.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Memgraph's AI Ecosystem
3+
description: Explore key features, such as community detection, node embeddings, and graph neural networks, alongside integrations with popular AI libraries like LangChain and LlamaIndex, to create powerful, data-driven GenAI solutions.
4+
---
5+
6+
import { Card, Cards } from 'nextra/components'
7+
import { Callout } from 'nextra/components'
8+
9+
# Memgraph's AI Ecosystem
10+
11+
To learn about Memgraph's key features to build AI apps, explore the following
12+
pages:
13+
14+
- [GraphRAG](/ai-ecosystem/graph-rag)
15+
- [Machine learning](/ai-ecosystem/machine-learning)
16+
17+
18+
AI spans multiple areas like machine learning (ML), natural language processing
19+
(NLP), and knowledge representation and reasoning (KRR), often overlapping to
20+
create advanced systems. A key example is **Generative AI (GenAI)**, which generates
21+
new content like text or images. Large Language Models (LLMs) power many GenAI
22+
apps, but getting them to work with your custom data can be challenging.
23+
24+
Fine-tuning LLMs to incorporate custom data is often complex, slow, and costly.
25+
Plus, frequent updates make it inefficient.
26+
27+
**Retrieval-Augmented Generation (RAG)** solves this by enhancing LLMs with
28+
external data sources, enabling dynamic, scalable knowledge updates. Traditional
29+
RAG is based on vector structure with vector databases, and it has proven to be
30+
a great solution in many use cases. Still, it often falls short when retrieving
31+
crucial knowledge from complex datasets. That is where GraphRAG excels.
32+
33+
**GraphRAG** improves on this by using knowledge graphs and graph features (e.g.,
34+
community detection, neighborhood analysis) for more accurate retrieval and
35+
data-rich insights. This hybrid approach provides better context and performance
36+
for GenAI applications.
37+
38+
Memgraph has been a popular choice in AI, especially for cases that utilize
39+
[machine learning](/ai-ecosystem/machine-learning). It also proves to be a great
40+
choice to build a [GraphRAG](/ai-ecosystem/graph-rag).
41+

0 commit comments

Comments
 (0)