Enable agent-friendly documentation output - #1955
jacobtomlinson wants to merge 1 commit into
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/cuopt/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds ChangesDocumentation support
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Feature Merge Risk: ⚪ Minimal · up to No supported merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
8f96c45 to
3c3d6d1
Compare
CI Test Summary✅ All 13 test job(s) passed. (2 skipped) |
3c3d6d1 to
9625407
Compare
Description
This PR adds the
sphinx-llmextension which generates markdown pages in the documentation build output that conform to the llms.txt spec.This means an agent should be able to visit
/llms.txton your site to get a markdown sitemap, and each page should be published in markdown in addition to HTML to help reduce context/token usage. For example/overview.htmlalso gets published as/overview.mdwith the same content in markdown, and the/llms.txtsitemap points to/overview.mdwith a short summary of that page. The HTML page contains meta headers to help agents discover markdown versions if they find the HTML via search.sphinx-llmworks by running thesphinx-markdown-builderin parallel to the primary docs build so that the output of extensions like docref/autodoc/intersphinx/etc is fully rendered in the markdown output. Then it merges the two build outputs following thellms.txtstructure.Note
Optionally,
sphinx-llmcan also use an LLM during the documentation build to generate richer summaries of pages and compact documentation details into the/llms.txtfile to aid agent discovery. However, this PR does not enable this at this time as it requires configuring a model endpoint and credentials and will consume tokens during each docs build in CI. This could be enabled in the future after further discussion.Checklist