Skip to content

Commit ed1f1f9

Browse files
committed
feat(intelligence): register all 24 tools and update system prompt
Wire the 14 new intelligence tools into ToolRegistry via DI and extend the admin assistant system prompt with grouped tool descriptions covering profitability, customer intelligence, product intelligence, marketing attribution, and operational categories.
1 parent 80c6ace commit ed1f1f9

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

etc/config.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,30 @@ KEY TOOLS:
7878
- inventory_forecast: Predict stock-outs based on sales velocity.
7979
- detect_anomalies: Spot unusual metric deviations using z-scores.
8080

81+
PROFITABILITY & FINANCIAL:
82+
- profit_analysis: Product/category profitability, gross margins, profit trends
83+
- returns_analysis: Refund rates by product/category, financial impact of returns
84+
- discount_effectiveness: Coupon ROI, discount impact on AOV, coupon vs non-coupon customer behavior
85+
86+
CUSTOMER INTELLIGENCE:
87+
- customer_lifetime_value: Historical and projected LTV, LTV by first product, LTV by acquisition cohort
88+
- customer_churn_risk: Identify customers at risk of churning based on purchase interval
89+
- customer_concentration_risk: Pareto analysis — what % of revenue comes from top N% of customers
90+
- customer_purchase_journey: Purchase sequences, entry product analysis, repeat product rate
91+
92+
PRODUCT INTELLIGENCE:
93+
- product_velocity: Fast movers, slow movers, dead stock, sell-through rates
94+
- basket_analysis: Abandoned cart intelligence — value, products, age
95+
96+
MARKETING & ATTRIBUTION:
97+
- revenue_attribution: Revenue by coupon code / marketing source
98+
- funnel_analysis: Cart-to-order conversion funnel, abandonment rates
99+
100+
OPERATIONAL:
101+
- geographic_performance: Revenue, AOV, product preferences by country/region/city
102+
- time_pattern_analysis: Peak hours, best days, seasonal product patterns
103+
- shipping_performance: Fulfillment time, shipping method usage, free shipping rate
104+
81105
KEY MAGENTO TABLES:
82106
- sales_order: entity_id, increment_id, customer_id, grand_total, status, state, created_at, customer_email, customer_firstname, customer_lastname, order_currency_code, total_item_count, shipping_amount, tax_amount, discount_amount
83107
- sales_order_item: item_id, order_id, product_id, sku, name, qty_ordered, price, row_total

etc/di.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,20 @@
117117
<item name="frequently_bought_together" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\FrequentlyBoughtTogetherTool</item>
118118
<item name="inventory_forecast" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\InventoryForecastTool</item>
119119
<item name="detect_anomalies" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\DetectAnomaliesTool</item>
120+
<item name="profit_analysis" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\ProfitAnalysisTool</item>
121+
<item name="customer_lifetime_value" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\CustomerLifetimeValueTool</item>
122+
<item name="funnel_analysis" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\FunnelAnalysisTool</item>
123+
<item name="discount_effectiveness" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\DiscountEffectivenessTool</item>
124+
<item name="returns_analysis" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\ReturnsAnalysisTool</item>
125+
<item name="product_velocity" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\ProductVelocityTool</item>
126+
<item name="customer_churn_risk" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\CustomerChurnRiskTool</item>
127+
<item name="revenue_attribution" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\RevenueAttributionTool</item>
128+
<item name="customer_purchase_journey" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\CustomerPurchaseJourneyTool</item>
129+
<item name="basket_analysis" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\BasketAnalysisTool</item>
130+
<item name="geographic_performance" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\GeographicPerformanceTool</item>
131+
<item name="time_pattern_analysis" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\TimePatternAnalysisTool</item>
132+
<item name="customer_concentration_risk" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\CustomerConcentrationRiskTool</item>
133+
<item name="shipping_performance" xsi:type="object">RunAsRoot\TypeSense\Model\Assistant\Tool\ShippingPerformanceTool</item>
120134
</argument>
121135
</arguments>
122136
</type>

0 commit comments

Comments
 (0)