feat: Add comprehensive documentation for WeKnora knowledge base and wiki features
- Introduced multiple new documentation files, including a complete documentation index, quick reference guides, and comprehensive analyses of the knowledge base and wiki settings. - The new files provide detailed insights into the architecture, data models, API endpoints, and implementation strategies for the knowledge base and wiki functionalities. - Enhanced navigation and usability for developers and team members by summarizing key components, configurations, and data flows related to the knowledge base system. These additions significantly improve the clarity and accessibility of documentation, supporting better onboarding and reference for current and future team members.
This commit is contained in:
@@ -105,11 +105,15 @@ func (s *KnowledgePostProcessService) Handle(ctx context.Context, task *asynq.Ta
|
||||
// 4. Spawn Summary and Question Tasks
|
||||
if len(textChunks) > 0 {
|
||||
s.enqueueSummaryGenerationTask(ctx, payload)
|
||||
s.enqueueQuestionGenerationIfEnabled(ctx, payload, kb)
|
||||
// Question generation only makes sense for RAG indexing (improves chunk recall).
|
||||
// Skip when only Wiki/Graph is enabled without vector/keyword search.
|
||||
if kb.NeedsEmbeddingModel() {
|
||||
s.enqueueQuestionGenerationIfEnabled(ctx, payload, kb)
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Spawn Graph RAG Tasks
|
||||
if kb.ExtractConfig != nil && kb.ExtractConfig.Enabled {
|
||||
// 5. Spawn Graph RAG Tasks — only when graph indexing is enabled in IndexingStrategy
|
||||
if kb.IsGraphEnabled() {
|
||||
logger.Infof(ctx, "[KnowledgePostProcess] Spawning Graph RAG extract tasks for %d text-like chunks", len(textChunks))
|
||||
for _, chunk := range textChunks {
|
||||
err := NewChunkExtractTask(ctx, s.taskEnqueuer, payload.TenantID, chunk.ID, kb.SummaryModelID)
|
||||
@@ -119,8 +123,8 @@ func (s *KnowledgePostProcessService) Handle(ctx context.Context, task *asynq.Ta
|
||||
}
|
||||
}
|
||||
|
||||
// 6. Spawn Wiki Ingest Task if wiki is enabled and auto ingest is enabled
|
||||
if kb.IsWikiEnabled() && kb.WikiConfig.AutoIngest && len(textChunks) > 0 {
|
||||
// 6. Spawn Wiki Ingest Task if wiki indexing is enabled in IndexingStrategy and auto ingest is on
|
||||
if kb.IndexingStrategy.WikiEnabled && kb.WikiConfig != nil && kb.WikiConfig.AutoIngest && len(textChunks) > 0 {
|
||||
EnqueueWikiIngest(ctx, s.taskEnqueuer, s.redisClient, payload.TenantID, payload.KnowledgeBaseID, payload.KnowledgeID)
|
||||
logger.Infof(ctx, "[KnowledgePostProcess] Enqueued wiki ingest task for %s", payload.KnowledgeID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user