Add: Return outlier deals in analysis responses
Feature: - New parameter `include_outlier_deals` (default=True) in: - filter_deals_for_analysis() - calculate_deal_statistics() - get_valuation_comparables() MCP tool - get_deal_statistics() MCP tool Behavior: - When ON: response includes `outlier_deals` field with removed deals - LLM can see what was filtered out, answer questions about it - Maintains full transparency on outlier removal Terminology fixed: - "outlier_deals" = deals removed as outliers (clearer than "filtered_deals") - "filtered deals" = deals that PASSED filtering - Added to OutlierReport model All 311 tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,7 @@ class OutlierReport(BaseModel):
|
||||
outlier_indices: Indices of removed deals in original list
|
||||
method_used: Outlier detection method ("iqr", "percent", "none")
|
||||
parameters: Configuration parameters used for detection
|
||||
filtered_deals: The actual deals that were filtered out (optional)
|
||||
"""
|
||||
|
||||
total_deals: int = Field(..., description="Total deals before filtering")
|
||||
@@ -205,6 +206,9 @@ class OutlierReport(BaseModel):
|
||||
parameters: Dict[str, Any] = Field(
|
||||
default_factory=dict, description="Detection parameters used"
|
||||
)
|
||||
outlier_deals: Optional[List["Deal"]] = Field(
|
||||
None, description="Deals that were removed as outliers (if requested)"
|
||||
)
|
||||
|
||||
|
||||
class DealStatistics(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user