class ActiveGenie::Scoring::RecommendedReviewers
# reviewer3: “Developer Advocate”, reasoning: “…” }
# => { reviewer1: “API Architect”, reviewer2: “Technical Writer”,
“Evaluate technical accuracy and clarity”)
RecommendedReviewers.call(“Technical documentation about API design”,
@example Getting recommended reviewers for technical content
three distinct reviewer roles with complementary expertise and perspectives.
The class ensures a balanced and comprehensive review process by recommending
the content and criteria to identify the most suitable subject matter experts.
for evaluating text content based on specific criteria. It uses AI to analyze
The RecommendedReviewers class intelligently suggests appropriate reviewer roles
def self.call(...)
def self.call(...) new(...).call end
def call
def call messages = [ { role: 'system', content: PROMPT }, { role: 'user', content: "Scoring criteria: #{@criteria}" }, { role: 'user', content: "Text to score: #{@text}" }, ] function = { name: 'identify_reviewers', description: 'Discover reviewers based on the text and given criteria.', parameters: { type: "object", properties: { reasoning: { type: 'string' }, reviewer1: { type: 'string' }, reviewer2: { type: 'string' }, reviewer3: { type: 'string' }, }, required: ['reasoning', 'reviewer1', 'reviewer2', 'reviewer3'] } } result = client.function_calling( messages, function, model_tier: 'lower_tier', config: @config ) result end
def client
def client ::ActiveGenie::Clients::UnifiedClient end
def initialize(text, criteria, config: {})
-
config(Hash) -- Additional configuration config that modify the recommendation process -
criteria(String) -- The evaluation criteria that will guide reviewer selection -
text(String) -- The text content to analyze for reviewer recommendations
def initialize(text, criteria, config: {}) @text = text @criteria = criteria @config = ActiveGenie::Configuration.to_h(config) end