Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Linking Execution Trace to DatasetItem without Fetching Entire Dataset #1863

Open
marcklingen opened this issue Apr 25, 2024 Discussed in #1862 · 1 comment
Open

Comments

@marcklingen
Copy link
Member

Discussed in https://github.com/orgs/langfuse/discussions/1862

Originally posted by sfarthin April 25, 2024

Describe the feature or potential improvement

We need a method to efficiently link an execution trace to a specific DatasetItem without the need to fetch the entire dataset first. Currently, the process requires retrieving a full dataset just to access a single Dataset Item, which is not optimal for performance.

The Langfuse API currently supports creating a dataset run item and linking it with a traceId as described here: Langfuse API - Create Dataset Run Item. However, to use the link method from the SDK, one must first fetch an entire dataset to obtain a single Dataset Item.

Proposal:

Develop a feature or method within the SDK/API that allows linking a trace directly to a Dataset Item by ID, without the necessity of loading the entire dataset.

const datasetItem = await langfuseClient.getDatasetItem(datasetItem.id);
datasetItem.link(trace, 'some_run_name');

This feature would be particularly useful in scenarios where users are dealing with large datasets and need to perform operations on individual items without the overhead of loading entire datasets.

Additional information

No response

@sudhanshu746
Copy link

Hi @marcklingen , we are also in need of this feature. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants