Quick Chat Docs Assistant Guide¶
This guide covers the Quick Chat Helper assistant modes that were added to improve discoverability:
Chat: normal model chatDocs Q&A: asks the backend RAG endpoint for documentation-style answers with citationsBrowse Guides: per-page Tutorials + browsable pre-written Q/A workflow cards
Design rationale and architecture details are documented in
Docs/Design/Quick_Chat_Docs_Assistant.md.
Primary implementation files:
apps/packages/ui/src/components/Common/QuickChatHelper/QuickChatHelperModal.tsxapps/packages/ui/src/routes/option-quick-chat-popout.tsxapps/packages/ui/src/hooks/useQuickChat.tsxapps/packages/ui/src/components/Common/QuickChatHelper/docs-rag-profile.tsapps/packages/ui/src/components/Common/QuickChatHelper/workflow-guides.tsapps/packages/ui/src/components/Common/QuickChatHelper/rag-response.ts
How To Use¶
- Open Quick Chat Helper.
- Pick one of the three modes using the segmented control.
- For
Docs Q&A, ask a question like: - "What page should I use to benchmark models?"
- "What's the synopsis of this paper?"
- "How do I do this on this page?"
- For
Browse Guides, search and either: - use
Tutorials for this pageto run a guided tour for the current route, or - click
Ask docs modeto send the guide question into Docs Q&A, or - click
Open <page>to navigate directly.
What Docs Q&A Sends To RAG¶
Quick Chat uses POST /api/v1/rag/search via tldwClient.ragSearch(...).
Current request profile behavior:
- Base retrieval:
search_mode: "hybrid"enable_generation: trueenable_citations: trueenable_reranking: truereranking_strategy: "flashrank"- strict mode defaults:
sources: ["media_db"]corpus: "media_db"index_namespace: "project_docs"
- Profile tuning:
- synopsis-like queries increase recall/context (
top_k, parent-document behavior, generation budget) - troubleshooting-like queries lower
min_scoreto improve recall - Route-aware query augmentation:
- if user says "this page/current page/here", quick chat appends:
Current page context: <label> (<route>)
What Browse Guides Uses¶
Browse Guides has two distinct layers:
Tutorials for this page(dynamic, route-scoped):- sourced from
src/tutorials/registry.ts - shows only tutorials matching the active route
- supports
Start,Replay, andLocked(when prerequisites are not met) - Workflow cards (curated Q/A):
- sourced from
QUICK_CHAT_WORKFLOW_GUIDES - can be overridden in settings
Workflow card fields:
- title
- user-style question
- suggested answer
- page route
- tags
It is deterministic and does not call the backend by itself.
Edit Per-Page Tutorials (Developer Workflow)¶
Per-page tutorial entries are not edited from settings JSON. Update them in code:
- Add or edit a definition in
apps/packages/ui/src/tutorials/definitions/*.ts. - Ensure the definition is included in
TUTORIAL_REGISTRYinapps/packages/ui/src/tutorials/registry.ts. - Add/update i18n keys in:
apps/packages/ui/src/assets/locale/en/tutorials.jsonapps/packages/ui/src/public/_locales/en/tutorials.json- Ensure target selectors exist and are stable (
data-testidpreferred). - Run tutorial/quick-chat tests.
Edit Pre-Written Workflow Cards In UI¶
- Open
Settings -> Chat behavior. - Find
Quick Chat workflow cards. - Edit the JSON in
Quick Chat workflow cards JSON. - Click
Save workflow cards.
Expected JSON shape:
[
{
"id": "custom-guide-id",
"title": "Guide title",
"question": "User-style question",
"answer": "Curated answer",
"route": "/research-studio",
"routeLabel": "Research Studio",
"tags": ["workflow", "discovery"]
}
]
Notes:
routecan be written asresearch-studioor/research-studio; it is normalized to start with/.- Invalid or incomplete cards are ignored during validation.
Reset to built-in defaultsrestores the shipped guide set.- This setting only changes workflow cards; it does not change per-page Tutorials.
Post-Processing Added To Docs Replies¶
Docs replies now include optional Suggested Pages in addition to normal answer/citations:
- recommendations are scored from:
- user query
- generated answer
- citation titles/sources
- current route
- each recommendation includes:
- route label
- route path
- short reason
- "(current page)" marker when applicable
Important Scope Note¶
Current behavior is now strict by default for project docs:
- quick chat docs mode scopes to
media_dbonly - uses
index_namespace: "project_docs"unless overridden
Results are still only as good as the corpus hygiene. If non-project files are indexed into the same strict namespace, they can still appear.
Browse Guides is the only strictly curated pre-written Q/A layer.
Strict Scope Configuration Keys¶
Quick chat reads the following storage keys:
quickChatStrictDocsOnly(boolean, defaulttrue)quickChatDocsIndexNamespace(string, default"project_docs")quickChatDocsProjectMediaIds(number[], JSON string, or comma-separated list)
When quickChatDocsProjectMediaIds is set, it is passed as include_media_ids to hard-limit retrieval to those media IDs.
You can configure these from the UI in Settings -> Chat behavior under Quick Chat Docs Q&A scope.
If You Need Even Tighter "Project Docs Only"¶
- Keep strict mode enabled.
- Use a dedicated namespace that only contains official project docs.
- Set
quickChatDocsProjectMediaIdsto the authoritative docs set. - Keep
Browse Guidesas deterministic curated guidance.
Testing¶
Feature-specific tests live in:
apps/packages/ui/src/components/Common/QuickChatHelper/__tests__/docs-rag-profile.test.tsapps/packages/ui/src/components/Common/QuickChatHelper/__tests__/workflow-guides.test.tsapps/packages/ui/src/components/Common/QuickChatHelper/__tests__/rag-response.test.ts
Run:
cd apps/packages/ui
bunx vitest run src/components/Common/QuickChatHelper/__tests__