-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Migrate Faithfulness + dependent metrics #2325
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
base: main
Are you sure you want to change the base?
Migrate Faithfulness + dependent metrics #2325
Conversation
| if t.TYPE_CHECKING: | ||
| from langchain_core.callbacks.base import Callbacks | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this?
| # DIRECT PROMPT TEMPLATES (No PydanticPrompt dependencies) | ||
| # ============================================================================ | ||
|
|
||
| CORRECTNESS_CLASSIFIER_PROMPT = """Given a ground truth and an answer statements, analyze each statement and classify them in one of the following categories: TP (true positive): statements that are present in answer that are also directly supported by the one or more statements in ground truth, FP (false positive): statements present in the answer but not directly supported by any statement in ground truth, FN (false negative): statements found in the ground truth but not present in answer. Each statement can only belong to one of the categories. Provide a reason for each classification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These prompts should be in the "prompts" folder and not inline here
| ) | ||
| examples_text += "-----------------------------\n" | ||
|
|
||
| return f"""Decompose and break down each of the input sentences into one or more standalone statements. Each statement should be a standalone claim that can be independently verified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the prompts to it's own director and use .format to fill in the templates or wrap in a function there
No description provided.