|
66 | 66 | - If it is relevant, incorporate necessary information from it into the query.
|
67 | 67 | - If it is not relevant, generate the query solely based on the current question.
|
68 | 68 | - Use **only** the entities, relationship types, and properties specified in the ontology.
|
69 |
| -- **Pay attention to property data types as defined in the ontology:** |
70 |
| - - Use list functions for list properties. |
71 |
| - - Avoid unnecessary splitting of properties. |
72 |
| -- Ensure relationships are correctly directed; arrows should point from the **source** to the **target**. |
73 |
| -- If you cannot generate a valid OpenCypher statement for any reason, return an empty string. |
| 69 | +- **Relationship Types:** |
| 70 | + - Specify relationship types when required. |
| 71 | + - If any relationship type is acceptable, you can omit it by using `[*]`. |
| 72 | +- **Node Property Matching:** |
| 73 | + - Specify node properties within the `MATCH` clause or using a `WHERE` clause. |
| 74 | + - Use a `WHERE` clause when matching multiple node properties or for clarity. |
| 75 | +- **UNWIND Clause:** |
| 76 | + - Use `UNWIND` to expand a list into individual rows when you need to return individual node properties from a path. |
| 77 | +- Do **not** split **string properties** properties; they are already lists. |
| 78 | +- Ensure relationships are correctly directed; arrows should always point from the **source** to the **target**. |
| 79 | +- Verify that your Cypher query is valid and correct any errors. |
| 80 | +- Extract only the attributes relevant to the question. |
| 81 | +- If you cannot generate a valid OpenCypher statement for any reason, return an empty response. |
74 | 82 | - Output the Cypher statement enclosed in triple backticks.
|
75 | 83 |
|
76 |
| -
|
77 | 84 | **Last Answer:** {last_answer}
|
78 | 85 |
|
79 | 86 | **Question:** {question}
|
|
0 commit comments