# MVP Configuration File
model:
  model_name_or_path: "/home/ubuntu/codebase/yexijia/保研/LlamaFactory/models/qwen2.5-7b"
  adapter_name_or_path: null  # 如果有微调模型，设置路径，如: "./saves/qwen2.5-7b/lora/sft/checkpoint-20"
  template: "qwen"
  finetuning_type: "lora"  # 如果使用适配器，设置为 "lora" 或 "none"
  trust_remote_code: true

inference:
  device: "cuda"  # 或 "cpu"
  temperature: 0.7
  max_new_tokens: 512
  top_p: 0.9
  do_sample: true
  use_fp16: true

mining:
  default_min_participation: 0.6
  default_max_pattern_size: 5
  default_priority: "confidence"

data:
  data_path: "./data/beijing_poi.json"

logging:
  level: "INFO"
  log_file: "./logs/mvp.log"

# Stage0: Intent-Aware Preference Initialization Configuration
# Stage0 使用 LLM 理解用户意图，生成初始偏好向量，解决冷启动问题
stage0:
  enabled: true                    # Enable Stage0 intent understanding
  decay_lambda: 0.05               # Decay parameter for intent vector weight (α_t = e^(-λt))
                                   # 值越小，意图向量的权重衰减越慢
  min_confidence: 0.6              # Minimum confidence for intent understanding
                                   # 意图理解的最小置信度阈值

# Stage3: User Preference Learning Configuration
# Stage3 基于用户反馈进行对比学习，实现个性化推荐
stage3:
  enabled: true                    # Enable Stage3 preference learning
  use_contrastive: true            # Use contrastive learning (requires PyTorch)
                                   # 是否使用对比学习（需要安装 PyTorch）
  retrain_interval: 20             # Retrain after N feedback sessions
                                   # 每收集 N 个反馈后重新训练（当前已改为手动训练）
  margin: 0.3                      # Margin for triplet loss
                                   # Triplet Loss 的边距参数
  learning_rate: 0.001             # Learning rate for training
                                   # 训练时的学习率
  hidden_dim: 256                  # Hidden dimension for PreferenceEncoder
                                   # 偏好编码器的隐藏层维度
  epochs: 10                       # Training epochs per retrain
                                   # 每次训练的轮数
  batch_size: 32                   # Batch size for training
                                   # 训练时的批次大小
  alpha: 0.7                       # Weight for preference score (vs confidence)
                                   # 偏好分数在最终评分中的权重（0-1之间）
                                   # alpha * similarity + (1-alpha) * confidence
  use_cosine_loss: true            # Use cosine-based triplet loss
                                   # 是否使用基于余弦相似度的 Triplet Loss
  model_save_path: "./models/preference_encoder.pth"  # Path to save trained model
                                   # 训练好的模型保存路径
  user_id: "user_001"              # Default user identifier
                                   # 默认用户标识符（支持多用户）

# Stage4: Iterative Interaction Engine Configuration
# Stage4 多轮交互式偏好进化机制，从单轮查询系统升级为多轮协同决策系统
stage4:
  enabled: true                    # Enable Stage4 iterative interaction
                                   # 是否启用 Stage4 迭代交互模式
  default_rounds: 3                # Default number of iteration rounds
                                   # 默认迭代轮数
  max_rounds: 5                    # Maximum number of iteration rounds
                                   # 最大迭代轮数
  fusion_alpha: 0.6                # Weight for LLM intent vs feedback fusion (α)
                                   # LLM 意图向量与反馈向量的融合权重（0-1之间）
                                   # u_t = α * u_llm + (1-α) * u_feedback
