feat(workflow): expose RAGFlow reranker in knowledge nodes - #1621
Open
whyiug wants to merge 1 commit into
Open
Conversation
Signed-off-by: whyiug <whyiug@hotmail.com>
whyiug
marked this pull request as ready for review
August 14, 2026 04:35
FenjuFu
reviewed
Aug 20, 2026
FenjuFu
left a comment
Member
There was a problem hiding this comment.
Reviewed against #650. This resolves the core request — configurable rerank for RAGFlow knowledge nodes — cleanly:
KnowledgeClient.payload()only addsragflow_ext.rerank_idwhenrag_type == "Ragflow-RAG"and the trimmed value is non-empty, so the default request payload and legacy DSL are unchanged.- The
rerankIdfield is capped at 512 chars on both theKnowledgeNodemodel and the frontend, and stale rerank config is cleared when the node switches away from Ragflow-RAG. - Frontend + backend tests are included and CI is green.
The scope note (workflow knowledge-base node only, Agent knowledge tool left for a follow-up) is reasonable and honest. Looks correct to me; merge decision is the maintainers’.
Contributor
Author
|
Thanks for reviewing this against #650 and for confirming the compatibility boundaries. I’ll keep this PR focused on the workflow |
FenjuFu
approved these changes
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RAGFlow retrieval already accepts
ragflow_ext.rerank_idin the Knowledge service, but workflow knowledge nodes had no way to configure or forward it. This PR completes that caller path for the standardknowledge-baseworkflow node.Call chain: parameter modal → workflow DSL
nodeParam.rerankId→KnowledgeNode→KnowledgeClient→/knowledge/v1/chunk/queryasragflow_ext.rerank_id.Type of Change
Related Issue
Advances #650. Builds on the Knowledge service API added in #1231.
Changes
Ragflow-RAGknowledge nodes, with Chinese and English guidance.ragflow_ext.rerank_idonly when the runtime strategy isRagflow-RAGand the value is non-empty.No console backend or database change is needed because workflow
nodeParamis stored and forwarded as JSON. This PR intentionally covers the workflowknowledge-basenode only; the Agent knowledge tool has a separate call chain and is outside this PR.Testing
Executed locally:
298 passed9 passed10 passedChunkQueryReqcontractThe repository-wide
npm run type-checkis not currently green on upstreammainbecause of pre-existing diagnostics outside this change. The new rerank helper and parameter path were checked separately, and the production build passes.Screenshots
Not included. The new field is conditional on selecting a RAGFlow knowledge base and is covered by the frontend persistence tests and production build.
Checklist
AI assistance disclosure
I used OpenAI Codex (GPT-5) to help trace the call chain and expand the regression tests. I reviewed the implementation, compatibility boundaries, and test results line by line, and I take responsibility for this contribution.