Skip to content

Commit

Permalink
Update friends_golden_data_generator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aravind10x committed Feb 3, 2025
1 parent 422e021 commit e02d5eb
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions demo/Friends/friends_golden_data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,14 @@ def get_base_prompt(self, synthesizer_name: str) -> str:

def format_exemplar(self, sample: EvaluatedSample) -> str:
"""Format a sample as an exemplar"""
# return f"""
# Example {sample.sample.synthesizer_name}:
# Question: {sample.question}
# Answer: {sample.answer}
# Quality Metrics:
# - Helpfulness: {sample.scores.get('helpfulness', 'N/A')}
# - Correctness: {sample.scores.get('correctness', 'N/A')}
# - Coherence: {sample.scores.get('coherence', 'N/A')}
# """
return f"""
Example {sample}:
Question:
Answer:
Example {sample.sample.synthesizer_name}:
Question: {sample.question}
Answer: {sample.answer}
Quality Metrics:
- Helpfulness:
- Correctness:
- Coherence:
- Helpfulness: {sample.scores.get('helpfulness', 'N/A')}
- Correctness: {sample.scores.get('correctness', 'N/A')}
- Coherence: {sample.scores.get('coherence', 'N/A')}
"""

def update_synthesizer_prompts(
Expand Down

0 comments on commit e02d5eb

Please sign in to comment.