Summary
GEPA uses genetic/evolutionary algorithms to optimize prompts. Like DSPy, it needs a fitness function to score prompt variants — TruLens feedback functions are a natural fit for this. An integration would let users evolve prompts toward higher groundedness, lower toxicity, or any custom TruLens metric.
What
Create a lightweight adapter that wraps TruLens feedback functions as GEPA fitness functions:
TruLensFitness(feedback_fn) — adapts a TruLens feedback function to GEPA's expected callable interface
- A cookbook showing: define a base prompt, use TruLens context_relevance as the fitness function, run GEPA evolution, visualize the improvement trajectory in the TruLens dashboard
- Log each generation's best prompt + score as a TruLens record for audit trail
Difficulty
Medium
Summary
GEPA uses genetic/evolutionary algorithms to optimize prompts. Like DSPy, it needs a fitness function to score prompt variants — TruLens feedback functions are a natural fit for this. An integration would let users evolve prompts toward higher groundedness, lower toxicity, or any custom TruLens metric.
What
Create a lightweight adapter that wraps TruLens feedback functions as GEPA fitness functions:
TruLensFitness(feedback_fn)— adapts a TruLens feedback function to GEPA's expected callable interfaceDifficulty
Medium