Repository navigation
feat: refuse absent-topic questions without a model, sharpen ranking, and move the hero buttons - #219
Merged
Merged
Conversation
…sharpen ranking - weight function words such as "what", "de", or "les" at 0.3 in the keyword query, and lift passages whose file name or heading path holds words of the question by up to 20% - ignore words that more than half of the passages hold in those boosts, so a heading word that every file shares no longer buries the passage both channels ranked first - with a semantic model, require half of the question's IDF weight for a passage that only the keyword search returned, and credit fuzzy matches and identifier parts in coverage - with local-hash, answer nothing when none of the first five passages holds 30% of the question's weighted words, or when words found nowhere in the index carry half of its weight - weigh a missing word as if one passage held it, so one unusual verb on a small index does not pass for the question's focus - memoize query-independent work per passage text and file path and read Arrow rows as plain objects, for faster warm searches - raise the ranking policy to version 9
- add `ingestEmbeddingDevice` ("cpu" by default, or "webgpu"): Transformers ingestion then embeds
document batches through ONNX Runtime's bundled WebGPU provider and falls back to the CPU when
the runtime offers no WebGPU
- keep query embeddings on the CPU, where short inputs run faster, and key cached pipelines by
device so CPU and GPU extractors never mix
…airs - have `rgr doctor` and `rgr upgrade` recommend `rgr ingest` or `rgr ingest --rebuild` when configured OCR or legacy Word commands keep setup, repair, and upgrade from ingesting on their own, instead of a repair step that cannot ingest
- keep scoring cases concurrently, but take p50 and p95 latency from an untimed warm-up and up to ten sequential searches; concurrent cases waited behind each other and read several times higher than real searches
- move the questions about the retired Chat and TTS packages from the answerable list to the near-domain list of the repository fixture - check observability phases by name, so adding or removing one fails visibly - derive the runtime-reuse topK change from the balanced default, which setup leaves unset
…gestion - update both READMEs, configuration, migration, CLI, troubleshooting, llms.txt, and the benchmark guide with the measured 6.4 to 6.5 results on six indexes and the stack comparison - document the absent-topic rule, the distinctive-word boosts, and `ingestEmbeddingDevice`
- move the hero's View on GitHub and View on npm buttons to the right column, under the terminal animation and aligned with its right edge, on desktop and mobile - show the measured 94% top-10 recall and 36 ms median search in the hero proof
- GitHub retires the macos-14 runner images on November 2, 2026 and fails their jobs during scheduled brownouts, which cancelled the macOS ARM64 portability job after one second - macos-15 is the arm64 image the retirement notice recommends, so the job keeps its name and platform checks
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.
Problem
Ragmir 6.4.0 still answered too many questions its sources cannot answer when no embedding model
is configured, and its ranking left room on real repositories:
local-hash, only 12 of 90 off-topic and 1 of 110 near-domain questions were refused onthree real bases;
word, and rare function words such as "what" or "de" could rank passages on their own;
retrieval channels ranked first, and the search then returned nothing;
rgr evaluatetimed concurrent cases, so its latency read several times higher than real searches;terminal demo.
Changes
path holds words of the question gain up to 20%, ignoring words that more than half of the
passages hold. Ranking policy version 9.
weight. With
local-hash, search answers nothing when none of the first five passages holds 30%of the weighted words, or when words found nowhere in the index carry half of the question's
weight (a missing word weighs as if one passage held it). Coverage credits fuzzy matches and
identifier parts.
ingestEmbeddingDevice: "webgpu"embeds document batches on the GPU and fallsback to the CPU; queries stay on the CPU.
rgr doctorandrgr upgradename an explicitrgr ingestwhen externalextractors block automatic repairs;
rgr evaluatetakes latency from sequential warm searches.proof shows the new measurements.
llms.txt, and thebenchmark guide.
macos-14, which GitHub retires on November 2,2026 and already fails during scheduled brownouts, to
macos-15.Measured results
Ragmir 6.4.0 against this branch on the same six indexes (three real bases, each with its semantic
model and with
local-hash), two rounds, warm searches on an Apple M3 Max:local-hashThe answer ranks first more often on all six indexes. One loss:
local-hashon this repositoryfinds three fewer answers in the top 5. Ideas tested and rejected on the same indexes: file-level
rank fusion, joined query words, a test-file prior, score-based fusion, and the file path in the
embedded text.
Verification
pnpm validate: Biome, Knip, 570 Core and 27 landing tests with coverage gates, API, CLI, MCP,and public-surface smoke checks, builds, publint, and release checks
behavior, and
local-hashrefuses 2 more of the altered questionspnpm bench:competitors: Ragmir reaches the top 3 for 83 to 88% of questions, against 63% forLangChain.js and 79% for MiniSearch