Skip to content

fix(llm): fix CN prompt output example format to match EN version#341

Closed
linmengmeng-1314 wants to merge 1 commit into
apache:mainfrom
linmengmeng-1314:fix/cn-prompt-output-example-v2
Closed

fix(llm): fix CN prompt output example format to match EN version#341
linmengmeng-1314 wants to merge 1 commit into
apache:mainfrom
linmengmeng-1314:fix/cn-prompt-output-example-v2

Conversation

@linmengmeng-1314
Copy link
Copy Markdown
Contributor

Summary

  • Fix CN property graph extraction prompt output example: change from flat array [{...}, {...}] to structured format {"vertices":[...], "edges":[...]}
  • Add missing "id" field in edge example to keep CN/EN consistent

Problem

The CN prompt (graph_extract_prompt_CN) used a flat array format for the output example, while:

  • The EN prompt (graph_extract_prompt_EN) uses {"vertices":[...], "edges":[...]}
  • The actual parsing logic in property_graph_extract.py expects the structured format

This mismatch could cause LLM to output incorrect JSON structure when processing Chinese text.

Test plan

  • Verify ruff format and check pass
  • Confirm CN output example now matches EN structure

🤖 Generated with Claude Code

The CN property graph extraction prompt used a flat array format
[{...}, {...}] for the output example, while the EN version and the
actual parsing logic expect {"vertices":[...], "edges":[...]}.
Also add missing "id" field in edge example to keep CN/EN consistent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels May 20, 2026
@linmengmeng-1314
Copy link
Copy Markdown
Contributor Author

Closing this PR — the upstream has already fixed the CN prompt output example format in commit 2df0b6e (PR #339). No further action needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working llm size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants