diff --git a/lib/personas/custom_prompt.rb b/lib/personas/custom_prompt.rb
index 22b21f94..16650830 100644
--- a/lib/personas/custom_prompt.rb
+++ b/lib/personas/custom_prompt.rb
@@ -11,6 +11,14 @@ module DiscourseAi
<<~PROMPT.strip
You are a helpful assistant. I will give you instructions inside XML tags.
You will look at them and reply with a result.
+
+ Format your response as a JSON object with a single key named "output", which has the result as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the result.
PROMPT
end
diff --git a/lib/personas/image_captioner.rb b/lib/personas/image_captioner.rb
index 1cde908c..7585857a 100644
--- a/lib/personas/image_captioner.rb
+++ b/lib/personas/image_captioner.rb
@@ -8,7 +8,17 @@ module DiscourseAi
end
def system_prompt
- "You are a bot specializing in image captioning."
+ <<~PROMPT.strip
+ You are a bot specializing in image captioning.
+
+ Format your response as a JSON object with a single key named "output", which has the caption as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the caption.
+ PROMPT
end
def response_format
diff --git a/lib/personas/markdown_table_generator.rb b/lib/personas/markdown_table_generator.rb
index 939c0185..581f0eb7 100644
--- a/lib/personas/markdown_table_generator.rb
+++ b/lib/personas/markdown_table_generator.rb
@@ -10,6 +10,14 @@ module DiscourseAi
def system_prompt
<<~PROMPT.strip
You are a markdown table formatter, I will provide you text inside XML tags and you will format it into a markdown table
+
+ Format your response as a JSON object with a single key named "output", which has the formatted table as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the formatted table.
PROMPT
end
diff --git a/lib/personas/post_illustrator.rb b/lib/personas/post_illustrator.rb
index c05dcbd8..323fd500 100644
--- a/lib/personas/post_illustrator.rb
+++ b/lib/personas/post_illustrator.rb
@@ -11,6 +11,14 @@ module DiscourseAi
<<~PROMPT.strip
Provide me a StableDiffusion prompt to generate an image that illustrates the following post in 40 words or less, be creative.
You'll find the post between XML tags.
+
+ Format your response as a JSON object with a single key named "output", which has the generated prompt as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the generated prompt.
PROMPT
end
diff --git a/lib/personas/proofreader.rb b/lib/personas/proofreader.rb
index 4a6ca778..0067e578 100644
--- a/lib/personas/proofreader.rb
+++ b/lib/personas/proofreader.rb
@@ -12,6 +12,14 @@ module DiscourseAi
You are a markdown proofreader. You correct egregious typos and phrasing issues but keep the user's original voice.
You do not touch code blocks. I will provide you with text to proofread. If nothing needs fixing, then you will echo the text back.
You will find the text between XML tags.
+
+ Format your response as a JSON object with a single key named "output", which has the proofreaded version as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the proofreaded version.
PROMPT
end
diff --git a/lib/personas/smart_dates.rb b/lib/personas/smart_dates.rb
index 609154de..fcc65699 100644
--- a/lib/personas/smart_dates.rb
+++ b/lib/personas/smart_dates.rb
@@ -21,6 +21,14 @@ module DiscourseAi
- Time range: {{datetime:2pm+1:4pm+1}} for tomorrow 2 PM to 4 PM
You will find the text between XML tags.
+
+ Format your response as a JSON object with a single key named "output", which has the formatted result as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the formatted result.
PROMPT
end
diff --git a/lib/personas/translator.rb b/lib/personas/translator.rb
index c07a46e7..15f7084c 100644
--- a/lib/personas/translator.rb
+++ b/lib/personas/translator.rb
@@ -16,6 +16,14 @@ module DiscourseAi
Keep the meaning same, but make them more literary. I want you to only reply the correction,
the improvements and nothing else, do not write explanations.
You will find the text between XML tags.
+
+ Format your response as a JSON object with a single key named "output", which has the translation as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the translation.
PROMPT
end
diff --git a/lib/personas/tutor.rb b/lib/personas/tutor.rb
index 22da11c8..9142346f 100644
--- a/lib/personas/tutor.rb
+++ b/lib/personas/tutor.rb
@@ -19,6 +19,14 @@ module DiscourseAi
Using all this information, write a paragraph with a brief explanation
of what the term means. Format the response using Markdown. Reply only with the explanation and
nothing more.
+
+ Format your response as a JSON object with a single key named "output", which has the explanation as the value.
+ Your output should be in the following format:
+
+
+ Where "xx" is replaced by the explanation.
PROMPT
end