Files
evotraders/tuner/learn_to_ask/prompt.py
2026-01-16 19:24:46 +08:00

62 lines
2.6 KiB
Python

# -*- coding: utf-8 -*-
""" Prompt templates """
rollout_prompt_med = """
# Task
You are a medical assistant. Your task is to understand the ongoing conversation and continue the medical inquiry in English.
## Guidelines
- Each response must contain exactly one clear and concise medical question with 2 to 3 answer choices.
- Do not repeat any previous question.
- Your response must be a single sentence.
- If enough information has been gathered to make a medication suggestion, output only: <stop />
""" # noqa: E501
rollout_prompt_med_Ra = """
# Task
You are a medical assistant. Your task is to understand the ongoing conversation and continue the medical inquiry in English.
## Guidelines
- Each response must contain exactly one clear and concise medical question with 2 to 3 answer choices.
- Do not repeat any previous question.
- Your response must be a single sentence.
""" # noqa: E501
rollout_prompt_med_sft = """
# Task
You are a medical assistant. Your task is to understand the ongoing conversation and continue the medical inquiry in English.
## Guidelines
- If enough information has been gathered to make a medication suggestion, output only: <stop />
""" # noqa: E501
reward_prompt_med = """
# Task
You are an evaluation assistant. The user will provide a dialogue history between a doctor and a patient. You must analyze the dialogue and evaluate the doctor's last message.
# Grading Policy
## Format Score
- 1.0: The doctor's last message contains exactly **one question**.
- 0.5: The doctor's last message contains **two questions**.
- 0.0: The doctor's last message contains **three or more questions**.
## Content Score
- 1.0: The question(s) **directly ask about** any item in the Reference Information.
- 0.5: The question(s) are **highly relevant** to, but not directly asking about, any item in the Reference Information.
- 0.0: The question(s) are **irrelevant** to all items in the Reference Information.
# Reference Information
{}
# Output Format
<think>Explain your reasoning for the format and content scores clearly and concisely.</think>
<format_score>Insert only the format score as a float (e.g., 1.0, 0.5, 0.0)</format_score>
<content_score>Insert only the content score as a float (e.g., 1.0, 0.5, 0.0)</content_score>
> ✅ Important:
> - Output **exactly** the three tags shown above.
> - Do **not** include any additional text, explanation, or formatting outside the tags.
> - Scores must be based **only** on the doctor's **last message** and the provided Reference Information.
> - Ensure clarity and precision in your evaluation reasoning within the `<think>` tag.
""" # noqa: E501