@extends('admin.layouts.app') @section('title', 'RAG Index') @section('breadcrumb') AI Intelligence / RAG Index @endsection @section('content')
@include('admin.ai._tabs') {{-- Header --}}

RAG Vector Index

Manage regulation embeddings for natural language queries

{{-- Stats --}}
{{ number_format($stats['total'] ?? 0) }}
Total Embeddings
@foreach(($stats['by_source'] ?? []) as $source => $count)
{{ number_format($count) }}
{{ ucfirst(str_replace('_', ' ', $source)) }}
@endforeach
{{-- By State --}} @if(!empty($stats['by_state']))

Embeddings by State

@foreach($stats['by_state'] as $state) @endforeach
State Embeddings
{{ $state->state?->name ?? 'Unknown' }} {{ number_format($state->total) }}
@endif {{-- Rebuild Controls --}}

Rebuild Index

Re-embed regulation documents and zone rules into the vector store. This calls the OpenAI Embeddings API.

@endsection @push('scripts') @endpush