tools ai search debug - BevvyTech/BrewskiDocs GitHub Wiki

Tools – AI Search Debug (/tools/ai-search-debug)

Purpose

  • Allow super users to probe the documentation search index directly, helping diagnose RAG mismatches or scoring issues.
  • Offers a lightweight console to run manual queries against /ai/docs/search and inspect raw hits.

Data & Dependencies

  • Requires super-user membership; others are redirected to the Tools landing page.
  • API calls issued via apiFetch with query, optional team scope, and limit params.

Key Interactions

  • Form captures search query, result limit, and team scope (defaulting to global docs); submit triggers async fetch with loading spinner.
  • Results render in a console-style card showing score, snippet, chunk index, source, and last update timestamp.
  • Error banner appears when the API rejects the request; limit/team controls persist their selected values between runs.
⚠️ **GitHub.com Fallback** ⚠️