You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Docs sites follow your major. For packages whose docs live in a separate website repository, lockdocs fetch takes the docs for the pinned major: the default branch when your major is the latest, a vN / N.x branch when the site keeps one (Tailwind CSS v3, Prisma v6), or the last commit before the next major was released. Pages about a later major are skipped. React keeps the latest-only rule (react.dev documents APIs before they ship). tokio's website (tutorial and topics) is added, and docs sites now work for crates and PyPI packages too.
More of the docs are read. Django's docs (reStructuredText in .txt files) were downloaded but not indexed; they are now. Docs pages written as React components (Tailwind's installation guides) are indexed. HTML headings in MDX split sections, and export const title names the page.
Ranking. A second BM25 over just the heading (or name) and first sentence keeps a long body from burying what an entry says it is. Question words that name a documented top-level API of the package ("run code after the response" in Next.js, which exports after) count as identifiers. Generic headings (Parameters, Returns, Examples) take their topic from the heading above; MDX heading ids ({/*usage*/}) are dropped; capitalized words in headings stay whole (TypeScript no longer matches "type"). Upgrade guides to an older major than yours and pages titled "(Deprecated)" rank lower unless the question is about changes. Code-only sections are embedded with their code, not their title alone. The stemmer pairs -ation/-ate and -ability/-able, and the synonym table adds parameter/param, JavaScript/JS, TypeScript/TS and database/DB.
Answers. The top result quotes the first paragraph of its page and parent section, with the short list or code block that follows, when they add something (React's "In React 19, forwardRef is no longer necessary" at the top of the page; the @custom-variant setup a Tailwind subsection builds on).
Fetch. GitHub API redirects (renamed repositories) keep the token, docs-site errors appear in the fetch note, and lockdocs fetch refreshes copies made by older versions.
Benchmark: 105 questions (was 70). 17 questions written as held-out were used to diagnose misses after their first run and joined the main set; 18 new held-out questions, not used for tuning, have their own column. Context7 answers are reused only when the question and its grading are unchanged, and a Context7 library that answers HTTP 404 falls back to the next search result. The pydantic 1 graders reject the v2 idiom model_config = ConfigDict instead of ConfigDict, which pydantic 1.10 also ships. bench.yml takes a variants input for weight sweeps.