Port Python agentic search to Go (nav service, harness, tools) (#17702)

Port Python rag/advanced_rag agentic search to Go: ES-backed dataset-nav
service, agentic-search harness, and agent tools.

Includes agentic-search port plan and self-review docs.
This commit is contained in:
Zhichang Yu
2026-08-03 11:16:16 +08:00
committed by GitHub
parent 2e0dda59fc
commit 4e78f1f440
42 changed files with 5318 additions and 1444 deletions

View File

@@ -38,6 +38,7 @@ import (
dataset "ragflow/internal/service/dataset"
"ragflow/internal/service/document"
"ragflow/internal/service/file"
"ragflow/internal/service/nav"
"ragflow/internal/service/nlp"
"ragflow/internal/storage"
"ragflow/internal/syncer"
@@ -835,6 +836,16 @@ func startServer(ctx context.Context) {
compilationTemplateGroupHandler := handler.NewCompilationTemplateGroupHandler(service.NewCompilationTemplateGroupService())
datasetArtifactHandler := handler.NewDatasetArtifactHandler(service.NewDatasetArtifactService(), datasetsService, file.NewFileCommitService())
// Install the production eino-based chat invoker as the shared chat default,
// so agentic-search harness LLM calls work in production. Without this,
// chat.GetDefaultInvoker() stays nil and the harness falls back gracefully.
component.InstallDefaultChatInvoker()
// Install the dataset-nav ES-backed service (internal/service/nav +
// internal/service/nlp). The embedder resolves the tenant's embedding model
// on demand so Search/UpsertDoc can embed queries/summaries automatically.
nav.SetNavService(nlp.NewNavService(service.NewNavEmbedder(modelProviderService, "")))
// Initialize router
r := router.NewRouter(authHandler,
userHandler,