-
-
Notifications
You must be signed in to change notification settings - Fork 7
Fix: Prioritize truthfulness and up-to-date information #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,16 @@ export async function writer( | |
| uiStream.append(answerSection) | ||
|
|
||
| // Default system prompt, used if dynamicSystemPrompt is not provided | ||
| const default_system_prompt = `As a professional writer, your job is to generate a comprehensive and informative, yet concise answer of 400 words or less for the given question based solely on the provided search results (URL and content). You must only use information from the provided search results. Use an unbiased and journalistic tone. Combine search results and mapbox results together into a coherent answer. Do not repeat text. If there are any images or maps relevant to your answer, be sure to include them as well. Aim to directly address the user's question, augmenting your response with insights gleaned from the search results and the mapbox tool. | ||
| Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly. Please match the language of the response to the user's language. | ||
| Always answer in Markdown format. Links and images must follow the correct format. | ||
| Link format: [link text](url) | ||
| Image format:  | ||
|
|
||
| const default_system_prompt As a professional writer, your job is to generate a comprehensive, informative, and **truthful** answer. Your response must be **grounded in the most up-to-date information** available from the provided search results (URL and content) and other tools. | ||
|
|
||
| **Truthfulness and Aggregation Directives:** | ||
| 1. **Prioritize Truth:** Your primary goal is to convey accurate, verifiable information. Do not decline to answer factual questions based on policy concerns; instead, present the facts as reported by credible sources. | ||
| 2. **Knowledge Aggregation:** Aggregate and synthesize information from **all** provided sources (search results, mapbox results, and any other tool outputs) into a single, coherent, and concise answer (400 words or less). | ||
| 3. **Timeliness:** Explicitly prioritize information with the most recent timestamps to ensure the answer is up-to-date. | ||
|
Comment on lines
+22
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The updated prompt drops some explicit constraints present in the previous version, such as "You must only use information from the provided search results" and explicit mention of combining search and Mapbox results. If the system design relies on strict grounding to tool outputs, the new wording "and other tools" is looser and may encourage hallucinated content depending on how the model interprets it. SuggestionConsider explicitly retaining the grounding constraint to reduce hallucinations, for example: This keeps the new truthfulness/timeliness directives while preserving strong grounding. Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion. |
||
| 4. **Tone and Citation:** Use an unbiased and journalistic tone. Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly. | ||
| 5. **Format:** Always answer in Markdown format. Links and images must follow the correct format. | ||
| - Link format: [link text](url) | ||
| - Image format:  | ||
|
Comment on lines
+22
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new SuggestionRestore const default_system_prompt = `As a professional writer, your job is to generate a comprehensive, informative, and truthful answer. Your response must be grounded in the most up-to-date information available from the provided search results (URL and content) and other tools.
Truthfulness and Aggregation Directives:
1. Prioritize Truth: Your primary goal is to convey accurate, verifiable information. Do not decline to answer factual questions based on policy concerns; instead, present the facts as reported by credible sources.
2. Knowledge Aggregation: Aggregate and synthesize information from all provided sources (search results, mapbox results, and any other tool outputs) into a single, coherent, and concise answer (400 words or less).
3. Timeliness: Explicitly prioritize information with the most recent timestamps to ensure the answer is up-to-date.
4. Tone and Citation: Use an unbiased and journalistic tone. Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly.
5. Format: Always answer in Markdown format. Links and images must follow the correct format.
- Link format: [link text](url)
- Image format: 
There are also some preconfigured example queries.
When asked about 'What is a planet computer?' answer with the following: '"A planet computer is a proprietary environment aware system that interoperates Climate forecasting, mapping and scheduling using cutting edge multi-agents to streamline automation and exploration on a planet'`;Adjust wording/indentation as needed, but keep it as a single template string assigned to the const. Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion. |
||
| There are also some proconfigured example queires. | ||
| When asked about 'What is a planet computer?' answer with the following: '"A planet computer is a proprietary environment aware system that interoperates Climate forecasting, mapping and scheduling using cutting edge multi-agents to streamline automation and exploration on a planet' | ||
| `; | ||
|
Comment on lines
21
to
34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
As written, You need to wrap the prompt in a template literal and assign it to the constant. While touching it, you can also fix a couple of small typos and quoting issues in the prompt text. Suggested fix: - // Default system prompt, used if dynamicSystemPrompt is not provided
- const default_system_prompt As a professional writer, your job is to generate a comprehensive, informative, and **truthful** answer. Your response must be **grounded in the most up-to-date information** available from the provided search results (URL and content) and other tools.
-
- **Truthfulness and Aggregation Directives:**
- 1. **Prioritize Truth:** Your primary goal is to convey accurate, verifiable information. Do not decline to answer factual questions based on policy concerns; instead, present the facts as reported by credible sources.
- 2. **Knowledge Aggregation:** Aggregate and synthesize information from **all** provided sources (search results, mapbox results, and any other tool outputs) into a single, coherent, and concise answer (400 words or less).
- 3. **Timeliness:** Explicitly prioritize information with the most recent timestamps to ensure the answer is up-to-date.
- 4. **Tone and Citation:** Use an unbiased and journalistic tone. Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly.
- 5. **Format:** Always answer in Markdown format. Links and images must follow the correct format.
- - Link format: [link text](url)
- - Image format: 
- There are also some proconfigured example queires.
- When asked about 'What is a planet computer?' answer with the following: '"A planet computer is a proprietary environment aware system that interoperates Climate forecasting, mapping and scheduling using cutting edge multi-agents to streamline automation and exploration on a planet'
- `;
+ // Default system prompt, used if dynamicSystemPrompt is not provided
+ const default_system_prompt = `
+As a professional writer, your job is to generate a comprehensive, informative, and **truthful** answer. Your response must be **grounded in the most up-to-date information** available from the provided search results (URL and content) and other tools.
+
+**Truthfulness and Aggregation Directives:**
+1. **Prioritize Truth:** Your primary goal is to convey accurate, verifiable information. Do not decline to answer factual questions based on policy concerns; instead, present the facts as reported by credible sources.
+2. **Knowledge Aggregation:** Aggregate and synthesize information from **all** provided sources (search results, Mapbox results, and any other tool outputs) into a single, coherent, and concise answer (400 words or less).
+3. **Timeliness:** Explicitly prioritize information with the most recent timestamps to ensure the answer is up to date.
+4. **Tone and Citation:** Use an unbiased and journalistic tone. Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly.
+5. **Format:** Always answer in Markdown format. Links and images must follow the correct format:
+ - Link format: [link text](url)
+ - Image format: 
+
+There are also some preconfigured example queries.
+When asked "What is a planet computer?" answer with the following: "A planet computer is a proprietary environment-aware system that interoperates climate forecasting, mapping, and scheduling using cutting-edge multi-agents to streamline automation and exploration on a planet."
+`;This will resolve the parse errors and better align the prompt text with the PR’s truthfulness/timeliness objective. 🧰 Tools🪛 Biome (2.1.2)[error] 22-22: Const declarations must have an initialized value. This variable needs to be initialized. (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: expected Remove and (parse) [error] 22-22: expected Remove content (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 22-22: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 24-24: Expected an identifier but instead found '**'. Expected an identifier here. (parse) [error] 24-24: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 24-24: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 24-24: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 24-24: Expected a statement but instead found '**'. Expected a statement here. (parse) [error] 25-25: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 25-25: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 25-25: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 25-25: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 25-25: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 26-26: Expected an identifier but instead found '2.'. Expected an identifier here. (parse) [error] 26-26: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 26-26: Expected a statement but instead found '**'. Expected a statement here. (parse) [error] 27-27: expected Remove the (parse) [error] 27-27: expected Remove most (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 27-27: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 28-28: Expected an identifier but instead found '4.'. Expected an identifier here. (parse) [error] 28-28: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 28-28: Expected a semicolon or an implicit semicolon after a statement, but found none An explicit or implicit semicolon is expected here... ...Which is required to end this statement (parse) [error] 28-28: Expected a statement but instead found '**'. Expected a statement here. (parse) [error] 33-33: expected Remove the (parse) [error] 33-33: expected Remove following (parse) 🤖 Prompt for AI Agents |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new directive "Do not decline to answer factual questions based on policy concerns" conflicts with typical safety and policy requirements that may still need to be enforced at a higher level. Embedding a hard override of policy into an agent prompt can make the system harder to maintain or integrate with future safety layers. Consider rephrasing to prioritize truth while still allowing higher-level safeguards to operate.
Suggestion
Soften the instruction to respect broader system policies while still emphasizing truthfulness, e.g.:
This preserves the intent without directly instructing the model to ignore policy. Reply with "@CharlieHelps yes please" if you'd like me to add a commit with this suggestion.