-
Notifications
You must be signed in to change notification settings - Fork 769
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set and get prompts for metrics (#1259)
```python from ragas.experimental.metrics._faithfulness import FaithfulnessExperimental, LongFormAnswerPrompt faithfulness = FaithfulnessExperimental() faithfulness.get_prompts() #{'long_form_answer_prompt': <ragas.experimental.metrics._faithfulness.LongFormAnswerPrompt at 0x7fd7baa8efb0>, #'nli_statement_prompt': <ragas.experimental.metrics._faithfulness.NLIStatementPrompt at 0x7fd7baa8f010>} long_form_prompt = LongFormAnswerPrompt() long_form_prompt.instruction = "my new instruction" prompts = {"long_form_answer_prompt":long_form_prompt} faithfulness.set_prompts(**prompts) ``` --------- Co-authored-by: Jithin James <[email protected]>
- Loading branch information
1 parent
054c0e9
commit 4e6a96a
Showing
4 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters