Make Gemini analysis responses concise and actionable
Add explicit formatting instructions to agent prompts requesting bullet-point output instead of verbose paragraphs. Update JSON schema descriptions for feedback and summary fields to enforce concise, outline-style format. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e094014dbe
commit
ec2fb82205
4 changed files with 23 additions and 4 deletions
|
|
@ -62,6 +62,13 @@ RAG Status Guidelines:
|
|||
- **Red**: Significant brand guideline violations that must be fixed before use
|
||||
|
||||
If the proof is nonsensical, not a marketing material, or cannot be analyzed, set analysisStatus to 'low_confidence'.
|
||||
|
||||
**Response Format:**
|
||||
- Keep feedback brief and scannable
|
||||
- Use bullet points for each finding
|
||||
- Each bullet should be one actionable sentence
|
||||
- Start with the issue, then the recommendation
|
||||
- Example: "Logo placement incorrect (bottom-left) - move to top-right corner per guidelines"
|
||||
"""
|
||||
|
||||
# Use single-image or multi-image analysis depending on input
|
||||
|
|
|
|||
|
|
@ -80,6 +80,13 @@ RAG Status Guidelines:
|
|||
- **Red**: Significant technical issues that will impact display or accessibility
|
||||
|
||||
If the proof is nonsensical, not a marketing material, or cannot be analyzed, set analysisStatus to 'low_confidence'.
|
||||
|
||||
**Response Format:**
|
||||
- Keep feedback brief and scannable
|
||||
- Use bullet points for each finding
|
||||
- Each bullet should be one actionable sentence
|
||||
- Start with the issue, then the recommendation
|
||||
- Example: "Logo placement incorrect (bottom-left) - move to top-right corner per guidelines"
|
||||
"""
|
||||
|
||||
# Use single-image or multi-image analysis depending on input
|
||||
|
|
|
|||
|
|
@ -68,7 +68,12 @@ Your summary should:
|
|||
- For an 'Analysis Error' verdict, explain that the proof could not be reliably processed and has been logged for human review. Advise the user to try again with a revised proof.
|
||||
- For a 'Failed' status, highlight the critical 'Red' issues that must be addressed.
|
||||
- For a 'Passed' status, mention any 'Amber' areas for consideration, if they exist, while maintaining an encouraging tone.
|
||||
- Be professional, clear, and constructive.
|
||||
|
||||
**Response Format:**
|
||||
- Start with a one-line verdict statement
|
||||
- List key issues as bullet points (max 3-5 bullets)
|
||||
- Each bullet: one sentence, actionable
|
||||
- For 'Passed': briefly note any amber items in 1-2 bullets
|
||||
|
||||
Here are the specialist reviews:
|
||||
{self._format_reviews(reviews)}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class GeminiService:
|
|||
},
|
||||
"feedback": {
|
||||
"type": "string",
|
||||
"description": "Constructive, professional feedback explaining the RAG status and highlighting both positive aspects and areas for improvement."
|
||||
"description": "Brief bullet-point feedback. Each bullet: one actionable sentence. Format: '• Issue: recommendation'. Max 5 bullets."
|
||||
},
|
||||
"issues": {
|
||||
"type": "array",
|
||||
|
|
@ -167,7 +167,7 @@ class GeminiService:
|
|||
},
|
||||
"feedback": {
|
||||
"type": "string",
|
||||
"description": "Constructive, professional feedback explaining the RAG status and highlighting both positive aspects and areas for improvement."
|
||||
"description": "Brief bullet-point feedback. Each bullet: one actionable sentence. Format: '• Issue: recommendation'. Max 5 bullets."
|
||||
},
|
||||
"issues": {
|
||||
"type": "array",
|
||||
|
|
@ -252,7 +252,7 @@ class GeminiService:
|
|||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "A concise, professional summary explaining the overall status, based on the specialist reviews."
|
||||
"description": "Brief summary: one-line verdict, then 3-5 bullet points listing key issues/recommendations."
|
||||
}
|
||||
},
|
||||
"required": ["overallStatus", "summary"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue