Better mini sitemap for the chatbot#1337
Conversation
Generate a product-aligned mini sitemap from frontend routes and help links, wire it into LLM render output, include the docs IA hub page in the corpus, and verify the artifact in CI.
|
Pull requests must include at least one of the required labels: |
|
Pull requests must include at least one of the required labels: |
…kout) Store extracted routes and help links in site/llm/chatbot-product-map-frontend-snapshot.json so CI builds the map without validmind/frontend access. Refresh locally with make -C site refresh-chatbot-product-map when product UI links change.
Give maintainers a single entry point for render-llm, product map artifacts, and when to refresh the vendored frontend snapshot.
Sort doc paths and related-doc suggestions so Linux and macOS produce the same map, regenerate the committed artifact, and use unittest discover to avoid the stdlib site module import collision.
PR SummaryThis pull request introduces a new feature aimed at generating and validating a product-to-documentation map used by the in-app chatbot (Valerie) for retrieval-augmented generation (RAG). The changes include the following key functional enhancements:
Overall, the PR integrates a robust mechanism to automatically generate, test, and validate a product-to-documentation map that aligns frontend routes with their corresponding documentation. This supports more accurate contextual assistance in the chatbot and streamlines maintenance for documentation updates. Test Suggestions
|
Lighthouse check resultsShow Lighthouse scoresFolder depth level checked: 0 Commit SHA: 51ee46d Modify the workflow to check a different depth:
|
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
| { | ||
| "version": 1, | ||
| "generated_at": "2026-05-20T01:55:33.719811+00:00", | ||
| "frontend_root": "/Users/nrichers/GitHub/validmind/frontend", |
There was a problem hiding this comment.
did you want your local mac machine path nrichers in this output?
| "anchor": null | ||
| } | ||
| ], | ||
| "/settings/index.tsx": [ |
There was a problem hiding this comment.
is settings/index.tsx a route - seems like a react file instead
Pull Request Description
What and why?
This PR should improve chatbot responses by adding a product UI to docs map for RAG alongside the existing
AGENTS.mddocs index.Response quality improvements that depend on docs RAG should be across the board, but I am hopeful that settings-related questions especially will improve, as settings 1) cover a large surface area in the UI and 2) our docs content architecture has grouped settings info with the human-centric tasks the settings belong to.
Summary of changes
site/scripts/generate_chatbot_product_map.pyto build a product-aligned map from frontend routes/help links to documentation URLs and H2/H3 section hints (committed assite/llm/chatbot-product-map.md).site/llm/render.shand CI so the map and updatedAGENTS.mdare copied intosite/llm/_llm-output/for LanceDB ingestion.about/contributing/(Quarto does not re-include files after a directory exclusion).AGENTS.mdwith a Product UI mapping section describing when Valerie should use the map vs docs-by-topic navigation.site/llm/chatbot-product-map-frontend-snapshot.jsonso CI can build the map without avalidmind/frontendcheckout.Fixes sc-16170 — Better mini sitemap for the chatbot
How to test
python3 -m unittest discover -s site/scripts -p 'test_generate_chatbot_product_map.py' -vpython3 site/scripts/generate_chatbot_product_map.py→git diff --exit-code site/llm/chatbot-product-map.mdmake render-llmlocallysite/llm/_llm-output/chatbot-product-map.mdandsite/llm/_llm-output/about/contributing/using-the-documentation.mdexist; novalidmind-community.mdorstyle-guide/under contributingTo refresh the vendored frontend snapshot after product UI link changes:
make -C site refresh-chatbot-product-map(requires localvalidmind/frontendcheckout).What needs special review?
site/llm/README.md).about/contributing/— confirm only contributor/style-guide pages are omitted.Dependencies, breaking changes, and deployment notes
chatbot-product-map-frontend-snapshot.jsonwhen frontend routes orhelpLinkvalues change.Release notes
Internal — not externalized in release notes.
Checklist
internal)