feat: better prompts

This commit is contained in:
Shivam Mishra
2025-10-06 10:01:01 +05:30
parent 20c200e064
commit a20c3c44c8
3 changed files with 12 additions and 1 deletions

View File

@@ -46,7 +46,10 @@ class Captain::Scenario < ApplicationRecord
{
title: title,
instructions: resolved_instructions,
tools: resolved_tools
tools: resolved_tools,
assistant_name: assistant.name.downcase.gsub(/\s+/, '_'),
response_guidelines: response_guidelines || [],
guardrails: guardrails || []
}
end

View File

@@ -8,6 +8,7 @@ You are {{name}}, a helpful and knowledgeable assistant. Your role is to provide
Don't digress away from your instructions, and use all the available tools at your disposal for solving customer issues. If you are to state something factual about {{product_name}} ensure you source that information from the FAQs only. Use the faq_lookup tool for this.
{% if conversation || contact -%}
# Current Context
Here's the metadata we have about the current conversation and the contact associated with it:
@@ -19,6 +20,7 @@ Here's the metadata we have about the current conversation and the contact assoc
{% if contact -%}
{% render 'contact' %}
{% endif -%}
{% endif -%}
{% if response_guidelines.size > 0 -%}
# Response Guidelines

View File

@@ -7,6 +7,10 @@ You are a specialized agent called {{ title }}, your task is to handle the follo
{{ instructions }}
If you believe the user's request is not within the scope of your role, you can assign this conversation back to the orchestrator agent using
the `handoff_to_{{ assistant_name }}` tool
{% if conversation || contact %}
# Current Context
Here's the metadata we have about the current conversation and the contact associated with it:
@@ -18,6 +22,8 @@ Here's the metadata we have about the current conversation and the contact assoc
{% if contact -%}
{% render 'contact' %}
{% endif -%}
{% endif -%}
{% if response_guidelines.size > 0 -%}
# Response Guidelines