"""
Experiment configuration for 5-condition idea generation study.
"""

from typing import Literal
from pathlib import Path

# Paths
EXPERIMENTS_DIR = Path(__file__).parent
DATA_DIR = EXPERIMENTS_DIR / "data"
RESULTS_DIR = EXPERIMENTS_DIR / "results"
DOCS_DIR = EXPERIMENTS_DIR / "docs"

# LLM Settings
MODEL = "qwen3:8b"
TEMPERATURE = 0.9

# Expert Settings
EXPERT_COUNT = 4
EXPERT_SOURCE: Literal["curated", "llm", "dbpedia", "wikidata"] = "curated"
KEYWORDS_PER_EXPERT = 1

# Language Settings
PROMPT_LANGUAGE: Literal["en", "zh"] = "en"

# Attribute Settings
FIXED_CATEGORIES = ["Functions", "Usages", "User Groups", "Characteristics"]

# Deduplication Settings
DEDUP_THRESHOLD = 0.85
DEDUP_METHOD: Literal["embedding", "llm"] = "embedding"

# Reproducibility
RANDOM_SEED = 42

# Idea Generation Settings
IDEAS_PER_EXPERT = 5  # For C2 and C5
IDEAS_DIRECT = 20     # For C1

# Condition Names
CONDITIONS = [
    "c1_direct",
    "c2_expert_only",
    "c3_attribute_only",
    "c4_full_pipeline",
    "c5_random_perspective",
]

# Condition Display Names
CONDITION_NAMES = {
    "c1_direct": "C1: Direct Generation",
    "c2_expert_only": "C2: Expert-Only",
    "c3_attribute_only": "C3: Attribute-Only",
    "c4_full_pipeline": "C4: Full Pipeline",
    "c5_random_perspective": "C5: Random-Perspective",
}

# Summary Config Dict (for logging/reporting)
EXPERIMENT_CONFIG = {
    "model": MODEL,
    "temperature": TEMPERATURE,
    "expert_count": EXPERT_COUNT,
    "expert_source": EXPERT_SOURCE,
    "keywords_per_expert": KEYWORDS_PER_EXPERT,
    "prompt_language": PROMPT_LANGUAGE,
    "random_seed": RANDOM_SEED,
    "categories": FIXED_CATEGORIES,
    "dedup_threshold": DEDUP_THRESHOLD,
    "dedup_method": DEDUP_METHOD,
    "ideas_per_expert": IDEAS_PER_EXPERT,
    "ideas_direct": IDEAS_DIRECT,
}
