Documentation

Build LLM-powered agents
with production-ready TypeScript

DSPy for TypeScript. Working with LLMs is complex—they don't always do what you want. DSPy makes it easier to build amazing things with LLMs. Just define your inputs and outputs (signature) and an efficient prompt is auto-generated and used. Connect together various signatures to build complex systems and workflows using LLMs.

15+ LLM Providers
End-to-end Streaming
Auto Prompt Tuning

AxGEPAAdapter

Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/optimizers/gepaAdapter.ts#L7

Type Parameters

Type ParameterDefault type
Datumany
Trajany
Outany

Properties

PropertyType
propose_new_texts?(candidate: Readonly<Record<string, string>>, reflectiveDataset: Readonly<Record<string, any[]>>, componentsToUpdate: readonly string[]) => | Record<string, string> | Promise<Record<string, string>>

Methods

evaluate()

evaluate(
   batch: readonly Datum[], 
   candidate: Readonly<Record<string, string>>, 
   captureTraces?: boolean): 
  | AxGEPAEvaluationBatch<Traj, Out>
| Promise<AxGEPAEvaluationBatch<Traj, Out>>;

Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/optimizers/gepaAdapter.ts#L8

Parameters

ParameterType
batchreadonly Datum[]
candidateReadonly<Record<string, string>>
captureTraces?boolean

Returns

| AxGEPAEvaluationBatch<Traj, Out> | Promise<AxGEPAEvaluationBatch<Traj, Out>>


make_reflective_dataset()

make_reflective_dataset(
   candidate: Readonly<Record<string, string>>, 
   evalBatch: Readonly<AxGEPAEvaluationBatch<Traj, Out>>, 
componentsToUpdate: readonly string[]): Record<string, any[]>;

Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/optimizers/gepaAdapter.ts#L16

Parameters

ParameterType
candidateReadonly<Record<string, string>>
evalBatchReadonly<AxGEPAEvaluationBatch<Traj, Out>>
componentsToUpdatereadonly string[]

Returns

Record<string, any[]>