Class: DSPy::Propose::GroundedProposer::Config

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dspy/propose/grounded_proposer.rb

Overview

Configuration for instruction proposal

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



40
41
42
43
44
45
46
47
48
# File 'lib/dspy/propose/grounded_proposer.rb', line 40

def initialize
  @num_instruction_candidates = 5
  @max_examples_for_analysis = 10
  @max_instruction_length = 200
  @use_task_description = true
  @use_input_output_analysis = true
  @use_few_shot_examples = true
  @proposal_model = "gpt-4o-mini"
end

Instance Attribute Details

#max_examples_for_analysisObject

Returns the value of attribute max_examples_for_analysis.



22
23
24
# File 'lib/dspy/propose/grounded_proposer.rb', line 22

def max_examples_for_analysis
  @max_examples_for_analysis
end

#max_instruction_lengthObject

Returns the value of attribute max_instruction_length.



25
26
27
# File 'lib/dspy/propose/grounded_proposer.rb', line 25

def max_instruction_length
  @max_instruction_length
end

#num_instruction_candidatesObject

Returns the value of attribute num_instruction_candidates.



19
20
21
# File 'lib/dspy/propose/grounded_proposer.rb', line 19

def num_instruction_candidates
  @num_instruction_candidates
end

#proposal_modelObject

Returns the value of attribute proposal_model.



37
38
39
# File 'lib/dspy/propose/grounded_proposer.rb', line 37

def proposal_model
  @proposal_model
end

#use_few_shot_examplesObject

Returns the value of attribute use_few_shot_examples.



34
35
36
# File 'lib/dspy/propose/grounded_proposer.rb', line 34

def use_few_shot_examples
  @use_few_shot_examples
end

#use_input_output_analysisObject

Returns the value of attribute use_input_output_analysis.



31
32
33
# File 'lib/dspy/propose/grounded_proposer.rb', line 31

def use_input_output_analysis
  @use_input_output_analysis
end

#use_task_descriptionObject

Returns the value of attribute use_task_description.



28
29
30
# File 'lib/dspy/propose/grounded_proposer.rb', line 28

def use_task_description
  @use_task_description
end