Tencent/WeKnora · error
failed to index summary chunk: %w
Error message
failed to index summary chunk: %w
What it means
Thrown when retrieveEngine.BatchIndex fails to embed and write the summary chunk into the vector store. The chunk row exists in the DB but is not retrievable; typically embedding-provider or vector-store failure.
Source
Thrown at internal/application/service/knowledge_process.go:1365
logger.Errorf(ctx, "Failed to get embedding model: %v", err)
summaryErr = err
return fmt.Errorf("failed to get embedding model: %w", err)
}
indexInfo := []*types.IndexInfo{{
Content: summaryChunk.Content,
SourceID: summaryChunk.ID,
SourceType: types.ChunkSourceType,
ChunkID: summaryChunk.ID,
KnowledgeID: knowledge.ID,
KnowledgeBaseID: knowledge.KnowledgeBaseID,
IsEnabled: true,
}}
if err := retrieveEngine.BatchIndex(ctx, embeddingModel, indexInfo); err != nil {
logger.Errorf(ctx, "Failed to index summary chunk: %v", err)
summaryErr = err
return fmt.Errorf("failed to index summary chunk: %w", err)
}
logger.Infof(ctx, "Successfully created and indexed summary chunk for knowledge: %s", payload.KnowledgeID)
summaryOut["summary_chunk_indexed"] = true
}
logger.Infof(ctx, "Successfully generated summary for knowledge: %s", payload.KnowledgeID)
summaryOut["status"] = "completed"
return nil
}
// ProcessQuestionGeneration handles async question generation task. It
// dispatches between the batched fan-out path (current: one task per window of
// text chunks, payload.ChunkIDs set) and the legacy whole-knowledge path (kept
// for tasks enqueued before fan-out shipped, no chunk ids). A lone ChunkID
// (from an interim per-chunk build) is treated as a one-element batch.
func (s *knowledgeService) ProcessQuestionGeneration(ctx context.Context, t *asynq.Task) (retErr error) {
var payload types.QuestionGenerationPayloadView on GitHub (pinned to 988cbb0330)
Solutions
- Check embedding provider and vector store health/quotas
- Verify the summary content does not exceed embedding input limits
- Retry summary regeneration; indexing is re-attempted end-to-end
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/application/service/knowledge_process.go:1365 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/7d03b9ccd0b68bbb.
Report an issue: GitHub.