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

Improve JsonSchemaRule template #1175

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Improve JsonSchemaRule template #1175

merged 5 commits into from
Sep 17, 2024

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Sep 14, 2024

Describe your changes

Tweaks the prompt for JsonSchemaRule to avoid LLM outputting markdown.
Fixes doc admonition.

Issue ticket number and link

NA

@collindutter collindutter marked this pull request as ready for review September 14, 2024 00:27
dylanholmes
dylanholmes previously approved these changes Sep 14, 2024
Comment on lines 1 to 2
You must respond with a JSON object that successfully validates against the following Schema. Do not output markdown or any other text.
Schema: {{ json_schema }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prompt I've been using that seems to work pretty well is:

Output valid JSON that matches this schema: {schema}
No markdown, code snippets, code blocks, or backticks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that, updated!

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@collindutter collindutter merged commit c3f5d49 into dev Sep 17, 2024
15 checks passed
@collindutter collindutter deleted the fix/json branch September 17, 2024 16:50
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.

3 participants