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

Blog: Add post on leveraging Katib for efficient RAG optimization. #161

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

varshaprasad96
Copy link
Contributor

Closes: #160

@varshaprasad96
Copy link
Contributor Author

cc: @franciscojavierarceo

Copy link
Contributor

@franciscojavierarceo franciscojavierarceo left a comment

Choose a reason for hiding this comment

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

This is so great! One small nit: can you break up the text so that there are line breaks around every 80 characters or so? It'll help comment individual sections.

@franciscojavierarceo
Copy link
Contributor

franciscojavierarceo commented Feb 22, 2025

FYI @andreyvelich we can put this under GenAI page

@varshaprasad96
Copy link
Contributor Author

I'm not able to replicate the build error locally, trying to dig into it. Looks like I maybe missing some configuration, if someone has seen this issue before, that'd be super helpful.

@franciscojavierarceo
Copy link
Contributor

@tarekabouzeid did you encounter any issues here?

@tarekabouzeid
Copy link
Member

@tarekabouzeid did you encounter any issues here?

No, i haven't.
I used make server to start the pages locally, will try to compare the 2 branches and build this one.

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you for this great blog post @varshaprasad96!
I left a few comments.
/assign @varodrig @kubeflow/wg-training-leads @Electronic-Waste @helenxie-bit @akgraner
Please help us with the review

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Thank you for this great blog post!
LGTM form my PoV

@franciscojavierarceo
Copy link
Contributor

@varshaprasad96 @andreyvelich is this ready to go?

@varshaprasad96
Copy link
Contributor Author

There is just one restructuring I need to do to make it easier from ML users perspective. Testing it right now, will push the changes in a few mins.

@varshaprasad96 varshaprasad96 force-pushed the post/rag_katib branch 3 times, most recently from 5a0b36d to 57421b9 Compare March 12, 2025 22:49
@varshaprasad96
Copy link
Contributor Author

@andreyvelich Updated with the changes to use Katib SDK, could you take a look please. Thanks!

ground_truth = "" # Example: "The Eiffel Tower is a famous landmark in Paris."

# Run the RAG pipeline with hyperparameters from Katib
bleu_score = evaluate(query, ground_truth, top_k, temperature)
Copy link
Member

@andreyvelich andreyvelich Mar 12, 2025

Choose a reason for hiding this comment

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

We should say that all imports and functions (e.g. evaluate()) should be defined under the objective function.
Similar to KFP Lightweight Python Component, the function must be self-contained: https://www.kubeflow.org/docs/components/pipelines/user-guides/components/lightweight-python-components/#python-function-requirements.

Users can also do something like this:

def objective(parameters):
  from evaluate import eval
  ....

But in that case, evaluate module should be accessible in Katib Trials.

Copy link
Contributor Author

@varshaprasad96 varshaprasad96 Mar 13, 2025

Choose a reason for hiding this comment

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

I've restructured the content to talk about the objective function a bit more clearly now

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Looks great thank you so much for the updates!
/lgtm
/assign @franciscojavierarceo @tarekabouzeid @tenzen-y @Electronic-Waste

@franciscojavierarceo
Copy link
Contributor

/lgtm
/approve
🚀🚀🚀🚀🚀🚀🚀🚀

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: franciscojavierarceo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [franciscojavierarceo]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 43201a7 into kubeflow:master Mar 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create blogpost on optimising RAG Pipelines with Kubeflow Katib
6 participants