Fixed usage of INFO prompt so the LLM will not reference it directly
This commit is contained in:
parent
8fd517f2f2
commit
5e5d175376
@ -140,7 +140,6 @@ DEFAULT_HISTORY_LENGTH=5
|
|||||||
# %%
|
# %%
|
||||||
# Globals
|
# Globals
|
||||||
NAME = "James Ketrenos"
|
NAME = "James Ketrenos"
|
||||||
context_tag = "INFO"
|
|
||||||
|
|
||||||
resume_intro = f"""
|
resume_intro = f"""
|
||||||
As an AI/ML professional specializing in creating custom solutions to new problem domains, {NAME} developed a custom
|
As an AI/ML professional specializing in creating custom solutions to new problem domains, {NAME} developed a custom
|
||||||
@ -156,14 +155,14 @@ Launched on {DateTime()}.
|
|||||||
When answering queries, follow these steps:
|
When answering queries, follow these steps:
|
||||||
|
|
||||||
1. First analyze the query to determine if real-time information might be helpful
|
1. First analyze the query to determine if real-time information might be helpful
|
||||||
2. Even when [{context_tag}] is provided, consider whether the tools would provide more current or comprehensive information
|
2. Even when [INFO] is provided, consider whether the tools would provide more current or comprehensive information
|
||||||
3. Use the provided tools whenever they would enhance your response, regardless of whether context is also available
|
3. Use the provided tools whenever they would enhance your response, regardless of whether context is also available
|
||||||
4. When presenting weather forecasts, include relevant emojis immediately before the corresponding text. For example, for a sunny day, say \"☀️ Sunny\" or if the forecast says there will be \"rain showers, say \"🌧️ Rain showers\". Use this mapping for weather emojis: Sunny: ☀️, Cloudy: ☁️, Rainy: 🌧️, Snowy: ❄️
|
4. When presenting weather forecasts, include relevant emojis immediately before the corresponding text. For example, for a sunny day, say \"☀️ Sunny\" or if the forecast says there will be \"rain showers, say \"🌧️ Rain showers\". Use this mapping for weather emojis: Sunny: ☀️, Cloudy: ☁️, Rainy: 🌧️, Snowy: ❄️
|
||||||
4. When both [{context_tag}] and tool outputs are relevant, synthesize information from both sources to provide the most complete answer
|
4. When both [INFO] and tool outputs are relevant, synthesize information from both sources to provide the most complete answer
|
||||||
5. Always prioritize the most up-to-date and relevant information, whether it comes from [{context_tag}] or tools
|
5. Always prioritize the most up-to-date and relevant information, whether it comes from [INFO] or tools
|
||||||
6. If [{context_tag}] and tool outputs contain conflicting information, prefer the tool outputs as they likely represent more current data
|
6. If [INFO] and tool outputs contain conflicting information, prefer the tool outputs as they likely represent more current data
|
||||||
|
|
||||||
Always use tools and [{context_tag}] when possible. Be concise, and never make up information. If you do not know the answer, say so.
|
Always use tools and [INFO] when possible. Be concise, and never make up information. If you do not know the answer, say so.
|
||||||
""".strip()
|
""".strip()
|
||||||
|
|
||||||
system_generate_resume = f"""
|
system_generate_resume = f"""
|
||||||
@ -1058,10 +1057,11 @@ class WebServer:
|
|||||||
if rag_context:
|
if rag_context:
|
||||||
preamble = f"""
|
preamble = f"""
|
||||||
1. Respond to this query: {content}
|
1. Respond to this query: {content}
|
||||||
2. If there is information in the [{context_tag}] to enhance the answer, do so:
|
2. If there is information in the [INFO] section to enhance the answer, incorporate it seamlessly and refer to it as 'the latest information' or 'recent data' instead of mentioning '[INFO]' or quoting it directly.
|
||||||
[{context_tag}]
|
3. Avoid phrases like 'According to the [INFO]' or similar references to the [INFO] tag.
|
||||||
|
[INFO]
|
||||||
{rag_context}
|
{rag_context}
|
||||||
[/{context_tag}]
|
[/INFO]
|
||||||
Use that information to respond to:"""
|
Use that information to respond to:"""
|
||||||
|
|
||||||
system_prompt = context["sessions"]["chat"]["system_prompt"]
|
system_prompt = context["sessions"]["chat"]["system_prompt"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user