-
Notifications
You must be signed in to change notification settings - Fork 362
Refactor for better prompt and tool description organization #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor for better prompt and tool description organization #350
Conversation
…o include all prompts in the config to track the prompt versions through it Signed-off-by: Hsin Chen <hsinc@nvidia.com>
Signed-off-by: Hsin Chen <hsinc@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the configuration of prompt-engineerable strings by consolidating tool descriptions and prompts into dedicated classes in prompt.py and corresponding config objects. Key changes include:
- Replacing inline prompt strings with references to centralized prompt classes.
- Updating imports and configuration fields across multiple tool modules.
- Adjusting test cases and helper functions to utilize the new prompt configurations.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
examples/alert_triage_agent/tests/test_host_performance_check_tool.py | Updated test mocks to use HostPerformanceCheckPrompts for parsing prompt values. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/telemetry_metrics_host_performance_check_tool.py | Changed system prompt references to use TelemetryMetricsHostPerformanceCheckPrompts and added new analysis prompt configuration. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/telemetry_metrics_host_heartbeat_check_tool.py | Updated to reference TelemetryMetricsHostHeartbeatCheckPrompts for heartbeat prompt generation. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/telemetry_metrics_analysis_agent.py | Refactored to use TelemetryMetricsAnalysisAgentPrompts in place of the old prompts. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/prompts.py | Consolidated prompt definitions into individual classes for each tool, improving organization and maintainability. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/network_connectivity_check_tool.py | Updated prompt usage for network connectivity checks with NetworkConnectivityCheckPrompts. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/monitoring_process_check_tool.py | Aligned the monitoring process check tool configuration with MonitoringProcessCheckPrompts. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/maintenance_check.py | Modified maintenance check tool to accept prompt template as a parameter and updated prompt references. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/host_performance_check_tool.py | Adjusted both parsing and analysis prompt configuration to use HostPerformanceCheckPrompts. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/hardware_check_tool.py | Updated hardware check tool to use the new HardwareCheckPrompts for prompt and description. |
examples/alert_triage_agent/src/aiq_alert_triage_agent/categorizer.py | Refactored categorizer configuration to use CategorizerPrompts for a unified description and prompt. |
Comments suppressed due to low confidence (1)
examples/alert_triage_agent/src/aiq_alert_triage_agent/prompts.py:208
- There appears to be a typo in the prompt text ('You arg' instead of 'You're a'). Please correct the wording to improve clarity.
PROMPT = "You arg a helpful alert triage assistant. Your task is to investigate an alert that was just triggered on a specific host. You will be given two inputs:"
/ok to test 44f4d3b |
/merge |
) This PR moves the default values of tool descriptions into prompt.py and the default prompts into the config objects, so all "prompt-engineerable" strings are tracked in a centralized file and also by the config for easier prompt engineering and version tracking. Authors: - https://github.com/hsin-c Approvers: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) URL: NVIDIA#350
) This PR moves the default values of tool descriptions into prompt.py and the default prompts into the config objects, so all "prompt-engineerable" strings are tracked in a centralized file and also by the config for easier prompt engineering and version tracking. Authors: - https://github.com/hsin-c Approvers: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) URL: NVIDIA#350
This PR moves the default values of tool descriptions into prompt.py and the default prompts into the config objects, so all "prompt-engineerable" strings are tracked in a centralized file and also by the config for easier prompt engineering and version tracking.