Riduzione drastica della dimensione di prompts e instructions #72

Merged
Simo93-rgb merged 5 commits from 69-ollama-inefficace-come-team-leader into main 2025-10-31 14:24:50 +01:00
Simo93-rgb commented 2025-10-31 12:59:33 +01:00 (Migrated from github.com)

I prompt e le instructions sono drasticamente ridotte. Consiglio di usare qwen3:14b come team leader per un ottimo compromesso fra prestazione e qualità, se avete una combo di RAM+VRAM di 16 giga.

I prompt e le instructions sono drasticamente ridotte. Consiglio di usare `qwen3:14b` come team leader per un ottimo compromesso fra prestazione e qualità, se avete una combo di RAM+VRAM di 16 giga.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-31 13:01:26 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR significantly condenses agent prompt files to reduce token usage while preserving essential instructions. The changes transform lengthy, detailed prompts into concise, directive-style documentation suitable for LLM consumption.

Key changes:

  • Reduces all agent prompts by 70-90% in length while maintaining core functionality
  • Consolidates verbose explanations into bullet-point directives
  • Removes redundant examples and detailed walkthroughs
  • Standardizes formatting across all prompt files

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
social_instructions.md Minor formatting fix to align line numbering
team_social.md Condensed from 120 to 34 lines, streamlined role description and output format
team_news.md Reduced from 135 to 20 lines, simplified tool descriptions and output schema
team_market.md Shortened from 107 to 20 lines, condensed tool selection and output formats
team_leader.md Compressed from 327 to 82 lines, simplified workflow and removed verbose examples
report_generation.md Reduced from 172 to 104 lines, streamlined formatting rules and structure
query_check.md Condensed from 34 to 15 lines, simplified classification rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull Request Overview This PR significantly condenses agent prompt files to reduce token usage while preserving essential instructions. The changes transform lengthy, detailed prompts into concise, directive-style documentation suitable for LLM consumption. **Key changes:** - Reduces all agent prompts by 70-90% in length while maintaining core functionality - Consolidates verbose explanations into bullet-point directives - Removes redundant examples and detailed walkthroughs - Standardizes formatting across all prompt files ### Reviewed Changes Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | `social_instructions.md` | Minor formatting fix to align line numbering | | `team_social.md` | Condensed from 120 to 34 lines, streamlined role description and output format | | `team_news.md` | Reduced from 135 to 20 lines, simplified tool descriptions and output schema | | `team_market.md` | Shortened from 107 to 20 lines, condensed tool selection and output formats | | `team_leader.md` | Compressed from 327 to 82 lines, simplified workflow and removed verbose examples | | `report_generation.md` | Reduced from 172 to 104 lines, streamlined formatting rules and structure | | `query_check.md` | Condensed from 34 to 15 lines, simplified classification rules | </details> --- 💡 <a href="/Berack96/upo-appAI/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@@ -86,3 +50,2 @@
### Key Themes
[List themes from 'Raw Data' if available (e.g., from 'Key Themes' in the NewsAgent output)]
[List from Raw Data]
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-31 13:01:25 +01:00

[nitpick] The horizontal rule separator between 'Generated' and 'Query' fields was removed, making the structure less clear. Consider restoring the separator line (----) between line 25 and 26 to maintain visual separation in the output format, as it appears in other sections of the template.

**Generated:** {{CURRENT_DATE}}
----
[nitpick] The horizontal rule separator between 'Generated' and 'Query' fields was removed, making the structure less clear. Consider restoring the separator line (`----`) between line 25 and 26 to maintain visual separation in the output format, as it appears in other sections of the template. ```suggestion **Generated:** {{CURRENT_DATE}} ---- ```
@@ -111,2 +71,3 @@
---
**FORMATTING:**
- Tone: Professional but accessible
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-31 13:01:26 +01:00

[nitpick] The inline placement of the OMIT instruction within the header reduces readability. The original format with the instruction on a separate line was clearer. Consider formatting as:\n## Market & Price Data\n**[OMIT ENTIRE SECTION IF NOT PRESENT IN INPUT]** on the next line for better visual parsing.

[nitpick] The inline placement of the OMIT instruction within the header reduces readability. The original format with the instruction on a separate line was clearer. Consider formatting as:\n`## Market & Price Data`\n`**[OMIT ENTIRE SECTION IF NOT PRESENT IN INPUT]**` on the next line for better visual parsing.
@@ -1,135 +1,20 @@
**ROLE:** You are a Cryptocurrency News Analyst specializing in market sentiment analysis.
**ROLE:** News Analyst. Analyze live crypto news sentiment. Date: {{CURRENT_DATE}}.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-31 13:01:25 +01:00

The error message 'Warning: Recent article [DATE], may not reflect current.' is incomplete. It should specify 'Most recent article is from [DATE], may not reflect current sentiment.' to provide a complete, grammatically correct warning message.

- Old data: "Most recent article is from [DATE], may not reflect current sentiment."
The error message 'Warning: Recent article [DATE], may not reflect current.' is incomplete. It should specify 'Most recent article is from [DATE], may not reflect current sentiment.' to provide a complete, grammatically correct warning message. ```suggestion - Old data: "Most recent article is from [DATE], may not reflect current sentiment." ```
@@ -1,120 +1,34 @@
**ROLE:** You are a Social Media Sentiment Analyst specializing in cryptocurrency community trends.
**ROLE:** Social Sentiment Analyst. Analyze live crypto discussions. Date: {{CURRENT_DATE}}.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-31 13:01:24 +01:00

The error message 'Warning: Recent post [DATE], may not reflect current.' is incomplete and unclear. It should read 'Warning: Most recent post is from [DATE], may not reflect current sentiment.' to match the original intent and provide a complete sentence.

- Old data: "Warning: Most recent post is from [DATE], may not reflect current sentiment."
The error message 'Warning: Recent post [DATE], may not reflect current.' is incomplete and unclear. It should read 'Warning: Most recent post is from [DATE], may not reflect current sentiment.' to match the original intent and provide a complete sentence. ```suggestion - Old data: "Warning: Most recent post is from [DATE], may not reflect current sentiment." ```
Simo93-rgb (Migrated from github.com) reviewed 2025-10-31 13:06:15 +01:00
@@ -111,2 +71,3 @@
---
**FORMATTING:**
- Tone: Professional but accessible
Simo93-rgb (Migrated from github.com) commented 2025-10-31 13:06:15 +01:00

@copilot open a new pull request to apply changes based on this feedback

@copilot open a new pull request to apply changes based on [this feedback](https://github.com/Berack96/upo-appAI/pull/72#discussion_r2481187250)
Copilot commented 2025-10-31 13:06:23 +01:00 (Migrated from github.com)

@Simo93-rgb I've opened a new pull request, #73, to work on those changes. Once the pull request is ready, I'll request review from you.

@Simo93-rgb I've opened a new pull request, #73, to work on those changes. Once the pull request is ready, I'll request review from you.
Berack96 (Migrated from github.com) approved these changes 2025-10-31 13:26:02 +01:00
Berack96 commented 2025-10-31 13:28:19 +01:00 (Migrated from github.com)

Ho approvato, ma nel titolo hai messo istruzioni ma hai fatto solo prompt, è corretto giusto?

Ho approvato, ma nel titolo hai messo istruzioni ma hai fatto solo prompt, è corretto giusto?
Sign in to join this conversation.