Urgent.News

What's breaking now, across thousands of outlets.

Tech

How dotdotgod Query Finds Relevant Documents from a Natural-Language Question

A documentation table of contents is the fastest retrieval method when an agent knows the relevant role and path. A user's question may use different language from a document's filename, and the question and document may even be written in different human languages. dotdotgod query searches locally for document passages that are semantically close to a natural-language question and routes the…

Abstract editorial illustration

The dotdotgod query system quickly finds relevant documents from a natural-language question by leveraging the semantic relationships between the question and document passages. When the agent does not know the exact path to the relevant information, it accepts a free-form question and searches for semantically related Markdown passages within the docs/ directory.

The search corpus is defined by the load.documentationSummary.exclude policy, which excludes certain bodies such as docs/plan/ and docs/archive/ to maintain the roles of current shared documentation and local working records.

The Markdown documents are split along their heading hierarchy, with each body fragment limited to 1,600 characters and attached with path and heading information. The query system then runs the multilingual E5 model locally using the @huggingface/transformers library, converting both the question and passage into normalized 384-dimensional float32 vectors.

The model compares the semantic distance between the question and every document passage, adding a small bonus for matching words in titles and paths. This semantic proximity remains the primary signal, while explicit filename and heading matches also contribute to the final score.

The query system deduplicates results by Markdown path, ensuring that only the highest-scoring passage from each document is returned. Derived vector data is stored in a repository-specific cache, which is excluded from Git and rebuilt if damaged or incompatible with the current schema, model, or dimensions. The default human-readable output is concise, providing a chunk ID, repository-relative Markdown path, heading hierarchy, bounded body excerpt, and the original semantic-similarity score. This allows the agent to quickly review a bounded set of candidate sources for further reading.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Observer: The YouTube Subscribe Pattern

You subscribe to a YouTube channel and hit the bell. Now, whenever the creator uploads, you get notified automatically. You don't sit there refreshing every five minutes asking "new video yet?" The channel pushes the news to everyone subscribed. The channel is the thing being watched — the Subject.

UK’s state investments agency hit by data breach

Security lapse leaves sensitive information and contact details of 51 government officials exposed for 40 hours The public body in charge of the UK’s state investments has been pushed to improve its internal security after a data breach left “high-level management information” publicly accessible for nearly two days.

More from Sunday 2 August →