Chatbot Test Result

User Message:

{{ $userMessage }}
@if(isset($selectedCategories) && $selectedCategories->count() > 0)

Selected Categories:

    @foreach($selectedCategories as $category)
  • {{ $category->name }} {{ $category->language === 'ka' ? 'Georgian (ქართული)' : 'English' }}
  • @endforeach
@endif @if(isset($selectedSubcategories) && $selectedSubcategories->count() > 0)

Selected Subcategories:

    @foreach($selectedSubcategories as $subcategory)
  • {{ $subcategory->name }} Category: {{ $subcategory->category->name ?? 'Unknown' }}
  • @endforeach
@endif @if(($categoryBasedAnalysis ?? false) && ($selectedCategories->count() > 0 || $selectedSubcategories->count() > 0))
Using category-based analysis because you selected at least one category or subcategory, but no specific rule matched your question.
@elseif($categoryBasedAnalysis ?? false)
Using category-based analysis since no specific rule matched but categories were selected.
@elseif($matchedRule)

Matched Rule:

  • Name: {{ $matchedRule->name }}
  • Condition: {{ $matchedRule->condition }}
  • Priority: {{ $matchedRule->priority }}
  • @if($matchedRule->category_id)
  • Category: @php $category = \App\Models\RuleCategory::find($matchedRule->category_id); @endphp {{ $category ? $category->name : 'N/A' }}
  • @endif @if($matchedRule->subcategory_id)
  • Subcategory: @php $subcategory = \App\Models\RuleSubcategory::find($matchedRule->subcategory_id); @endphp {{ $subcategory ? $subcategory->name : 'N/A' }}
  • @endif @if($matchedRule->rulecontent)
  • Rule Content:
    {{ $matchedRule->rulecontent }}
  • @endif
@else
No specific rule matched. Using default response.
@endif @if($matchedContent)

Matched Content:

  • Title: {{ $matchedContent->title }}
  • Category: {{ $matchedContent->category }}
  • @if($matchedContent->subcategory)
  • Subcategory: {{ $matchedContent->subcategory }}
  • @endif
@endif

AI Response:

{{ $aiResponse }}
@if($categoryBasedAnalysis ?? false)
Category-Based Analysis Details

This response was generated using all rules and information from the selected categories and subcategories, rather than a single matching rule.

Analysis Type: Comprehensive category analysis

@endif