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

Update hybrid search pipeline. #339

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mathewjordan
Copy link
Member

@mathewjordan mathewjordan commented Jun 21, 2024

I'm unsure if I am doing this correctly. The NEXT_PUBLIC_OPENSEARCH_PIPELINE was always undefined and I'm not sure what it should have been leaning on for me so I have rewritten this a bit.

if (!!body?.query?.hybrid) {
  requestUrl.searchParams.append(
    "search_pipeline",
    "dc-v2-work-pipeline"
  );
}

Seems to do the trick... is there a reason we would want this to be an environmental variable?

image

@mathewjordan mathewjordan self-assigned this Jun 21, 2024
@mathewjordan mathewjordan marked this pull request as ready for review June 21, 2024 15:23
Copy link
Contributor

@mbklein mbklein left a comment

Choose a reason for hiding this comment

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

👍🏻 The pipeline will fail (with an error) if applied to a non-hybrid query, so this is the correct and necessary way to do it. I thought of something else last night, but it's an improvement for another day.

@mathewjordan mathewjordan merged commit a881800 into preview/chat-integration Jun 21, 2024
1 check passed
@mathewjordan mathewjordan deleted the update-hybrid-query branch June 21, 2024 15:33
@adamjarling
Copy link
Contributor

adamjarling commented Jun 21, 2024

@mathewjordan @mbklein The pipeline variable NEXT_PUBLIC_OPENSEARCH_PIPELINE should be pulling through ok. I updated this a few weeks back in https://github.com/nulib/miscellany, and I thought I posted in Slack for folks to pull the latest miscellany (but apparently I just messaged Karen for some reason). Sorry 😀

https://github.com/nulib/miscellany/blob/479111a2f17ed45fe2e975e256a0d61a0c28ebee/secrets/dev_environment.sh#L36

@mbklein
Copy link
Contributor

mbklein commented Jun 21, 2024

@adamjarling Yeah, configuring it using a variable is a good plan, but it's also important only to use it for hybrid queries. It'll break regular ones.

@adamjarling
Copy link
Contributor

@mbklein Yep, that should be how's it wired up, to only send ?search_pipeline if doing hybrid (AI) querying.

@mathewjordan
Copy link
Member Author

Oh, well, we need to revert things. Ahhh.

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.

3 participants