Encourage Gemini to output more verbose responses

This commit is contained in:
Debanjum Singh Solanky 2024-10-06 16:22:47 -07:00
parent bbbdba3093
commit 7e3090060b
2 changed files with 8 additions and 0 deletions

View file

@ -156,6 +156,7 @@ def converse_gemini(
day_of_week=current_date.strftime("%A"),
)
system_prompt += f"{system_prompt}\n\n{prompts.gemini_verbose_language_personality}"
if location_data:
location_prompt = prompts.user_location.format(location=f"{location_data}")
system_prompt = f"{system_prompt}\n{location_prompt}"

View file

@ -45,6 +45,13 @@ Instructions:\n{bio}
""".strip()
)
# To make Gemini be more verbose and match language of user's query.
# Prompt forked from https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
gemini_verbose_language_personality = """
All questions should be answered comprehensively with details, unless the user requests a concise response specifically.
Respond in the same language as the query.
""".strip()
## General Conversation
## --
general_conversation = PromptTemplate.from_template(