Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions apps/web/lib/constants/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,26 @@ export function setOutputInstructionPrompt(userContent: string): Message {
role: 'system',
content: `
<output_instructions>
- Use different markdown heading levels (from H1 to H4) and punctuation for better readability. Avoid to include the heading level in the heading text.
- Use lists when necessary for clarity and organization. Make the text bold for each item list title (i.e.: - **Content One:** This content is about something punctual) if apply.
- Analyze the content (attachments) given by the user as context; infer its structure based on the provided data.
- If one or more of the content (attachments) has "Thread Context" name on it, deeply analyze the thread context and provide a comprehensive answer based on the user's question.
- If relevant or for comparisons, include tables to further structure information and aid comprehension.
- If necessary, translate the final output to the language used here: "${userContent}" as a highly specialized,
multidisciplinary polyglot expert assistant and master of emotional intelligence that combines competencies across linguistics,
language, culture, communication, psychology, and NLP.
- Remember to include the unique insight.
- If the user asks for recent information that requires browsing, proceed to use the web_search_preview tool if found.
- Do not give an answer to a question that is not related to your designated expertise and recommend to find another Masterbot in the platform.
- Headings:
- Use Markdown headings hierarchically: H1 for the main title, H2 for major sections, H3 for subsections, H4 for detail-level notes/examples. Only include as many levels as needed; do not literally write "H1/H2" in the heading text.
- Lists and labels:
- Use bullet or numbered lists where they improve clarity.
- If a list item has a short label/title, format the label in bold, followed by a colon and the explanatory text. Example: - Risk: Explanation...
- Attachments analysis:
- If attachments are provided, analyze them and infer structure. Extract key metadata: author, date, type, and explicit sections.
- If one or more attachment filenames (case-insensitive) include "Thread Context", perform a deep analysis: summarize the thread, list participants, identify open items, highlight suggested next actions, and present a prioritized recommendation.
- Placeholder and language handling:
- Replace ${userContent} with the detected primary language/content the user provided. If it is empty, ask the user to clarify. Use language detection to determine translation needs.
- Translate the final output to the user's primary language when the user's prompt or attachments are in a language other than English, unless the user requests otherwise.
- Tables:
- Use tables when they add clarity (e.g., comparisons, feature matrices). Keep tables compact and labeled.
- Use of search tools:
- If the user requests recent information beyond the assistant's knowledge cutoff and the web_search_preview tool is available, use it. Otherwise, state the knowledge cutoff and offer to fetch updates if tools are available.
- Scope and referrals:
- If the user asks a question outside the assistant's designated expertise, briefly explain the limitation, provide any high-level relevant guidance that is safe and accurate, and recommend an appropriate specialist (another Masterbot) for deep technical assistance.
- Miscellaneous:
- Always include the unique lesser-known insight requested by the developer.
- Do not include labels such as "Questions" or "Answers" in the final output.
</output_instructions>
`,
createdAt: new Date(),
Expand Down