Repository navigation
feat: improve libscope as a knowledge base for AI agents - #544
Merged
Merged
Conversation
- Document status (current, superseded, wrong) and verified date, set with the mark-document operation and kept across re-indexing. - doctor reports documents whose local source file is missing. - PDF chunks follow the document structure and keep page numbers and outline headings; search results carry a citation. - Optional local cross-encoder reranker (off by default). - Relevance score on each result and a no-good-match signal; superseded documents rank lower and wrong ones are excluded. - grep operation within a document. - libscope eval reports recall@k and MRR from a file of queries. - Shorter MCP search results by default. Title matching is no longer stemmed; content matching still is.
- A superseded hit with a negative vector score now moves down instead of up. - With a reranker, the candidate pool holds at least rerankTopN hits, so the reranked order does not depend on the page size. - Case-insensitive literal grep matches Greek sigma in every form. - The folder watcher records PDF page numbers, as libscope add does.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
- Reduce the cognitive complexity of searchDocuments, getRelatedChunks, importFromBackup and chunkContentDetailed with small helpers. - Give pageConfidence's reduce an initial value; remove nested template literals. - One supersede-chain walker, one document status label, one keyword-index query for relevance and snippets (prepared once per page). - One loader for local ONNX models; doctor checks every model file. - Shared escapeRegExp, markdown table rows, CLI ranking flags and rerank schema. - Resolve PDF outline pages together and compute heading keys once. - Move duplicated test helpers into tests/fixtures.
|
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.



What
current,superseded,wrong) and a verified date, set with the newmark-documentoperation. Re-indexing a file, URL, watched folder or Obsidian note keeps the lifecycle.documentStatus: "any".grepwithin a document, andlibscope eval, which reports recall@k and MRR from a file of queries.Schema version 22 (migrations 21 and 22).
Behaviour change
Title matching is no longer stemmed, so "timeout" does not match the title "Timeouts". Content matching is still stemmed.
Known limitations
docs/guide/document-lifecycle.md.askhas no status or rerank options.pack_nameis not restored, because backups do not include thepackstable. After a restore,doctorcan report pack documents with absolute source paths as missing.Checks
format:check,lint(0 errors),typecheck,test:coverage(2683 tests, 93.4% statements),buildanddocs:checkpass locally on Node 20.