Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug fix]Optimize map prompt of global query to output JSON stably #473

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

KylinMountain
Copy link
Contributor

@KylinMountain KylinMountain commented Jul 10, 2024

Description

Optimize the map prompt with a valid example to output JSON in stable.

Related Issues

#471
#475

Proposed Changes

Optimize the map prompt with a valid example to output JSON in stable.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • [] I have added appropriate unit tests (if applicable).

Additional Notes

[Add any additional notes or context that may be helpful for the reviewer(s).]

@KylinMountain KylinMountain requested a review from a team as a code owner July 10, 2024 05:06
@KylinMountain
Copy link
Contributor Author

KylinMountain commented Jul 10, 2024

it has passed unit test.
image

@dustelf
Copy link

dustelf commented Jul 19, 2024

我按照你的改了,还是有问题

@KylinMountain
Copy link
Contributor Author

我按照你的改了,还是有问题

我认为仅通过优化提示并提供示例只能提示LLM,但无法强制其输出正确的JSON格式,效果仍然不理想。我不确定是否有其他开源LLM支持像OpenAI那样的JSON输出模型,但你可以尝试一些更大的LLM,可能会更好地遵循提示和示例中的指示。


You’re right. While an optimized prompt with examples can guide the LLM, it can’t guarantee the correct JSON output. There’s still some inconsistency. I’m not sure if other OSS LLMs support JSON output as well as OpenAI’s models do, but trying a larger LLM might improve adherence to the instructions and examples in the prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants