-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Labels
julesGoogle JulesGoogle Jules
Description
ax/src/ax/dsp/optimizers/gepa.ts
Lines 836 to 851 in 95962ae
| private async getBaseInstruction<IN, OUT extends AxGenOut>( | |
| program: Readonly<AxGen<IN, OUT>> | |
| ): Promise<string> { | |
| try { | |
| // If program exposes instruction via signature, prefer it | |
| const sig: any = program.getSignature?.(); | |
| if ( | |
| sig && | |
| typeof sig.instruction === 'string' && | |
| sig.instruction.length > 0 | |
| ) { | |
| return sig.instruction as string; | |
| } | |
| } catch {} | |
| return 'Follow the task precisely. Be concise, correct, and consistent.'; | |
| } |
This code is accessing sig.instruction, which isn't a property on AxSignature, and then defaults to 'Follow the task precisely. Be concise, correct, and consistent.'. My GEPA results always have the fallback string as the instruction. Troubleshooting this has cost me few bucks unfortunately.
I've only recently started using TypeScript, but I don't understand what's the point of using it if bugs like this are not caught. At the very least the error shouldn't just be swallowed like this in the catch statement.
Metadata
Metadata
Assignees
Labels
julesGoogle JulesGoogle Jules