Class: OpenAI::Models::Responses::FileSearchTool::RankingOptions

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/file_search_tool.rb

Overview

See Also:

Defined Under Namespace

Modules: Ranker Classes: HybridSearch

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(embedding_weight:, text_weight:) ⇒ Object

Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.

Parameters:

  • embedding_weight (Float)

    The weight of the embedding in the reciprocal ranking fusion.

  • text_weight (Float)

    The weight of the text in the reciprocal ranking fusion.



# File 'lib/openai/models/responses/file_search_tool.rb', line 95

Instance Attribute Details

#hybrid_searchOpenAI::Models::Responses::FileSearchTool::RankingOptions::HybridSearch?

Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.



79
# File 'lib/openai/models/responses/file_search_tool.rb', line 79

optional :hybrid_search, -> { OpenAI::Responses::FileSearchTool::RankingOptions::HybridSearch }

#rankerSymbol, ...

The ranker to use for the file search.



85
# File 'lib/openai/models/responses/file_search_tool.rb', line 85

optional :ranker, enum: -> { OpenAI::Responses::FileSearchTool::RankingOptions::Ranker }

#score_thresholdFloat?

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.

Returns:

  • (Float, nil)


93
# File 'lib/openai/models/responses/file_search_tool.rb', line 93

optional :score_threshold, Float