Copilot commented on code in PR #274:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/274#discussion_r2190042273
##########
hugegraph-llm/src/hugegraph_llm/resources/prompt_examples/query_examples.json:
##########
@@ -0,0 +1,9 @@
+[
+ "Property filter: Find all 'person' nodes with age > 30 and return their
name and occupation",
+ "Relationship traversal: Find all roommates of the person named Alice, and
return their name and age",
+ "Shortest path: Find the shortest path between Bob and Charlie and show the
edge labels along the way",
+ "Subgraph match: Find all friend pairs who both follow the same webpage, and
return the names and URL",
+ "Aggregation: Count the number of people for each occupation and compute
their average age",
+ "Time-based filter: Find all nodes created after 2025-01-01 and return their
name and created_at",
+ "Top-N query: List top 10 most visited webpages with their URL and
visit_count"
Review Comment:
This JSON is an array of strings, but the code filters for objects with
`description` and `gremlin` fields. Update the entries to objects
`{"description": ..., "gremlin": ...}` so examples aren’t dropped.
```suggestion
{"description": "Property filter: Find all 'person' nodes with age > 30
and return their name and occupation", "gremlin": ""},
{"description": "Relationship traversal: Find all roommates of the person
named Alice, and return their name and age", "gremlin": ""},
{"description": "Shortest path: Find the shortest path between Bob and
Charlie and show the edge labels along the way", "gremlin": ""},
{"description": "Subgraph match: Find all friend pairs who both follow the
same webpage, and return the names and URL", "gremlin": ""},
{"description": "Aggregation: Count the number of people for each
occupation and compute their average age", "gremlin": ""},
{"description": "Time-based filter: Find all nodes created after
2025-01-01 and return their name and created_at", "gremlin": ""},
{"description": "Top-N query: List top 10 most visited webpages with their
URL and visit_count", "gremlin": ""}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]