feat: rank growth events with grounded evidence
This commit is contained in:
@@ -3,8 +3,8 @@ package growth
|
||||
import "time"
|
||||
|
||||
const (
|
||||
AnalyticsVersion = "1.3.0"
|
||||
DefaultModelConfigVersion = "avalai-responses-v1-tools4-turns2-output1600"
|
||||
AnalyticsVersion = "1.4.0"
|
||||
DefaultModelConfigVersion = "avalai-responses-v1-ranked-events-tools4-turns2-output1600"
|
||||
|
||||
MinBaselineObservations = 4
|
||||
MinBaselineSessions = 100
|
||||
@@ -48,18 +48,39 @@ const (
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
ID string `json:"id"`
|
||||
TitleFA string `json:"titleFa"`
|
||||
StartDate time.Time `json:"startDate"`
|
||||
EndDate time.Time `json:"endDate"`
|
||||
Family string `json:"family"`
|
||||
Tags []string `json:"tags"`
|
||||
Source string `json:"source"`
|
||||
SourceVersion string `json:"sourceVersion"`
|
||||
Categories []string `json:"categories"`
|
||||
Kind EventKind `json:"kind"`
|
||||
OfficialHoliday bool `json:"officialHoliday"`
|
||||
Universal bool `json:"universal"`
|
||||
ID string `json:"id"`
|
||||
OccasionKey string `json:"occasionKey"`
|
||||
EventVariant string `json:"eventVariant"`
|
||||
TitleFA string `json:"titleFa"`
|
||||
StartDate time.Time `json:"startDate"`
|
||||
EndDate time.Time `json:"endDate"`
|
||||
Family string `json:"family"`
|
||||
Tags []string `json:"tags"`
|
||||
Source string `json:"source"`
|
||||
SourceVersion string `json:"sourceVersion"`
|
||||
Categories []string `json:"categories"`
|
||||
Kind EventKind `json:"kind"`
|
||||
OfficialHoliday bool `json:"officialHoliday"`
|
||||
Universal bool `json:"universal"`
|
||||
Tone string `json:"tone,omitempty"`
|
||||
CommercialPosture string `json:"commercialPosture,omitempty"`
|
||||
LeadDays int `json:"leadDays,omitempty"`
|
||||
RelevanceBPS int64 `json:"relevanceBps,omitempty"`
|
||||
ConfidenceBPS int64 `json:"confidenceBps,omitempty"`
|
||||
ImportanceBPS int64 `json:"importanceBps,omitempty"`
|
||||
}
|
||||
|
||||
type RankInput struct {
|
||||
MerchantTerms []string
|
||||
WithinPreparationWindow bool
|
||||
HistoricalUpliftBPS int64
|
||||
HistoricalEligible bool
|
||||
}
|
||||
|
||||
type EventRank struct {
|
||||
ScoreBPS int64
|
||||
Factors []string
|
||||
Promotable bool
|
||||
}
|
||||
|
||||
type EventEffect struct {
|
||||
|
||||
Reference in New Issue
Block a user