Skip to content

Commit ce17ad0

Browse files
author
louyk18
committed
update prompt
1 parent 9f31b50 commit ce17ad0

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

python/graphy/prompts/graph_analyze_prompts.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
TEMPLATE_QUERY_GENERATOR = """
2-
You are a highly skilled AI graph database expert. Given the user queries and the schema of a graph database, your role is to identify which information in the database is necessary to meet the user's requirements and provide the corresponding database query following the {language} syntax. Your response should only contain one query for the necessary information and do not include anything other than the cypher query. Do not start with ```.
2+
You are a highly skilled AI graph database expert. Given the user queries and the schema of a graph database, your role is to identify which information in the database is necessary to meet the user's requirements and provide the corresponding database query following the {language} syntax.
3+
The next step involves conducting specific analyses with the queried data, such as sorting, classifying, and describing the data. Therefore, when selecting attributes, it is important to analyze the intent of the user's query, clarify the purpose of the data query, and then determine the attributes that may be needed.
4+
Before crafting query statements, thoroughly analyze the schema provided by the user to identify valid labels for nodes and edges. Clearly understand which node labels can serve as the start and end points for each type of edge label. This ensures that you construct executable query statements.
5+
Your response should only contain one query for the necessary information and do not include anything other than the cypher query. Do not start with ```.
36
47
User Query: {user_query}
58
Schema: {schema}
@@ -14,7 +17,7 @@
1417
Guidance:
1518
- When selecting dimensions for categorization, you should choose those that are as distinct and important as possible.
1619
- When categorizing, try not to have a single paper belong to more than one category.
17-
- The number of categories is not necessarily the more the better; generally, dividing into 2-3 categories is preferable.
20+
- The number of categories is not necessarily the more the better; generally, dividing into 2-4 categories is preferable.
1821
"""
1922

2023

@@ -58,6 +61,18 @@
5861
"""
5962

6063

64+
TEMPLATE_RELATED_WORK_INTRO_GENERATOR = """Write a section introduction of the section Related Work (i.e., Section 2)
65+
with no more than 50 words and one paragraphs at most. The related works are categoried and the categories are detailed as follows:
66+
{prop_slot}
67+
68+
Now, start to write the section introduction.
69+
"""
70+
71+
72+
# You are a highly skilled academic AI assistant. Given a user query and a category, your role is to write a subsection of the related work section about the given category.
73+
# You are a highly skilled academic AI assistant. Given a user query and a category, your role is to write a subsection according to the given category for the given user query.
74+
75+
6176
TEMPLATE_RELATED_WORK_TEXT_PROMPT = """
6277
You are a highly skilled academic AI assistant. Given a user query and a category, your role is to write a subsection of the related work section about the given category.
6378
@@ -71,13 +86,6 @@
7186
"""
7287

7388

74-
TEMPLATE_RELATED_WORK_INTRO_GENERATOR = """Write a section introduction of the section Related Work (i.e., Section 2)
75-
with no more than 50 words and one paragraphs at most. The related works are categoried and the categories are detailed as follows:
76-
{prop_slot}
77-
78-
Now, start to write the section introduction.
79-
"""
80-
8189
TEMPLATE_TEXT_EXAMPLE_PROMPT = """An example of a subsection in a related work section is as follows
8290
(the information in this example MUST NOT be summarized in the section):
8391
2.1 [SECTION TITLE]

python/graphy/test_analyze.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
)
1717
graph_analyzer = LLMGraphAnalyzer(llm_model=llm_model)
1818
query = "write a related work section about the given data, you should category them based on the challenges they solve"
19+
# query = (
20+
# "write a section about the given data to analyze how GNN technology has evolved"
21+
# )
1922

2023
with open("config/analyze/schema_paper.json") as f:
2124
schema_json = json.load(f)

0 commit comments

Comments
 (0)