atharrva01 opened a new pull request, #385:
URL: https://github.com/apache/hugegraph-ai/pull/385

   Follow-up to #383, as suggested in the review there.
   
   The graph query templates still quoted edge labels and the `prop_to_match` 
key by hand. HugeGraph accepts names with apostrophes, so a schema with an edge 
label like `author's friend` (easy to get from LLM extraction) made every 
GraphRAG neighbor query fail with `unexpected token: s`. Same for a property 
key like `owner's name` in the property query path.
   
   This passes both through `gremlin_literal`, so all values in these templates 
are now escaped the same way.
   
   - Edge labels: `graph_query_node.py`, `edge_labels_str`
   - Property key: the three `'{prop}'` spots in `PROPERTY_QUERY_NEIGHBOR_TPL`
   
   I checked the queries against a real HugeGraph 1.7.0 server: the hand-quoted 
versions fail to parse, and the escaped ones run. Added two regression tests 
for the label and the key; both fail without the fix. The llm unit suite and 
Ruff pass.
   
   **Note:** this branch is on top of #383 because it uses `gremlin_literal` 
from there. Only the last commit is new. I'll rebase once #383 is merged.
   


-- 
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]

Reply via email to