Skip to content

Bug: knowledge search can be dead for every org with no operator-visible signal #2988

Closed

Description

@Israeltheminer

What happened

On a self-hosted deployment, no organization had an embedding model configured. Knowledge search had therefore never worked — documents and crawled pages could not be searched at all.

Nothing reported it. Not a log line, not a badge, not an alert. The only channel in the entire system that surfaced the outage was the chat assistant improvising an explanation to an end user mid-conversation:

I'm unable to search your organization's documents and web pages at the moment due to a configuration issue with the knowledge base.

The user who received that reasonably read it as a product fault. Diagnosing it required source access and several hours.

Why nothing was logged

convex/chat/assistant_tools.ts, the rag_search corpora leg:

} catch (error) {
  // No embedding model / unusable corpus — degraded, said out loud.
  sources.documents = `unavailable: ${clip(describeError(error), 200)}`;
  sources.webPages = sources.documents;
}

"Said out loud" means to the model. There is no console.warn, so an operator grepping logs finds nothing. The tool still returns status: 'ok', and the remaining legs (knowledge entries, contacts, products, websites) are plain Convex reads that succeed — which is why the answer looks partially healthy.

The raw Error.message is also relayed verbatim into the model's context, which is how internal configuration prose reaches an end user.

Second problem: the remedy points at a page that does not exist

The sandbox lane's equivalent (convex/node_only/sandbox/workspace_tools_bridge.ts) tells operators:

Ask the user to set it up under Settings → Knowledge.

There is no Settings → Knowledge. The embedding configuration lives under Settings → Data residency.

Third problem: fixing it does not fix it

Configuring an embedding model does not re-queue documents that failed for want of one. Every document that failed while unconfigured stays failed, and the only remedy is knowing to retry each one by hand. The error text instructs the operator to "Configure one … before using knowledge" — following that instruction exactly leaves them no better off.

Expected

  • An organization with knowledge unconfigured, or whose corpora are unreachable, is visible to an admin without opening a document — an org-level knowledge-health signal. The per-document machinery already exists (app/features/documents/components/embedding-settings-action.tsx, the rag.dialog.failed.embeddingNotConfigured.* copy); it needs an org-level home.
  • The degraded path emits a console.warn with the real error.
  • The model receives a stable, non-leaking message naming the remedy — not a raw Error.message.
  • Every reference to "Settings → Knowledge" is corrected to the real location.
  • Saving an embedding config re-queues documents that failed because none was configured. retryRagIndexing and promoteQueuedRagJobs already exist; the save handler needs to enumerate the affected rows and push them through.

Related

Activity

  1. aakusch commented on Aug 23, 2026

    @aakusch

    Your report that a self-hosted organization's knowledge search was completely unavailable—with no
    operator signal and several hours of source-level diagnosis—is unusually concrete. I'm testing a
    narrow research question: on a real private-document task, does a local retrieval layer improve
    the outcome over the strongest native document workflow when both receive the same files? I am
    not proposing a deployment or asking for data. Would you, or the affected workflow owner, be open
    to a 25-minute problem interview about that incident, the corpus shape, and the best existing
    alternative? If the issue fix fully resolves it, that no-fit result is useful too.

  2. Israeltheminer commented on Sep 4, 2026

    @Israeltheminer
    ContributorAuthor

    Working through this one ask at a time. Three of the five were already done on main, verified by reading the live path:

    • console.warn on the degraded path — assistant_tools.ts logs the real error with the org id.
    • A stable, non-leaking message for the model — KNOWLEDGE_UNAVAILABLE_FOR_MODEL, which names Settings → Data residency rather than relaying Error.message.
    • "Settings → Knowledge" corrected — the sandbox bridge now carries a note saying that page does not exist.

    Re-queue on save is #3218, open now.

    The org-level knowledge-health signal is the one left. Still no knowledgeHealth-style surface anywhere in app/ or backend/domains/, so an org whose knowledge is unconfigured is still invisible to an admin until someone opens a document.

  3. yannickmonney commented on Sep 27, 2026

    @yannickmonney
    Contributor

    Fixed: all five asks hold at v0.5.58. The degraded path logs a warning and gives the model a stable, non-leaking message, the "Settings → Knowledge" pointer is corrected, saving re-queues (#3218, fe27bd3), and admins see a dashboard banner when no embedding model is configured (embedding-setup-banner.tsx, 11d390d under #3289). Not covered: an unreachable bring-your-own knowledge database still has no in-app admin signal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: highservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions