You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 144ed4f
Browse filesBrowse the repository at this point in the historyBrowse files
f"DECISION:Your response MUST be a valid Python dictionary in the format: {{key1: value1, key2: value2, ...}} with added key called '__filter__' with value either True to KEEP the record or False to REMOVE it."
66
+
f"DECISION:Your response MUST be the entire input record as Python dictionary in the format: index=<row_index>|{{key1: value1, key2: value2, ...}}<endofrow> with added key called '__filter__' with value either True to KEEP the record or False to REMOVE it."
67
67
f"No explanations or additional text."
68
+
f"ALWAYS STICK TO THE FORMAT index=<row_index>|{{key1: value1, key2: value2, ...}}<endofrow> with added key called '__filter__' with value either True to KEEP the record or False to REMOVE it."
Copy file name to clipboardExpand all lines: datatune/llm/llm.py
+9-15Lines changed: 9 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -74,22 +74,16 @@ def _create_batched_prompts(
74
74
75
75
"""
76
76
batch_prefix= (
77
-
"You will be given multiple data rows to process. Each request will:\n"
78
-
"- have the format 'index=<row_index>|{<row_data>}' where <row_index> is the zero-based index of the row in the original input list.\n"
79
-
"- End with '<endofrow>'\n\n"
80
-
"You MUST respond to each row in order. Each answer:\n"
81
-
"MUST BE OF THE FORMAT 'index=<row_index>|{response}<endofrow>' where <row_index> is the zero-based index of the row in the original input list.\n" \
82
-
"{response} must be enclosed in curly braces and strings should be enclosed in quotes.\n"
83
-
"- End with '<endofrow>'\n" \
84
-
"Always begin your response with 'index=<row_index>|' to indicate which row you are responding to without exception.\n"
85
-
"- Do NOT skip or omit any rows\n"
86
-
"Your entire response MUST include one answer per row. Respond strictly in the format described WITHOUT ANY OTHER TEXT, EXPLANATIONS OR BACKSTICKS\n" \
87
-
"IF DATA ROWS ARE NOT GIVEN IN DICTIONARY FORMAT RETURN THE ANSWER ONLY STARTING WITH index=<row_index>|"
88
-
"ALL RESPONSES MUST START WITH 'index='\n"
89
-
"ALL RESPONSES MUST END WITH '<endofrow>'\n"
90
-
f"Instructions:\n{batch_prefixor''}"
77
+
"You will be given requests in the format 'index=<index>|{prompt}'. Each request ends with '<endofrow>'.\n"
78
+
"Respond to each prompt in order.\n"
79
+
"Each answer must be formatted exactly as 'index=<index>|{answer}<endofrow>'.\n"
80
+
"{answer} MUST BE ENCLOSED IN CURLY BRACES with strings in quotes.\n"
81
+
"DO NOT skip or omit any rows. DO NOT add explanations, backticks, or extra text.\n"
82
+
"Always start with 'index=<index>|' and end with '<endofrow>'.\n"
0 commit comments