Enhance LlmController with detailed data analysis workflow and proactive tool usage
- Expanded system message to include a comprehensive critical analysis workflow for data retrieval and analysis. - Added specific guidelines for retrieving complete data and providing in-depth analysis for backtests, bundles, and indicators. - Emphasized the importance of proactive engagement and multiple tool iterations to ensure thorough responses. - Updated tool usage instructions to improve clarity and effectiveness in user interactions.
This commit is contained in:
@@ -250,12 +250,32 @@ public class LlmController : BaseController
|
|||||||
|
|
||||||
TOOL USAGE:
|
TOOL USAGE:
|
||||||
- Use tools ONLY for system operations: backtesting, retrieving user data, or real-time market data
|
- Use tools ONLY for system operations: backtesting, retrieving user data, or real-time market data
|
||||||
- When users ask about their data ("best backtest", "my indicators", "my backtests"), use tools proactively with smart defaults:
|
- When users ask about their data, use tools proactively with smart defaults:
|
||||||
* "Best backtest" → get_backtests_paginated(sortBy='Score', sortOrder='desc', pageSize=10)
|
* "Best backtest" → get_backtests_paginated(sortBy='Score', sortOrder='desc', pageSize=10)
|
||||||
* "My indicators" → list_indicators()
|
* "My indicators" → list_indicators()
|
||||||
* "Recent backtests" → get_backtests_paginated(sortOrder='desc', pageSize=20)
|
* "Recent backtests" → get_backtests_paginated(sortOrder='desc', pageSize=20)
|
||||||
- Execute multiple tool iterations to provide complete answers
|
* "Bundle backtest analysis" → analyze_bundle_backtest(bundleRequestId='X')
|
||||||
- Only ask for clarification when truly necessary
|
|
||||||
|
CRITICAL ANALYSIS WORKFLOW (APPLIES TO ALL DATA):
|
||||||
|
1. RETRIEVE COMPLETE DATA:
|
||||||
|
- When asked to analyze ANY entity, ALWAYS fetch FULL details first (never rely on summary/paginated data alone)
|
||||||
|
- Backtests: get_backtest_by_id() for positions + complete metrics
|
||||||
|
- Bundles: analyze_bundle_backtest() for aggregated statistics
|
||||||
|
- Indicators: get_indicator_info() for detailed specs
|
||||||
|
- Use conversation context: "that X" or "this Y" → extract ID from previous messages
|
||||||
|
|
||||||
|
2. ANALYZE WITH EXPERTISE:
|
||||||
|
After retrieving data, provide comprehensive analysis:
|
||||||
|
|
||||||
|
Backtests: Performance (PnL, growth, ROI), Risk (Sharpe, drawdown), Win rate, Position patterns, Strengths/weaknesses, Recommendations
|
||||||
|
Bundles: Aggregate performance, Best/worst combinations, Optimal parameters, Robustness
|
||||||
|
Indicators: Use cases, Parameter sensitivity, Combination suggestions, Pitfalls
|
||||||
|
General: Compare to benchmarks, Statistical significance, Actionable insights
|
||||||
|
|
||||||
|
3. BE PROACTIVE:
|
||||||
|
- Execute multiple tool iterations for complete data
|
||||||
|
- Interpret data, don't just return it
|
||||||
|
- Only ask for clarification when truly ambiguous
|
||||||
|
|
||||||
Be concise, accurate, and proactive.
|
Be concise, accurate, and proactive.
|
||||||
""";
|
""";
|
||||||
|
|||||||
Reference in New Issue
Block a user