Skip to content

Retrieval fusion and bug fixes#398

Merged
ianarawjo merged 3 commits intoianarawjo:ragforgefrom
dxa204:ragforge
Nov 12, 2025
Merged

Retrieval fusion and bug fixes#398
ianarawjo merged 3 commits intoianarawjo:ragforgefrom
dxa204:ragforge

Conversation

@dxa204
Copy link

@dxa204 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

return it["obj"]
return None

def weighted_avg_fuse(method_lists, weights_by_method=None, norm="rank", rank_c=60):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these rank fusion methods to the rerank.py file and import them for use here.

};

// labels
const methodLabels = groupMethods.map(m => m.settings?.shortName || m.methodName);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be useMemo

}));
}, [methodLabels, group.fusionSettings?.weights]);

const [weightsDraftObj, setWeightsDraftObj] = React.useState<Record<string, string>>(() => weightsFormData as any);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove React. preface for these things because you're importing useState and useMemo, etc, verbatim

onChange={(e) => onSettingsUpdate(e.formData)}
>
<Button type="submit" style={{ display: "none" }} />
</Form>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to go back to using RJSFSchema for this task, see Chunk Node etc for an idea of usage.

variant="subtle"
color="green"
onClick={onLink}
onClick={(e) => { e.preventDefault(); e.stopPropagation(); onLink(); }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra stuff here


// Fusion // wire to the Fusion button
const [linkedGroups, setLinkedGroups] = useState<LinkedMethodGroup[]>([]);
const fusionOn = (linkedGroups?.length ?? 0) > 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be useMemo, OR consider moving this into the function(s) that use it because its very simple.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open zip files to cut down on the size, remove extraneous media files.

@ianarawjo ianarawjo merged commit 3c07ba2 into ianarawjo:ragforge Nov 12, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants