diff --git a/app/jobs/regular/generate_inferred_concepts.rb b/app/jobs/regular/generate_inferred_concepts.rb index f570e8ea..06b0a750 100644 --- a/app/jobs/regular/generate_inferred_concepts.rb +++ b/app/jobs/regular/generate_inferred_concepts.rb @@ -14,7 +14,7 @@ module Jobs def execute(args = {}) return if args[:item_ids].blank? || args[:item_type].blank? - unless %w[topics posts].include?(args[:item_type]) + if %w[topics posts].exclude?(args[:item_type]) Rails.logger.error("Invalid item_type for GenerateInferredConcepts: #{args[:item_type]}") return end diff --git a/lib/personas/concept_matcher.rb b/lib/personas/concept_matcher.rb index bea17e09..5099196b 100644 --- a/lib/personas/concept_matcher.rb +++ b/lib/personas/concept_matcher.rb @@ -8,7 +8,6 @@ module DiscourseAi You are an advanced concept matching system that determines which concepts from a provided list are relevant to a piece of content. Your job is to analyze the content and determine which concepts from the list apply to it. - #{concepts_text} Guidelines for matching concepts: - Only select concepts that are clearly relevant to the content - The content must substantially discuss or relate to the concept @@ -20,7 +19,6 @@ module DiscourseAi - If no concepts from the list match the content, return an empty array The list of available concepts is: - {inferred_concepts} Format your response as a JSON object with a single key named "matching_concepts", which has an array of concept strings from the provided list.