Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
•
eebe34f
1
Parent(s):
c5cb52f
update
Browse files- html/leaderboard_template.html +2 -1
- html/prompt_display.html +0 -32
- pages/leaderboard.py +33 -64
- prompt/prompt.ipynb +12 -7
- prompt/prompt.json +1 -1
html/leaderboard_template.html
CHANGED
@@ -64,4 +64,5 @@
|
|
64 |
});
|
65 |
</script>
|
66 |
</body>
|
67 |
-
</html>
|
|
|
|
64 |
});
|
65 |
</script>
|
66 |
</body>
|
67 |
+
</html>
|
68 |
+
|
html/prompt_display.html
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Prompt Details</title>
|
7 |
-
</head>
|
8 |
-
<body>
|
9 |
-
<h1>Prompt Details</h1>
|
10 |
-
<div id="prompt-container"></div>
|
11 |
-
|
12 |
-
<script>
|
13 |
-
const urlParams = new URLSearchParams(window.location.search);
|
14 |
-
const promptId = urlParams.get('id');
|
15 |
-
|
16 |
-
// Fetch the prompt data dynamically (you can modify this part based on how you are storing prompts)
|
17 |
-
fetch('/prompt/prompt.json') // Assuming prompts are stored in this file
|
18 |
-
.then(response => response.json())
|
19 |
-
.then(prompts => {
|
20 |
-
const prompt = prompts.find(p => p.id === promptId);
|
21 |
-
if (prompt) {
|
22 |
-
document.getElementById('prompt-container').innerHTML = `
|
23 |
-
<h2>Prompt ID: ${promptId}</h2>
|
24 |
-
<p><strong>Prompt:</strong> ${prompt.prompt.replace(/\n/g, '<br>')}</p>
|
25 |
-
`;
|
26 |
-
} else {
|
27 |
-
document.getElementById('prompt-container').innerText = "Prompt not found.";
|
28 |
-
}
|
29 |
-
});
|
30 |
-
</script>
|
31 |
-
</body>
|
32 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pages/leaderboard.py
CHANGED
@@ -1,110 +1,79 @@
|
|
1 |
-
import pandas as pd
|
2 |
import html
|
3 |
import json
|
|
|
4 |
import gradio as gr
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
if os.access(file_path, os.R_OK):
|
11 |
-
print(f"{file_path} is readable")
|
12 |
-
else:
|
13 |
-
print(f"{file_path}is not readable")
|
14 |
-
|
15 |
-
|
16 |
-
file_path = "html/leaderboard_template.html"
|
17 |
-
|
18 |
-
if os.access(file_path, os.R_OK):
|
19 |
-
print(f"{file_path} is readable")
|
20 |
-
else:
|
21 |
-
print(f"{file_path}is not readable")
|
22 |
-
|
23 |
-
file_path = "prompt/prompt.json"
|
24 |
-
|
25 |
-
if os.access(file_path, os.R_OK):
|
26 |
-
print(f"{file_path} is readable")
|
27 |
-
else:
|
28 |
-
print(f"{file_path}is not readable")
|
29 |
-
|
30 |
-
|
31 |
-
def create_html_with_tooltip(id, prompt):
|
32 |
-
# Create a URL that points to the new page with the prompt ID in the query string
|
33 |
-
escaped_prompt = html.escape(prompt.replace("\n", "<br />"))
|
34 |
-
return f'<a href="html/prompt_display.html?id={id}" class="tooltip" data-id="{id}" data-prompt="{escaped_prompt}">{id}</a>'
|
35 |
|
|
|
36 |
with open("prompt/prompt.json", "r") as file:
|
37 |
json_data = file.read()
|
38 |
-
prompts = json.loads(json_data)
|
39 |
|
|
|
40 |
winning_rate = [prompt['metric']['winning_number'] for prompt in prompts]
|
41 |
winning_rate = [num / sum(winning_rate) for num in winning_rate]
|
42 |
data = {
|
43 |
'Rank': [i+1 for i in range(len(prompts))],
|
44 |
-
'Methods': [create_html_with_tooltip(prompt['id'], prompt['
|
45 |
'Rouge Score': [prompt['metric']['Rouge'] for prompt in prompts],
|
46 |
'Winning Rate': winning_rate,
|
47 |
'Authors': [prompt['author'] for prompt in prompts],
|
48 |
}
|
49 |
|
|
|
50 |
df = pd.DataFrame(data)
|
51 |
df.sort_values(by='Rouge Score', ascending=False, inplace=True, ignore_index=True)
|
52 |
df['Rank'] = range(1, len(df) + 1)
|
53 |
|
54 |
-
#
|
55 |
medals = ['🏅', '🥈', '🥉']
|
56 |
for i in range(3):
|
57 |
df.loc[i, 'Authors'] = f"{medals[i]} {df.loc[i, 'Authors']}"
|
58 |
|
|
|
59 |
def update_leaderboard(sort_by):
|
60 |
sorted_df = df.sort_values(by=sort_by, ascending=False, ignore_index=True)
|
61 |
sorted_df['Rank'] = range(1, len(sorted_df) + 1)
|
62 |
-
|
63 |
-
# Convert DataFrame to HTML with clickable headers for sorting
|
64 |
table_html = sorted_df.to_html(index=False, escape=False)
|
65 |
-
|
66 |
# Add sorting links to column headers
|
67 |
for column in sorted_df.columns:
|
68 |
table_html = table_html.replace(f'<th>{column}</th>',
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
with open('html/leaderboard_template.html', 'r') as file:
|
73 |
-
template = file.read()
|
74 |
-
|
75 |
-
# Create the sortBy function in JavaScript
|
76 |
-
sort_by_function = """
|
77 |
-
function sortBy(column) {{
|
78 |
-
const gradioEl = document.querySelector('gradio-app');
|
79 |
-
const dropdown = gradioEl.querySelector('select');
|
80 |
-
dropdown.value = column;
|
81 |
-
dropdown.dispatchEvent(new Event('change'));
|
82 |
-
}}
|
83 |
-
"""
|
84 |
-
|
85 |
-
# Insert the table HTML and sortBy function into the template
|
86 |
-
full_html = template.replace('<div id="leaderboard-container"></div>',
|
87 |
-
f'<div id="leaderboard-container">{table_html}</div>')
|
88 |
-
full_html = full_html.replace('// This function will be implemented in Python and injected here',
|
89 |
-
sort_by_function)
|
90 |
-
|
91 |
-
return full_html
|
92 |
|
|
|
93 |
def create_leaderboard():
|
94 |
with gr.Blocks(css="""
|
95 |
.tooltip { cursor: pointer; color: blue; text-decoration: underline; }
|
|
|
|
|
|
|
|
|
96 |
""") as demo:
|
97 |
gr.Markdown("# 🏆 Summarization Arena Leaderboard")
|
98 |
with gr.Row():
|
99 |
gr.Markdown("[Blog](placeholder) | [GitHub](placeholder) | [Paper](placeholder) | [Dataset](placeholder) | [Twitter](placeholder) | [Discord](placeholder)")
|
100 |
-
gr.Markdown("Welcome to our open platform for evaluating LLM summarization capabilities.
|
|
|
|
|
101 |
sort_by = gr.Dropdown(list(df.columns), label="Sort by", value="Rouge Score")
|
102 |
-
|
|
|
103 |
leaderboard = gr.HTML(update_leaderboard("Rouge Score"), elem_id="leaderboard")
|
104 |
-
|
105 |
-
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
if __name__ == "__main__":
|
109 |
demo = create_leaderboard()
|
110 |
-
demo.launch()
|
|
|
|
|
1 |
import html
|
2 |
import json
|
3 |
+
import pandas as pd
|
4 |
import gradio as gr
|
5 |
|
6 |
+
# Function to create HTML tooltips
|
7 |
+
def create_html_with_tooltip(id, base_url):
|
8 |
+
return f'<a href="{base_url}"target="_blank">{id}</a>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
# Load prompts from JSON
|
11 |
with open("prompt/prompt.json", "r") as file:
|
12 |
json_data = file.read()
|
13 |
+
prompts = json.loads(json_data)
|
14 |
|
15 |
+
# Prepare leaderboard data
|
16 |
winning_rate = [prompt['metric']['winning_number'] for prompt in prompts]
|
17 |
winning_rate = [num / sum(winning_rate) for num in winning_rate]
|
18 |
data = {
|
19 |
'Rank': [i+1 for i in range(len(prompts))],
|
20 |
+
'Methods': [create_html_with_tooltip(prompt['id'], prompt['url']) for prompt in prompts],
|
21 |
'Rouge Score': [prompt['metric']['Rouge'] for prompt in prompts],
|
22 |
'Winning Rate': winning_rate,
|
23 |
'Authors': [prompt['author'] for prompt in prompts],
|
24 |
}
|
25 |
|
26 |
+
# Create DataFrame and sort by Rouge Score
|
27 |
df = pd.DataFrame(data)
|
28 |
df.sort_values(by='Rouge Score', ascending=False, inplace=True, ignore_index=True)
|
29 |
df['Rank'] = range(1, len(df) + 1)
|
30 |
|
31 |
+
# Assign medals for top 3 authors
|
32 |
medals = ['🏅', '🥈', '🥉']
|
33 |
for i in range(3):
|
34 |
df.loc[i, 'Authors'] = f"{medals[i]} {df.loc[i, 'Authors']}"
|
35 |
|
36 |
+
# Function to update the leaderboard
|
37 |
def update_leaderboard(sort_by):
|
38 |
sorted_df = df.sort_values(by=sort_by, ascending=False, ignore_index=True)
|
39 |
sorted_df['Rank'] = range(1, len(sorted_df) + 1)
|
40 |
+
|
41 |
+
# Convert DataFrame to HTML with clickable headers for sorting
|
42 |
table_html = sorted_df.to_html(index=False, escape=False)
|
43 |
+
|
44 |
# Add sorting links to column headers
|
45 |
for column in sorted_df.columns:
|
46 |
table_html = table_html.replace(f'<th>{column}</th>',
|
47 |
+
f'<th><a href="#" onclick="sortBy(\'{column}\'); return false;">{column}</a></th>')
|
48 |
+
|
49 |
+
return table_html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
+
# Define Gradio interface
|
52 |
def create_leaderboard():
|
53 |
with gr.Blocks(css="""
|
54 |
.tooltip { cursor: pointer; color: blue; text-decoration: underline; }
|
55 |
+
table { border-collapse: collapse; width: 100%; }
|
56 |
+
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
57 |
+
th { background-color: #f2f2f2; }
|
58 |
+
#prompt-display { display: none; }
|
59 |
""") as demo:
|
60 |
gr.Markdown("# 🏆 Summarization Arena Leaderboard")
|
61 |
with gr.Row():
|
62 |
gr.Markdown("[Blog](placeholder) | [GitHub](placeholder) | [Paper](placeholder) | [Dataset](placeholder) | [Twitter](placeholder) | [Discord](placeholder)")
|
63 |
+
gr.Markdown("Welcome to our open platform for evaluating LLM summarization capabilities.")
|
64 |
+
|
65 |
+
# Dropdown for sorting
|
66 |
sort_by = gr.Dropdown(list(df.columns), label="Sort by", value="Rouge Score")
|
67 |
+
|
68 |
+
# Display the leaderboard
|
69 |
leaderboard = gr.HTML(update_leaderboard("Rouge Score"), elem_id="leaderboard")
|
70 |
+
|
71 |
+
# Change sorting when dropdown is changed
|
72 |
+
sort_by.change(fn=lambda sort: update_leaderboard(sort), inputs=sort_by, outputs=leaderboard)
|
73 |
|
74 |
+
return demo
|
75 |
|
76 |
+
# Launch Gradio interface
|
77 |
if __name__ == "__main__":
|
78 |
demo = create_leaderboard()
|
79 |
+
demo.launch(debug=True)
|
prompt/prompt.ipynb
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
@@ -16,7 +16,8 @@
|
|
16 |
" \"metric\": {\n",
|
17 |
" \"Rouge\": 0.14,\n",
|
18 |
" \"winning_number\": 10\n",
|
19 |
-
" }
|
|
|
20 |
" },\n",
|
21 |
" {\n",
|
22 |
" \"id\": \"id_1\",\n",
|
@@ -52,7 +53,8 @@
|
|
52 |
" \"metric\": {\n",
|
53 |
" \"Rouge\": 0.14,\n",
|
54 |
" \"winning_number\": 12\n",
|
55 |
-
" }
|
|
|
56 |
" },\n",
|
57 |
" {\n",
|
58 |
" \"id\": \"id_2\",\n",
|
@@ -61,7 +63,8 @@
|
|
61 |
" \"metric\": {\n",
|
62 |
" \"Rouge\": 0.15,\n",
|
63 |
" \"winning_number\": 3\n",
|
64 |
-
" }
|
|
|
65 |
" },\n",
|
66 |
" {\n",
|
67 |
" \"id\": \"id_3\",\n",
|
@@ -92,7 +95,8 @@
|
|
92 |
" \"metric\": {\n",
|
93 |
" \"Rouge\": 0.11,\n",
|
94 |
" \"winning_number\": 8\n",
|
95 |
-
" }
|
|
|
96 |
" },\n",
|
97 |
" {\n",
|
98 |
" \"id\": \"id_4\",\n",
|
@@ -149,14 +153,15 @@
|
|
149 |
" \"metric\": {\n",
|
150 |
" \"Rouge\": 0.2,\n",
|
151 |
" \"winning_number\": 13\n",
|
152 |
-
" }
|
|
|
153 |
" },\n",
|
154 |
"]"
|
155 |
]
|
156 |
},
|
157 |
{
|
158 |
"cell_type": "code",
|
159 |
-
"execution_count":
|
160 |
"metadata": {},
|
161 |
"outputs": [],
|
162 |
"source": [
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 3,
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
|
|
16 |
" \"metric\": {\n",
|
17 |
" \"Rouge\": 0.14,\n",
|
18 |
" \"winning_number\": 10\n",
|
19 |
+
" },\n",
|
20 |
+
" \"url\": \"https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D2\"\n",
|
21 |
" },\n",
|
22 |
" {\n",
|
23 |
" \"id\": \"id_1\",\n",
|
|
|
53 |
" \"metric\": {\n",
|
54 |
" \"Rouge\": 0.14,\n",
|
55 |
" \"winning_number\": 12\n",
|
56 |
+
" },\n",
|
57 |
+
" \"url\": \"https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D3\"\n",
|
58 |
" },\n",
|
59 |
" {\n",
|
60 |
" \"id\": \"id_2\",\n",
|
|
|
63 |
" \"metric\": {\n",
|
64 |
" \"Rouge\": 0.15,\n",
|
65 |
" \"winning_number\": 3\n",
|
66 |
+
" },\n",
|
67 |
+
" \"url\": \"https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D4\"\n",
|
68 |
" },\n",
|
69 |
" {\n",
|
70 |
" \"id\": \"id_3\",\n",
|
|
|
95 |
" \"metric\": {\n",
|
96 |
" \"Rouge\": 0.11,\n",
|
97 |
" \"winning_number\": 8\n",
|
98 |
+
" },\n",
|
99 |
+
" \"url\": \"https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D5\"\n",
|
100 |
" },\n",
|
101 |
" {\n",
|
102 |
" \"id\": \"id_4\",\n",
|
|
|
153 |
" \"metric\": {\n",
|
154 |
" \"Rouge\": 0.2,\n",
|
155 |
" \"winning_number\": 13\n",
|
156 |
+
" },\n",
|
157 |
+
" \"url\": \"https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D6\"\n",
|
158 |
" },\n",
|
159 |
"]"
|
160 |
]
|
161 |
},
|
162 |
{
|
163 |
"cell_type": "code",
|
164 |
+
"execution_count": 4,
|
165 |
"metadata": {},
|
166 |
"outputs": [],
|
167 |
"source": [
|
prompt/prompt.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[{"id": "id_0", "prompt": "You are a proficient assistant tasked with summarizing medical dialogue between a doctor and a patient. Provide a careful and accurate summary based solely on the conversation. Each word is important, and missing any crucial information could have serious consequences. Use only the information from the conversation, and if something is unclear or cannot be accurately summarized, indicate it with \"N/A.\" Follow a step-by-step approach to ensure completeness .", "author": "Shunxi Wu", "metric": {"Rouge": 0.14, "winning_number": 10}}, {"id": "id_1", "prompt": "You are a proficient assistant that helps summarize medical dialogue after the communication between the doctor and the patient, Think step by step and strictly follow the form of the example provided, structure the summary into:\n1.CHIEF COMPLAINT:\n<leave blank row>\n<fill in> \n<leave blank row>\n2. HISTORY OF PRESENT ILLNESS: \n<leave blank row>\n<fill in> \n<leave blank row>\n3. MEDICAL HISTORY: \n<leave blank row>\n<fill in> \n<leave blank row>\n4. PHYSICAL EXAM: \n<leave blank row>\n<fill in> \n<leave blank row>\n5. RESULTS: \n<leave blank row>\n<fill in> \n<leave blank row>\n6. ASSESSMENT: \n<leave blank row>\n<fill in> \n<leave blank row>\n\nYou are autoregressive and carefully provide summarization based on the conversation. Since you are autoregressive, each token of the conversation should be considered important, and you cannot lose any important information. \nUse only the information from the conversation, and if something is unclear or cannot be accurately summarized, indicate it with \"\"N/A.\"\" Follow a step-by-step approach to ensure completeness and adhere strictly to the provided example format.", "author": "Shunxi Wu", "metric": {"Rouge": 0.14, "winning_number": 12}}, {"id": "id_2", "prompt": "Summarize this conversation. Tell me about the Patient's history, current condition, and treatment plan", "author": "Taru Mishra", "metric": {"Rouge": 0.15, "winning_number": 3}}, {"id": "id_3", "prompt": "Here is a dialogue:\nDR: You mentioned having a cough for 2 days and a\nfever since last night along with being short of breath.\nIs that correct?\nPT: yes , correct\nDR: I appreciate your concern for preventing spread. Do\nyou feel like you are unable to move around as usual?\nPT: I\u2019m definitely weaker and low energy the fever\nwent down to 99 this morning\nDR: Have you taken any medications or tried anything\nelse to help you with your symptoms?\nPT: lots of fluids and vitamin c. lozenges to minimize\ncoughing\nDR: do you have any medical conditions or have you\nbeen on any medications\nPT: no, none\nDR: alright. When you had a fever, did you take\nmedicine like tylenol to bring the fever down?\nPT: I didn\u2019t\nFirst, important details from the text are extracted. The important facts that the patient states are that they had a cough for 2 days, a fever since last night, shortness of breath, weaker and low energy, fever going down to 99, lots of fluid and vitamin c taken to minimize coughing, no medical conditions, and didn't take medicine like tylenol to bring the fever down.\nNext, they are synthesized into a summary with the important details directly copied word-for-word from the text. In this case, we copy \"\"cough for 2 days\"\", \"\"a fever since last night\"\", \"\"short of breath\"\", \"\"weaker and low energy\"\", \"\"fever went down to 99 this morning\"\", \"\"lots of fluids and vitamin c lozenges to minimize coughing\"\", and \"\"take medicine like tylenol to bring the fever down\"\". We add connecting words, and we arrive at the summary:\nThe patient mentioned having a cough for 2 days and a fever since last night with being short of breath. The patient is weaker and low energy, and their fever went down to 99 this morning. The patient took lots of fluids and vitamin c lozenges to minimize coughing. The patient does not have any medical conditions or medications. The patient didn't take medicine like tylenol to bring the fever down.\nHere is a dialogue, apply the same process but only output the summary:", "author": "Eric Chen", "metric": {"Rouge": 0.11, "winning_number": 8}}, {"id": "id_4", "prompt": "Here is a dialogue:\nDR: You mentioned having a cough for 2 days and a\nfever since last night along with being short of breath.\nIs that correct?\nPT: yes , correct\nDR: I appreciate your concern for preventing spread. Do\nyou feel like you are unable to move around as usual?\nPT: I\u2019m definitely weaker and low energy the fever\nwent down to 99 this morning\nDR: Have you taken any medications or tried anything\nelse to help you with your symptoms?\nPT: lots of fluids and vitamin c. lozenges to minimize\ncoughing\nDR: do you have any medical conditions or have you\nbeen on any medications\nPT: no, none\nDR: alright. When you had a fever, did you take\nmedicine like tylenol to bring the fever down?\nPT: I didn\u2019t\nDR: ok alright let me do a quick physical exam now with a thermometer, it seems like your temperature is 98 now\nPT: okay \nDR: it seems like your infection is going away, just make sure to keep resting\nPT: okay\nFirst, important details from the text are extracted. The important facts that the patient states are that they had a cough for 2 days, a fever since last night, shortness of breath, weaker and low energy, fever going down to 99, lots of fluid and vitamin c taken to minimize coughing, no medical conditions, and didn't take medicine like tylenol to bring the fever down.\nNext, they are synthesized into a summary with the important details directly copied word-for-word from the text. In this case, we copy \"\"cough for 2 days\"\", \"\"a fever since last night\"\", \"\"short of breath\"\", \"\"weaker and low energy\"\", \"\"fever went down to 99 this morning\"\", \"\"lots of fluids and vitamin c lozenges to minimize coughing\"\", \"\"take medicine like tylenol to bring the fever down\"\", \"\"thermometer\"\", \"\"temperature is 98 now\"\", \"\"infection is going away\"\", and \"\"make sure to keep resting\"\".\nThen, we sort these details into the categories that they are relevant to. There are five categories, CHIEF COMPLAINT, HISTORY OF PRESENT ILLNESS, PHYSICAL EXAM, RESULTS, and ASSESSMENT. Details are split if they belong to multiple categories. Sorted they are CHIEF COMPLAINT: cough, fever, HISTORY OF PRESENT ILLNESS: cough for 2 days, a fever since last night, short of breath, weaker and low energy, fever went to 99 this morning, lots of fluids and vitamin c lozenges to minimize coughing, didn't take tylenol to bring the fever down, PHYSICAL EXAM: thermometer, RESULTS: temperature is 98, ASSESSMENT: infection is going away, make sure to keep resting.\nFinally, we add connecting words, and add the relevant section headers and we arrive at the summary:\n\nCHIEF COMPLAINT\n\nThe patient has a cough and a fever.\n\nHISTORY OF PRESENT ILLNESS\n\nThe patient has had a cough for 2 days, a fever since last night, and is weaker, low energy, and short of breath. The patient's fever went down to 99 this morning. The patient has taken lots of fluids and vitamin c lozenges to minimize coughing. The patient didn't take tylenol to bring the fever down.\n\nPHYSICAL EXAM\n\nThe doctor used a thermometer to test the patient's temperature.\n\nRESULTS\n\nThe patient's temperature is 98 degrees.\n\nASSESSMENT\n\nThe patient's infection is going away and the patient needs to rest.\n\nHere is a dialogue, apply the same process but only output the summary:", "author": "Eric Chen", "metric": {"Rouge": 0.2, "winning_number": 13}}]
|
|
|
1 |
+
[{"id": "id_0", "prompt": "You are a proficient assistant tasked with summarizing medical dialogue between a doctor and a patient. Provide a careful and accurate summary based solely on the conversation. Each word is important, and missing any crucial information could have serious consequences. Use only the information from the conversation, and if something is unclear or cannot be accurately summarized, indicate it with \"N/A.\" Follow a step-by-step approach to ensure completeness .", "author": "Shunxi Wu", "metric": {"Rouge": 0.14, "winning_number": 10}, "url": "https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D2"}, {"id": "id_1", "prompt": "You are a proficient assistant that helps summarize medical dialogue after the communication between the doctor and the patient, Think step by step and strictly follow the form of the example provided, structure the summary into:\n1.CHIEF COMPLAINT:\n<leave blank row>\n<fill in> \n<leave blank row>\n2. HISTORY OF PRESENT ILLNESS: \n<leave blank row>\n<fill in> \n<leave blank row>\n3. MEDICAL HISTORY: \n<leave blank row>\n<fill in> \n<leave blank row>\n4. PHYSICAL EXAM: \n<leave blank row>\n<fill in> \n<leave blank row>\n5. RESULTS: \n<leave blank row>\n<fill in> \n<leave blank row>\n6. ASSESSMENT: \n<leave blank row>\n<fill in> \n<leave blank row>\n\nYou are autoregressive and carefully provide summarization based on the conversation. Since you are autoregressive, each token of the conversation should be considered important, and you cannot lose any important information. \nUse only the information from the conversation, and if something is unclear or cannot be accurately summarized, indicate it with \"\"N/A.\"\" Follow a step-by-step approach to ensure completeness and adhere strictly to the provided example format.", "author": "Shunxi Wu", "metric": {"Rouge": 0.14, "winning_number": 12}, "url": "https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D3"}, {"id": "id_2", "prompt": "Summarize this conversation. Tell me about the Patient's history, current condition, and treatment plan", "author": "Taru Mishra", "metric": {"Rouge": 0.15, "winning_number": 3}, "url": "https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D4"}, {"id": "id_3", "prompt": "Here is a dialogue:\nDR: You mentioned having a cough for 2 days and a\nfever since last night along with being short of breath.\nIs that correct?\nPT: yes , correct\nDR: I appreciate your concern for preventing spread. Do\nyou feel like you are unable to move around as usual?\nPT: I\u2019m definitely weaker and low energy the fever\nwent down to 99 this morning\nDR: Have you taken any medications or tried anything\nelse to help you with your symptoms?\nPT: lots of fluids and vitamin c. lozenges to minimize\ncoughing\nDR: do you have any medical conditions or have you\nbeen on any medications\nPT: no, none\nDR: alright. When you had a fever, did you take\nmedicine like tylenol to bring the fever down?\nPT: I didn\u2019t\nFirst, important details from the text are extracted. The important facts that the patient states are that they had a cough for 2 days, a fever since last night, shortness of breath, weaker and low energy, fever going down to 99, lots of fluid and vitamin c taken to minimize coughing, no medical conditions, and didn't take medicine like tylenol to bring the fever down.\nNext, they are synthesized into a summary with the important details directly copied word-for-word from the text. In this case, we copy \"\"cough for 2 days\"\", \"\"a fever since last night\"\", \"\"short of breath\"\", \"\"weaker and low energy\"\", \"\"fever went down to 99 this morning\"\", \"\"lots of fluids and vitamin c lozenges to minimize coughing\"\", and \"\"take medicine like tylenol to bring the fever down\"\". We add connecting words, and we arrive at the summary:\nThe patient mentioned having a cough for 2 days and a fever since last night with being short of breath. The patient is weaker and low energy, and their fever went down to 99 this morning. The patient took lots of fluids and vitamin c lozenges to minimize coughing. The patient does not have any medical conditions or medications. The patient didn't take medicine like tylenol to bring the fever down.\nHere is a dialogue, apply the same process but only output the summary:", "author": "Eric Chen", "metric": {"Rouge": 0.11, "winning_number": 8}, "url": "https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D5"}, {"id": "id_4", "prompt": "Here is a dialogue:\nDR: You mentioned having a cough for 2 days and a\nfever since last night along with being short of breath.\nIs that correct?\nPT: yes , correct\nDR: I appreciate your concern for preventing spread. Do\nyou feel like you are unable to move around as usual?\nPT: I\u2019m definitely weaker and low energy the fever\nwent down to 99 this morning\nDR: Have you taken any medications or tried anything\nelse to help you with your symptoms?\nPT: lots of fluids and vitamin c. lozenges to minimize\ncoughing\nDR: do you have any medical conditions or have you\nbeen on any medications\nPT: no, none\nDR: alright. When you had a fever, did you take\nmedicine like tylenol to bring the fever down?\nPT: I didn\u2019t\nDR: ok alright let me do a quick physical exam now with a thermometer, it seems like your temperature is 98 now\nPT: okay \nDR: it seems like your infection is going away, just make sure to keep resting\nPT: okay\nFirst, important details from the text are extracted. The important facts that the patient states are that they had a cough for 2 days, a fever since last night, shortness of breath, weaker and low energy, fever going down to 99, lots of fluid and vitamin c taken to minimize coughing, no medical conditions, and didn't take medicine like tylenol to bring the fever down.\nNext, they are synthesized into a summary with the important details directly copied word-for-word from the text. In this case, we copy \"\"cough for 2 days\"\", \"\"a fever since last night\"\", \"\"short of breath\"\", \"\"weaker and low energy\"\", \"\"fever went down to 99 this morning\"\", \"\"lots of fluids and vitamin c lozenges to minimize coughing\"\", \"\"take medicine like tylenol to bring the fever down\"\", \"\"thermometer\"\", \"\"temperature is 98 now\"\", \"\"infection is going away\"\", and \"\"make sure to keep resting\"\".\nThen, we sort these details into the categories that they are relevant to. There are five categories, CHIEF COMPLAINT, HISTORY OF PRESENT ILLNESS, PHYSICAL EXAM, RESULTS, and ASSESSMENT. Details are split if they belong to multiple categories. Sorted they are CHIEF COMPLAINT: cough, fever, HISTORY OF PRESENT ILLNESS: cough for 2 days, a fever since last night, short of breath, weaker and low energy, fever went to 99 this morning, lots of fluids and vitamin c lozenges to minimize coughing, didn't take tylenol to bring the fever down, PHYSICAL EXAM: thermometer, RESULTS: temperature is 98, ASSESSMENT: infection is going away, make sure to keep resting.\nFinally, we add connecting words, and add the relevant section headers and we arrive at the summary:\n\nCHIEF COMPLAINT\n\nThe patient has a cough and a fever.\n\nHISTORY OF PRESENT ILLNESS\n\nThe patient has had a cough for 2 days, a fever since last night, and is weaker, low energy, and short of breath. The patient's fever went down to 99 this morning. The patient has taken lots of fluids and vitamin c lozenges to minimize coughing. The patient didn't take tylenol to bring the fever down.\n\nPHYSICAL EXAM\n\nThe doctor used a thermometer to test the patient's temperature.\n\nRESULTS\n\nThe patient's temperature is 98 degrees.\n\nASSESSMENT\n\nThe patient's infection is going away and the patient needs to rest.\n\nHere is a dialogue, apply the same process but only output the summary:", "author": "Eric Chen", "metric": {"Rouge": 0.2, "winning_number": 13}, "url": "https://docs.google.com/spreadsheets/d/1ui9ccRkzeMWAiJiRgr2ClpYTAK4uFhX44aXi0WDJY8Q/edit?gid=1699794338#gid=1699794338&range=D6"}]
|