"""Faithfulness metric prompt template."""

from __future__ import annotations

TEMPLATE = """\
<task>
Evaluate whether the answer is faithful to the provided context. Every factual \
claim in the answer must be directly supported by information in the context.
</task>

<data>
<question>{question}</question>
<context>
{context}
</context>
<answer>{answer}</answer>
</data>

<rubric>
First, identify each distinct factual claim in the answer. Then, check whether \
each claim is supported by the context.

Scoring anchors:
- 1.0: Every factual claim is directly supported by the context.
- 0.7-0.9: Most claims are supported; minor details lack explicit backing but \
are reasonable inferences from the context.
- 0.4-0.6: A mix of supported and unsupported claims.
- 0.1-0.3: Most claims lack support from the context.
- 0.0: The answer is entirely unsupported by the context.

If the context is empty or missing, score 0.0."""
