From 75116ad0a596c6658e032868e9f649d48e873acf Mon Sep 17 00:00:00 2001 From: oskar Date: Wed, 5 Aug 2026 12:32:43 +0200 Subject: [PATCH] docs(kb-retrieval): rozdzial torow embed takze w docstringu embed_batch Uzasadnienie "backfill bez fallbacku na PIHA" bylo dotad tylko w docstringu modulu. Czytelnik ogladajacy help(embed_batch) go nie widzial, a to wlasnie ta funkcja jest miejscem, w ktorym ktos moglby "uzupelnic brakujacy failover". Co-Authored-By: Claude Opus 5 (1M context) --- packages/kb-retrieval/src/kb_retrieval/embed.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/kb-retrieval/src/kb_retrieval/embed.py b/packages/kb-retrieval/src/kb_retrieval/embed.py index ff278e0..f90e459 100644 --- a/packages/kb-retrieval/src/kb_retrieval/embed.py +++ b/packages/kb-retrieval/src/kb_retrieval/embed.py @@ -108,6 +108,11 @@ async def embed_batch( indexes a vector that doesn't match the `document_chunk.embedding VECTOR(1024)` column. Transport failures propagate as `TRANSIENT_EMBED_ERRORS` -- no built-in retry (see `embed_batch_resilient`). + + No backend failover: this is the backfill path, and it must NOT fall back to Ollama@PIHA the + way `kb-query`'s `embed_router` does for online queries. ~271k chunks at PIHA's ~790 ms/embed + CPU is ~60 h on an 8 GB node shared with Home Assistant, Paperless and kb-postgres. See the + module docstring for the full argument -- the two paths are separate by decision. """ kwargs = {} if timeout_s is not None: