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 (Python-compatible)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/dspy/propose/grounded_proposer.rb', line 70

def initialize
  # Core parameters
  @num_instruction_candidates = 5

  # Python-compatible awareness flags (match Python defaults)
  @program_aware = true
  @use_dataset_summary = true
  @use_task_demos = true
  @use_tip = true
  @use_instruct_history = true

  # Additional parameters
  @view_data_batch_size = 10
  @num_demos_in_context = 3
  @set_tip_randomly = true
  @set_history_randomly = true
  @init_temperature = 1.0
  @verbose = false
end

Instance Attribute Details

#init_temperatureObject

Returns the value of attribute init_temperature.



64
65
66
# File 'lib/dspy/propose/grounded_proposer.rb', line 64

def init_temperature
  @init_temperature
end

#num_demos_in_contextObject

Returns the value of attribute num_demos_in_context.



55
56
57
# File 'lib/dspy/propose/grounded_proposer.rb', line 55

def num_demos_in_context
  @num_demos_in_context
end

#num_instruction_candidatesObject

Returns the value of attribute num_instruction_candidates.



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

def num_instruction_candidates
  @num_instruction_candidates
end

#program_awareObject

Returns the value of attribute program_aware.



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

def program_aware
  @program_aware
end

#set_history_randomlyObject

Returns the value of attribute set_history_randomly.



61
62
63
# File 'lib/dspy/propose/grounded_proposer.rb', line 61

def set_history_randomly
  @set_history_randomly
end

#set_tip_randomlyObject

Returns the value of attribute set_tip_randomly.



58
59
60
# File 'lib/dspy/propose/grounded_proposer.rb', line 58

def set_tip_randomly
  @set_tip_randomly
end

#use_dataset_summaryObject

Returns the value of attribute use_dataset_summary.



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

def use_dataset_summary
  @use_dataset_summary
end

#use_instruct_historyObject

Returns the value of attribute use_instruct_history.



48
49
50
# File 'lib/dspy/propose/grounded_proposer.rb', line 48

def use_instruct_history
  @use_instruct_history
end

#use_task_demosObject

Returns the value of attribute use_task_demos.



42
43
44
# File 'lib/dspy/propose/grounded_proposer.rb', line 42

def use_task_demos
  @use_task_demos
end

#use_tipObject

Returns the value of attribute use_tip.



45
46
47
# File 'lib/dspy/propose/grounded_proposer.rb', line 45

def use_tip
  @use_tip
end

#verboseObject

Returns the value of attribute verbose.



67
68
69
# File 'lib/dspy/propose/grounded_proposer.rb', line 67

def verbose
  @verbose
end

#view_data_batch_sizeObject

Returns the value of attribute view_data_batch_size.



52
53
54
# File 'lib/dspy/propose/grounded_proposer.rb', line 52

def view_data_batch_size
  @view_data_batch_size
end