diff --git a/docs/images/retrieval-preview-mobile.png b/docs/images/retrieval-preview-mobile.png new file mode 100644 index 0000000..f4923ad Binary files /dev/null and b/docs/images/retrieval-preview-mobile.png differ diff --git a/docs/images/retrieval-preview.png b/docs/images/retrieval-preview.png new file mode 100644 index 0000000..7b2a84d Binary files /dev/null and b/docs/images/retrieval-preview.png differ diff --git a/docs/retrieval.md b/docs/retrieval.md index 115ff58..27f0512 100644 --- a/docs/retrieval.md +++ b/docs/retrieval.md @@ -69,6 +69,22 @@ authentication. Keep the management API behind trusted access controls. Omitting the channel searches all indexed content; a supplied channel is a search filter, not an authorisation check. The response contains full chunk text. +The dashboard's **Retrieval** tab calls this endpoint on submission. Enter a +question and optionally a channel ID to inspect ranked chunk text, source +metadata and raw distances alongside the effective top-k and cutoff. An empty +channel searches all indexed content. The tab reports empty results and offers +a retry after failures. Editing either input clears the previous results, and +leaving the tab cancels the pending browser request. It does not generate an +answer or send a Slack message. Cancelling the browser request does not +guarantee that an embedding request already started by the backend is cancelled. + +![Retrieval tab showing one selected VPN chunk and its distance](images/retrieval-preview.png) + +The screenshot uses local fixture data with fixed embeddings, a channel scope +of `CTARGET` and a distance cutoff of 1. It contains no real workspace content. +The [narrow screen capture](images/retrieval-preview-mobile.png) shows the same +result at a width of 390 pixels. + ## Saved Slack threads Slack thread indexing uses a stable chunk ID built from the channel ID and diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index a179806..a35bd80 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react' import ConversationsPanel from '@/components/conversations-panel' +import RetrievalPanel from '@/components/retrieval-panel' import { askQuestion, getDocument, @@ -25,7 +26,7 @@ export default function Home() { const [question, setQuestion] = useState('') const [answer, setAnswer] = useState('') const [loading, setLoading] = useState(false) - const [activeTab, setActiveTab] = useState<'ask' | 'documents' | 'conversations'>('ask') + const [activeTab, setActiveTab] = useState<'ask' | 'documents' | 'conversations' | 'retrieval'>('ask') const [documents, setDocuments] = useState([]) const [documentsTotal, setDocumentsTotal] = useState(0) const [documentsLoading, setDocumentsLoading] = useState(false) @@ -102,7 +103,7 @@ export default function Home() { {/* Tab Navigation */}
-
+
+
@@ -289,6 +300,7 @@ export default function Home() { )} {activeTab === 'conversations' && } + {activeTab === 'retrieval' && }