Module: RubricLLM::RSpecMatchers
- Defined in:
- lib/rubric_llm/rspec.rb
Defined Under Namespace
Classes: BaseMatcher, CorrectnessMatcher, FaithfulnessMatcher, HallucinationMatcher, RelevanceMatcher
Instance Method Summary
collapse
Instance Method Details
#be_correct_for(ground_truth) ⇒ Object
11
12
13
|
# File 'lib/rubric_llm/rspec.rb', line 11
def be_correct_for(ground_truth)
CorrectnessMatcher.new(ground_truth)
end
|
#be_faithful_to(context) ⇒ Object
7
8
9
|
# File 'lib/rubric_llm/rspec.rb', line 7
def be_faithful_to(context)
FaithfulnessMatcher.new(context)
end
|
#be_relevant_to(question) ⇒ Object
15
16
17
|
# File 'lib/rubric_llm/rspec.rb', line 15
def be_relevant_to(question)
RelevanceMatcher.new(question)
end
|
#hallucinate_from(context) ⇒ Object
19
20
21
|
# File 'lib/rubric_llm/rspec.rb', line 19
def hallucinate_from(context)
HallucinationMatcher.new(context)
end
|