-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinkedin_gepa.toml
More file actions
109 lines (92 loc) · 3.6 KB
/
linkedin_gepa.toml
File metadata and controls
109 lines (92 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# GEPA Configuration for LinkedIn Browser Automation Skill Optimization
#
# This configures GEPA (Generative Evolutionary Prompt Adaptation) to optimize
# the LinkedIn skill file for better reliability and speed.
#
# The skill content is written to ~/.claude/skills/linkedin.com/SKILL.md
# inside Kernel browser VMs, where Claude Code automatically discovers it.
[prompt_learning]
algorithm = "gepa"
task_app_url = "http://localhost:8030"
task_app_id = "linkedin_bench"
# Policy configuration - the proposer model for mutations
# Note: The actual task execution uses Claude Code via the task app
[prompt_learning.policy]
model = "gpt-4o"
provider = "openai"
inference_mode = "synth_hosted"
# Timeout for rollouts (browser automation takes longer than code execution)
[prompt_learning.policy.config]
timeout = 400 # 400 seconds per rollout (browser automation is slow)
# Initial prompt template
# The skill_content wildcard is what GEPA optimizes
[prompt_learning.initial_prompt]
id = "linkedin_skill"
name = "LinkedIn Browser Automation Skill"
# The skill content that gets written to SKILL.md
# GEPA will mutate and evolve this content
[[prompt_learning.initial_prompt.messages]]
role = "system"
pattern = "{skill_content}"
order = 0
# The task prompt (varies per task, not optimized)
[[prompt_learning.initial_prompt.messages]]
role = "user"
pattern = "{task_prompt}"
order = 1
[prompt_learning.initial_prompt.wildcards]
skill_content = "REQUIRED"
task_prompt = "REQUIRED"
# RLM v1 verifier - uses model-based scoring for rollout evaluation
[prompt_learning.verifier]
mode = "verifier"
model = "gemini-2.5-flash"
# GEPA algorithm settings
[prompt_learning.gepa]
env_name = "linkedin_bench"
proposer_type = "synth"
proposer_effort = "MEDIUM"
proposer_output_tokens = "SLOW"
# Unified optimization: mutate skill files via context_overrides instead of
# injecting into the system prompt. The proposer's instruction_text becomes the
# content of the mutable_files, delivered to the task app as file artifacts.
[prompt_learning.gepa.unified_optimization]
enable_task_app_context_overrides = true
optimization_target = "context_only"
mutable_files = ["~/.claude/skills/linkedin.com/SKILL.md"]
allow_preflight_script = false
allow_env_vars = false
# Baseline context override — initial file artifact values.
# run_gepa.py injects the actual initial skill content at runtime.
[prompt_learning.gepa.baseline_context_override.file_artifacts]
"~/.claude/skills/linkedin.com/SKILL.md" = "REQUIRED"
# Rollout budget and parallelism
[prompt_learning.gepa.rollout]
budget = 30 # Total rollouts to run
max_concurrent = 10 # Parallel rollouts (matches pool size)
minibatch_size = 3 # Rollouts per minibatch
timeout = 600 # 10 minutes per rollout (browser automation is slow)
# Evaluation seeds (task indices)
# Need at least 13 seeds total (10 for pareto_set + 3 for feedback)
# We cycle through our 3 tasks multiple times
[prompt_learning.gepa.evaluation]
seeds = [0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0] # 13 seeds cycling through 3 tasks
validation_seeds = [0, 1, 2]
validation_top_k = 1
# Mutation settings
[prompt_learning.gepa.mutation]
rate = 0.5
# Population settings
[prompt_learning.gepa.population]
initial_size = 4 # Starting population
num_generations = 3 # Number of evolution cycles
children_per_generation = 4 # New variants per generation
crossover_rate = 0.5
# Archive settings
[prompt_learning.gepa.archive]
size = 20
pareto_set_size = 10
# Token budget
[prompt_learning.gepa.token]
max_spend_usd = 25.0 # Budget for GEPA optimization
counting_model = "claude-3-5-sonnet-20241022"