Tencent/WeKnora · error
graph extraction not configured
Error message
graph extraction not configured
What it means
Graph query configuration guard: the knowledge base loaded successfully but its ExtractConfig is nil or defines no nodes and no relations, meaning graph extraction was never configured/enabled for this KB, so a knowledge-graph query over it cannot produce meaningful results and is rejected per-KB.
Source
Thrown at internal/agent/tools/query_knowledge_graph.go:179
for _, kbID := range input.KnowledgeBaseIDs {
wg.Add(1)
go func(id string) {
defer wg.Done()
// Get knowledge base to check graph configuration
kb, err := t.knowledgeService.GetKnowledgeBaseByIDOnly(ctx, id)
if err != nil {
mu.Lock()
kbResults[id] = &graphQueryResult{kbID: id, err: fmt.Errorf("failed to get knowledge base: %v", err)}
mu.Unlock()
return
}
// Check if graph extraction is enabled
if kb.ExtractConfig == nil || (len(kb.ExtractConfig.Nodes) == 0 && len(kb.ExtractConfig.Relations) == 0) {
mu.Lock()
kbResults[id] = &graphQueryResult{kbID: id, err: fmt.Errorf("graph extraction not configured")}
mu.Unlock()
return
}
// Query graph
results, err := t.knowledgeService.HybridSearch(ctx, id, searchParams)
if err != nil {
mu.Lock()
kbResults[id] = &graphQueryResult{kbID: id, kb: kb, err: fmt.Errorf("query failed: %v", err)}
mu.Unlock()
return
}
if t.scopeEnforced {
results, err = filterSearchResultsInSearchTargets(
ctx, t.searchTargets, id, results, t.scopeKnowledgeService,
)
if err != nil {
mu.Lock()View on GitHub (pinned to 988cbb0330)
Solutions
- Configure ExtractConfig with nodes/relations for the knowledge base
- Run graph extraction on the KB's documents first
- Skip unconfigured KBs with a warning instead of an error when others remain
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/agent/tools/query_knowledge_graph.go:179 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/f423729af12f4faf.
Report an issue: GitHub.