This is an automated email from the ASF dual-hosted git repository. jin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-ai.git
The following commit(s) were added to refs/heads/main by this push: new e00d6e7 fix(llm): update gremlin_generate prompt to apply fuzzy match (#163) e00d6e7 is described below commit e00d6e7945c757d4dc60b74f1435fc420b8a82dc Author: HaoJin Yang <1454...@gmail.com> AuthorDate: Thu Feb 20 14:59:20 2025 +0800 fix(llm): update gremlin_generate prompt to apply fuzzy match (#163) --- hugegraph-llm/src/hugegraph_llm/config/prompt_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hugegraph-llm/src/hugegraph_llm/config/prompt_config.py b/hugegraph-llm/src/hugegraph_llm/config/prompt_config.py index 51d84a1..c0bdc7a 100644 --- a/hugegraph-llm/src/hugegraph_llm/config/prompt_config.py +++ b/hugegraph-llm/src/hugegraph_llm/config/prompt_config.py @@ -208,7 +208,10 @@ Assess the user’s query to determine its complexity based on the following cri ## Gremlin Query Generation (Executed only if the query is not complex): # Rules -You may use the vertex ID directly if it’s provided in the context. +- You may use the vertex ID directly if it’s provided in the context. +- If the provided question contains entity names that are very similar to the Vertices IDs, then in the generated Gremlin statement, replace the approximate entities from the original question. +For example, if the question includes the name ABC, and the provided VerticesIDs do not contain ABC but only abC, then use abC instead of ABC from the original question when generating the gremlin. + The output format must be as follows: ```gremlin g.V().limit(10)