Skip to content

Commit e00d6e7

Browse files
authored
fix(llm): update gremlin_generate prompt to apply fuzzy match (#163)
1 parent a0cc3f9 commit e00d6e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hugegraph-llm/src/hugegraph_llm/config/prompt_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ class PromptConfig(BasePromptConfig):
208208
209209
## Gremlin Query Generation (Executed only if the query is not complex):
210210
# Rules
211-
You may use the vertex ID directly if it’s provided in the context.
211+
- You may use the vertex ID directly if it’s provided in the context.
212+
- 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.
213+
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.
214+
212215
The output format must be as follows:
213216
```gremlin
214217
g.V().limit(10)

0 commit comments

Comments
 (0)