Skip to content

Improvements to AnswerRelevancy templates#1642

Merged
penguine-ip merged 2 commits intoconfident-ai:mainfrom
Spectavi:Spectavi-AnswerRelevancy-Template-Patch
Jun 2, 2025
Merged

Improvements to AnswerRelevancy templates#1642
penguine-ip merged 2 commits intoconfident-ai:mainfrom
Spectavi:Spectavi-AnswerRelevancy-Template-Patch

Conversation

@Spectavi
Copy link
Copy Markdown
Contributor

Ensures all examples are demarcated with "Example:" and "==== END OF EXAMPLE ====".
Adds clarifying language on splitting statements and ensuring valid JSON is output.

Spectavi added 2 commits May 29, 2025 17:51
Make examples format consistent. 
Add instructions enforcing valid JSON output.
Improves consistency with smaller models like Llama 3.3.
Discourages breaking single words into a statement if it's part of a larger, coherent statement. Smaller models will sometimes split the document into so many "statements" that it over-runs the context window leading to malformed, incomplete JSON outputs.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2025

@Spectavi is attempting to deploy a commit to the Confident AI Team on Vercel.

A member of the Team first needs to authorize it.

@Spectavi
Copy link
Copy Markdown
Contributor Author

Spectavi commented Jun 2, 2025

Ping, these basic adjustments will increase the consistency of the Answer Relevancy metric, particularly when using smaller models like Llama 3.3 70b. Without it I would sporadically get back invalid JSON causing noise in my eval results.

@penguine-ip
Copy link
Copy Markdown
Contributor

@Spectavi thanks!

@penguine-ip penguine-ip merged commit 4d3ed75 into confident-ai:main Jun 2, 2025
1 of 4 checks passed
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