Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NOISSUE - Add retrieval debug panel#251

Merged
fbugarski merged 1 commit into
mainfrom
retrieval-debug-panel
Jun 5, 2026
Merged

NOISSUE - Add retrieval debug panel#251
fbugarski merged 1 commit into
mainfrom
retrieval-debug-panel

Conversation

@fbugarski

Copy link
Copy Markdown
Contributor

What type of PR is this?

This is a feature that adds a hidden retrieval debug panel for inspecting chat retrieval behavior.

What does this do?

  • Adds an optional chat debug event emitted only when the request enables debug mode.

  • Adds a hidden Prompt debug mode behind ?debug=1.

  • Shows retrieval details in the right-side panel:

    • query
    • topK
    • retrieval enabled/skipped state
    • scoped record count
    • prompt chunk rank
    • record name
    • chunk index
  • Propagates RRF retrieval score from backend search results into debug metadata.

  • Adds /prompt as an alias for the existing chat page so /prompt?debug=1 works.

  • Keeps normal Prompt UI unchanged when debug mode is not enabled.

Which issue(s) does this PR fix/relate to?

  • Related Issue: NOISSUE

Have you included tests for your changes?

Yes. Added backend service coverage for retrieval debug event emission.

The following checks were completed:

  • go test ./internal/embedder/...
  • npm run build
  • npm run lint -- src/App.tsx src/pages/ChatPage.tsx src/lib/api.ts src/types/index.ts
  • npm test -- --run

Did you document any new/modified features?

No separate documentation was added. The feature is intentionally hidden behind /prompt?debug=1 for developer/admin troubleshooting.

Notes

Manually verified the debug panel with mart query and confirmed retrieved prompt chunks, rank, score, and previews are displayed.

@fbugarski fbugarski merged commit 88367b4 into main Jun 5, 2026
2 checks passed
@fbugarski fbugarski deleted the retrieval-debug-panel branch June 5, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant