Module: RSpec::LLM::Matchers
- Defined in:
- lib/rspec/llm/matchers.rb,
lib/rspec/llm/matchers/pass_llm_judge.rb,
lib/rspec/llm/matchers/match_llm_intent.rb,
lib/rspec/llm/matchers/match_json_schema.rb,
lib/rspec/llm/matchers/be_semantically_similar_to.rb
Overview
Module to be included in example groups (RSpec.configure does this
automatically via lib/rspec/llm/rspec.rb). Exposes the matcher DSL.
Defined Under Namespace
Classes: BeSemanticallySimilarTo, MatchJsonSchema, MatchLlmIntent, PassLlmJudge
Instance Method Summary
collapse
Instance Method Details
#be_semantically_similar_to(expected) ⇒ Object
25
26
27
|
# File 'lib/rspec/llm/matchers.rb', line 25
def be_semantically_similar_to(expected)
RSpec::LLM::Matchers::BeSemanticallySimilarTo.new(expected)
end
|
#match_json_schema(schema) ⇒ Object
21
22
23
|
# File 'lib/rspec/llm/matchers.rb', line 21
def match_json_schema(schema)
RSpec::LLM::Matchers::MatchJsonSchema.new(schema)
end
|
#match_llm_intent(intent) ⇒ Object
17
18
19
|
# File 'lib/rspec/llm/matchers.rb', line 17
def match_llm_intent(intent)
RSpec::LLM::Matchers::MatchLlmIntent.new(intent)
end
|
#pass_llm_judge(criterion) ⇒ Object
13
14
15
|
# File 'lib/rspec/llm/matchers.rb', line 13
def pass_llm_judge(criterion)
RSpec::LLM::Matchers::PassLlmJudge.new(criterion)
end
|