Skip to content

Ground answers on fetched page content, not just search snippets #2191

Description

@felladrin

Surfaced by a role-based review; verified against current code.

Problem: The entire RAG context is built from SearXNG [title, snippet, url] tuples (getFormattedSearchResults emits • [title](url) | snippet). No page body is ever fetched, so the model reasons over 1-2 sentence fragments — the single biggest ceiling on answer quality and a main driver of hallucination, since it's asked to cite facts it can only infer from snippets.

Fix: Add an optional content-fetch + extraction step (e.g. @mozilla/readability + sanitizer) for the top-N reranked URLs, chunk to a token budget, and feed extracted passages into the prompt. Gate behind a setting for the privacy/self-host story.

Files: server/searchEndpointServerHook.ts, server/webSearchService.ts, client/modules/textGenerationUtilities.ts, client/modules/textGeneration.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions