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

feat(faithfulness): delegate template parameter for dynamic loading o… #1367

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

realei
Copy link
Contributor

@realei realei commented Feb 15, 2025

Description
This PR makes a simple modification to the FaithfulnessMetric class to support dynamic injection of the FaithfulnessTemplate. With this change, users can now inject their own domain-specific template (subclassed from FaithfulnessTemplate) into FaithfulnessMetric, allowing for more customized prompt generation based on the user's specific context.

Motivation
Last month, I used DeepEval's faithfulness metrics and found that while the built-in algorithms work very well, I needed to override _generate_claims and _a_generate_claims...... to integrate few-shot prompt configurations specific to my domain. I realized that by enabling dynamic injection of a custom FaithfulnessTemplate, we can improve FaithfulnessMetric's adaptability across various domains without requiring a complete override of these methods.

Thank you for taking the time to review my code and consider this PR.

Copy link

vercel bot commented Feb 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
evals-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2025 1:08pm

@penguine-ip penguine-ip merged commit 96ee53b into confident-ai:main Feb 20, 2025
3 of 5 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