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.



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

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.



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

def max_examples_for_analysis
  @max_examples_for_analysis
end

#max_instruction_lengthObject

Returns the value of attribute max_instruction_length.



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

def max_instruction_length
  @max_instruction_length
end

#num_instruction_candidatesObject

Returns the value of attribute num_instruction_candidates.



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

def num_instruction_candidates
  @num_instruction_candidates
end

#proposal_modelObject

Returns the value of attribute proposal_model.



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

def proposal_model
  @proposal_model
end

#use_few_shot_examplesObject

Returns the value of attribute use_few_shot_examples.



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

def use_few_shot_examples
  @use_few_shot_examples
end

#use_input_output_analysisObject

Returns the value of attribute use_input_output_analysis.



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

def use_input_output_analysis
  @use_input_output_analysis
end

#use_task_descriptionObject

Returns the value of attribute use_task_description.



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

def use_task_description
  @use_task_description
end