Retrieval fusion and bug fixes#398
Merged
ianarawjo merged 3 commits intoianarawjo:ragforgefrom Nov 12, 2025
Merged
Conversation
dxa204
commented
Nov 10, 2025
- Implemented fusion functionality for retrieval methods (RRF and Weighted Average)
- Fixed method duplication bug in the chunk and retrieval nodes. (2), (3), etc. now appear next to duplicates
- Added an example flow about a book
- Amended the chainforge-docs example flow with RAGAS evaluators
- Moved 'chunkMethod' from metavars to normal variables so it shows up as a column in the inspector
ianarawjo
reviewed
Nov 10, 2025
chainforge/flask_app.py
Outdated
| return it["obj"] | ||
| return None | ||
|
|
||
| def weighted_avg_fuse(method_lists, weights_by_method=None, norm="rank", rank_c=60): |
Owner
There was a problem hiding this comment.
Move these rank fusion methods to the rerank.py file and import them for use here.
ianarawjo
reviewed
Nov 10, 2025
| }; | ||
|
|
||
| // labels | ||
| const methodLabels = groupMethods.map(m => m.settings?.shortName || m.methodName); |
ianarawjo
reviewed
Nov 10, 2025
| })); | ||
| }, [methodLabels, group.fusionSettings?.weights]); | ||
|
|
||
| const [weightsDraftObj, setWeightsDraftObj] = React.useState<Record<string, string>>(() => weightsFormData as any); |
Owner
There was a problem hiding this comment.
Remove React. preface for these things because you're importing useState and useMemo, etc, verbatim
ianarawjo
reviewed
Nov 10, 2025
| onChange={(e) => onSettingsUpdate(e.formData)} | ||
| > | ||
| <Button type="submit" style={{ display: "none" }} /> | ||
| </Form> |
Owner
There was a problem hiding this comment.
Try to go back to using RJSFSchema for this task, see Chunk Node etc for an idea of usage.
ianarawjo
reviewed
Nov 10, 2025
| variant="subtle" | ||
| color="green" | ||
| onClick={onLink} | ||
| onClick={(e) => { e.preventDefault(); e.stopPropagation(); onLink(); }} |
ianarawjo
reviewed
Nov 10, 2025
|
|
||
| // Fusion // wire to the Fusion button | ||
| const [linkedGroups, setLinkedGroups] = useState<LinkedMethodGroup[]>([]); | ||
| const fusionOn = (linkedGroups?.length ?? 0) > 0; |
Owner
There was a problem hiding this comment.
Should be useMemo, OR consider moving this into the function(s) that use it because its very simple.
ianarawjo
reviewed
Nov 10, 2025
Owner
There was a problem hiding this comment.
Open zip files to cut down on the size, remove extraneous media files.
… flows, and build fusion modal using RJSF
gauranshkumar
pushed a commit
to gauranshkumar/ChainForge
that referenced
this pull request
Nov 12, 2025
* Retrieval fusion and bug fixes * Polish the Fusion functionality, reduce the file sizes of the example flows, and build fusion modal using RJSF * Small fix
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.