feat: lockdocs 0.3 - docs sites pinned to your major, heading-aware ranking, held-out questions - #24
Merged
Merged
Conversation
…anking, held-out benchmark questions - Docs-site repositories follow the pinned major: default branch for the latest, a vN / N.x branch or the last commit before the next major for older ones; pages about a later major are skipped. tokio's website added. - Docs pages written as React components (Tailwind installation guides) are indexed; MDX HTML headings and export const title are honoured. - Upstream reStructuredText in .txt files (Django) is now indexed. - Ranking: a second BM25 over headings and first sentences; question words that name a documented top-level API count as identifiers. - GitHub API redirects keep the token; docs-site errors are reported. - Benchmark: 17 held-out questions, grading-aware Context7 answer reuse, weight sweeps via workflow input. - docs/vision.md and docs/capabilities.md with a CI path check.
…ings, old upgrade guides and deprecated pages rank lower
- The top result quotes the first paragraph (and a short code block) of its
page and parent section when they add something (deprecation notices,
the setup a subsection builds on).
- Generic headings (Parameters, Returns, Examples) take their topic from
the heading above; MDX heading ids ({/*usage*/}) are dropped.
- Upgrade guides to a major older than the pinned one, and pages titled
(Deprecated), rank lower unless the question is about changes.
- Capitalized words in headings stay whole (TypeScript no longer matches
type); stemmer pairs -ation/-ate and -ability/-able; js/ts/db synonyms.
- Benchmark: the 17 first held-out questions move to the tuning set after
being used for diagnosis; 18 new held-out questions; pydantic 1 rejects
use the v2 idiom model_config = ConfigDict.
…ctions embed their code; readable page titles from file names; parameter/param synonyms Also: Context7 in the benchmark tries the next search result when a library answers HTTP 404, as an agent would; fix an overflow in compact() that panicked in debug builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quality round for lockdocs 0.3.0: close the gap to Context7 on the newest majors and on tokio with general fixes, guard against overfitting with held-out questions, add the owner-standard product docs, and release.
Results (CI, GitHub-hosted runner, run)
lockdocs fetchBefore (0.2.1, 70 questions): 55/70 vs 49/70; newer majors 29/34 vs 34/34; tokio 2/3 vs 3/3. Every column is now won or tied. On the original 70 questions: 65/70.
Context7 answers are reused from the previous run only when question, grading and version are unchanged (103 of 105 this run; 8 HTTP calls).
What changed
Sources
vN/N.xbranch (Tailwind CSSv3, Prismav6) or the last commit before the next major'sN+1.0.0tag. React keeps latest-only (react.dev documents APIs before they ship). Pages about a later major are skipped. tokio's website is added; docs sites work for crates and PyPI too.export const titlenames the page; MDX heading ids are dropped..txt) were downloaded but never indexed.upstream::FORMATmakeslockdocs fetchrefresh old copies.Ranking and answers
select!, a higher head weight loses axum and Django questions.Benchmark
historynote; 18 new held-out questions, written before the second round of changes, are reported separately.model_config = ConfigDict(pydantic 1.10 also ships aConfigDictTypedDict, so the old reject failed correct v1 answers).bench.ymlvariantsinput for weight sweeps.Owner standards
docs/vision.md,docs/capabilities.md, and a CI check that every named code path exists (scripts/check-capabilities.ts).Release: 0.3.0; merging publishes through
release.yml.Net LOC: +3,746 overall (+4,935 / -1,189, mostly benchmark data); +1,065 excluding
bench-results.json,questions.json,Cargo.lockand the generated benchmark page (+1,227 / -162).