Skip to content

WorldModelRAG.ingest embeds one document at a time #788

Closed

Description

@AmitoVrito

Location: src/synapsekit/retrieval/world_model.py:1077-1085

Problem: The loop calls await add([text],[meta]) once per document, so a 10k-doc reindex issues 10k separate embedding calls / API round-trips.

Fix: collect texts/metadata and call add(texts, metas) once per batch (embedding backends are batched).

Severity: High (performance). Found in production-readiness audit.

Activity

  1. added
    bug
    performance
    on Jul 14, 2026
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

    bugperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions