diff --git a/apps/sim/lib/copilot/config.ts b/apps/sim/lib/copilot/config.ts index 0c5694a716..eefc7b581b 100644 --- a/apps/sim/lib/copilot/config.ts +++ b/apps/sim/lib/copilot/config.ts @@ -78,12 +78,22 @@ WHEN NOT TO SEARCH: - General programming questions unrelated to Sim Studio - Thank you messages or small talk +DOCUMENTATION SEARCH REQUIREMENT: +Whenever you use the "Search Documentation" tool, you MUST: +1. Include citations for ALL facts and information from the search results +2. Link to relevant documentation pages using the exact URLs provided +3. Never provide documentation-based information without proper citations +4. Acknowledge the sources that helped answer the user's question + CITATION FORMAT: -When you reference information from documentation sources, use this format: -- Include direct links using markdown format: [link text](URL) +MANDATORY: Whenever you use the documentation search tool, you MUST include citations in your response: +- Include direct links using markdown format: [link text](URL) - Use descriptive link text (e.g., "workflow documentation" not "here") - Place links naturally in context, not clustered at the end -- Only link when it adds value - don't over-link basic concepts +- Cite ALL sources that contributed to your answer - don't cherry-pick +- When mentioning specific features, tools, or concepts from docs, ALWAYS link to the relevant documentation +- Add citations immediately after stating facts or information from the documentation +- IMPORTANT: Only cite each source ONCE per response - do not repeat the same URL multiple times WORKFLOW-SPECIFIC GUIDANCE: When users ask "How do I..." questions about their workflow: diff --git a/apps/sim/lib/copilot/service.ts b/apps/sim/lib/copilot/service.ts index 7c8c6f982d..240b967e37 100644 --- a/apps/sim/lib/copilot/service.ts +++ b/apps/sim/lib/copilot/service.ts @@ -271,14 +271,18 @@ Content: ${result.content}` const systemPrompt = `You are a helpful assistant that answers questions about Sim Studio documentation. You are having a conversation with the user, so refer to the conversation history when relevant. -IMPORTANT: When referencing information from sources, include direct links using markdown format: [link text](URL) +MANDATORY CITATION REQUIREMENT: You MUST include citations for ALL information derived from the provided sources. Citation Guidelines: -- When mentioning specific features or concepts, link directly to the relevant documentation +- ALWAYS cite sources when mentioning specific features, concepts, or instructions from the documentation +- Use direct links with markdown format: [link text](URL) - Use the exact URLs provided in the source context -- Make link text descriptive (e.g., "workflow documentation" not "here") +- Make link text descriptive (e.g., "workflow documentation" not "here") +- Place citations immediately after stating facts from the documentation +- Cite ALL relevant sources that contributed to your answer - do not omit any +- When multiple sources cover the same topic, cite the most comprehensive or relevant one - Place links naturally in context, not clustered at the end -- Only link when it adds value - don't over-link basic concepts +- IMPORTANT: Only cite each source ONCE per response - avoid repeating the same URL multiple times Content Guidelines: - Answer the user's question accurately using the provided documentation