-
Notifications
You must be signed in to change notification settings - Fork 140
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
Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) #1195
Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) #1195
Conversation
enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai>
Thanks for the quick action. Github CI failed, is this PR ready for review? |
Oh I didn't spot the issue with the code coverage when I built locally. It's definitely ready for review so I would really appreciate it if you could take a look and provide feedback especially around the placement of the code components and how this fits into ml-commons. I'll address code coverage in the meantime. Thanks in advance! |
Signed-off-by: Austin Lee <austin@aryn.ai>
This seems unrelated to my changes. |
...va/org/opensearch/searchpipelines/questionanswering/generative/GenerativeSearchResponse.java
Outdated
Show resolved
Hide resolved
This PR will add search pipeline processor to ml-commons. I know @navneet1v built some PoC for search pipeline processor in neural-search plugin. I think that's a better place to hold these processors as they are more related with search part. @navneet1v Do you have any suggestion on this? Can you also help review this PR? I think there are some overlap with your PoC of summarization and QA processor. |
RAG is not tied to neural (knn) searches, though. |
@austintlee I understand RAG is not tied up to K-NN. But from a use-case and cohesiveness of the features is what @ylwu-amzn want to say its better suited to host this feature in Neural Search plugin. The way I think about ML-Commons as a plugin is providing core components/features to do ML related workloads and Neural Search plugin uses the capabilities of ML Plugin to improve Search example is in Semantic Search we used ML predict API to convert text to embeddings during ingestion and Query time. Now on your code as you are adding a processors which is mainly going to be used in Search(as you are using a Search Pipeline) I think we should move this feature to Neural Plugin. I am open to suggestion. @ylwu-amzn , @austintlee Please add your thoughts. If we want to continue this discussion on RFC I am happy to do that. |
@navneet1v I disagree. The example of text embeddings makes perfect sense for the neural search plugin (NSP). But the scope and use cases for RAG extend beyond what I think we want for the NSP. I don't think we disagree on this point. I definitely see where you are coming from and yes, RAG is closely associated with semantic search, but I just do not think that conceptually, it belongs in the NSP. Using the same analogy you made, I can also make the case that just as Search Pipeline in OpenSearch core comes with default search processors (filter, script, etc), we can have RAG search processors that come with ML core (ml-commons). We are really debating how "core" this component is in the grand scheme of things. If you have not, please take a look at the discussion we had in #1150 where we suggest to put this functionality in ml-commons and the outcome of that discussion is the "feature/conversation" feature branch and this PR and #1196 .
Again, "search" is really what we are all about. That's the core. Everything else exists to make search better, no? |
I was not aware of the big scope of changes that are happening. I have to read this in more details and get back to you. |
I read the proposal and will directly add comments on the RFC. |
@navneet1v @jngz-es @ylwu-amzn Could we get some traction on this PR please? Thanks! |
@austintlee I'll spend sometime today and tomorrow to review this one and #1196 |
@saratvemulapalli @ylwu-amzn @navneet1v I would really appreciate some feedback on this PR. I have more PRs that depend on this. Thank you. |
@austintlee , we just backported some bug fix from 2.9 branch to 2.x branch. Can you help sync 2.x branch to |
Henry took care of the sync. I will rebase and update this PR. |
Signed-off-by: Austin Lee <austin@aryn.ai>
In the latest commit, I removed use of MachineLearningClient (from opensearch-ml-client) in opensearch-ml-search-processors. With this dependency removed, all build issues with publishToMavenLocal and jarHell are gone. Thanks @reta for your help. |
Signed-off-by: Austin Lee <austin@aryn.ai>
Codecov Report
@@ Coverage Diff @@
## feature/conversation #1195 +/- ##
==========================================================
- Coverage 79.04% 78.86% -0.19%
- Complexity 2148 2190 +42
==========================================================
Files 172 186 +14
Lines 8672 8870 +198
Branches 870 885 +15
==========================================================
+ Hits 6855 6995 +140
- Misses 1422 1466 +44
- Partials 395 409 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Austin Lee <austin.t.lee@gmail.com>
Force merge first to unblock you. We may need another round of review and get two approvals when merge to 2.x. |
… enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com>
… enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com>
… enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com>
… enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com>
… enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com>
* Conversational Memory for GenAI Apps (#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per #1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com>
* Conversational Memory for GenAI Apps (#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per #1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com> (cherry picked from commit 1112612)
* Conversational Memory for GenAI Apps (#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per #1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com> (cherry picked from commit 1112612) Co-authored-by: HenryL27 <hmlindeman@yahoo.com>
* Conversational Memory for GenAI Apps (opensearch-project#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per opensearch-project#1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (opensearch-project#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (opensearch-project#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (opensearch-project#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com>
* Conversational Memory for GenAI Apps (opensearch-project#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per opensearch-project#1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (opensearch-project#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (opensearch-project#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (opensearch-project#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (opensearch-project#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com> (cherry picked from commit 1112612) Signed-off-by: HenryL27 <hmlindeman@yahoo.com>
* Feature/conversation backport to 2.x (#1286) * Conversational Memory for GenAI Apps (#1196) * moved code over Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * added actions to MLPlugin; fixed io lib stuff Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fixed copyrights again Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fix nullptr exception in .equals Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * preserve thread context across action calls Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove MissingResourceException from CreatInteractionRequest in favor of IOException Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * move ConversationMet, Interaction, and Constants to common/conversational Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Sequentialize createInteraction to remove data race Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * allow disorder when conversations have same timestamp Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * lombokify Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add some unit testing Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Increase unit test coverage Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix naming Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * finish code coverage for actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Leave null values out of XContent per #1196 (comment) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Add integration tests for rest actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Complete unit testing for Index classes Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * update build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Finish unit tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Fail closed on missing convo access Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * address code review/walkthrough comments Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add prompt temlplate and metadata fields at interaction level Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * parse request body, not params, for post requests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * restructure with memory as higher-level term Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up build.gradle Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * change interaction field names timestamp -> create_time metadata -> additional_info Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix GetInteractionsResponse xcontent tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * propagate name change to variables and parameters Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean logging and fix typos Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix final convtructor according to find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * append plugin-ml- to index names Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Feature/conversation memory feature flag (#1271) * add feature flag and checks to transport actions Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * add feature flag tests Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix typos for real with find-and-replace Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * rename conversational-memory directory to memory Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix settings.gradle with new dir name Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * re-add feature flag checks and tests to transport layer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix feature flag with updateConsumer Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * remove redundant settings update Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * clean up feature var initialization to avoid unchecked conversion warning Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1195) * Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG) (#1150) Signed-off-by: Austin Lee <austin@aryn.ai> * Address test coverage. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix/update imports due to changes coming from core. Signed-off-by: Austin Lee <austin@aryn.ai> * Update license header. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Use List for context fields so we can pull contexts from multiple fields when constructing contexts for LLMs. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Update README. Signed-off-by: Austin Lee <austin@aryn.ai> * Fix ml-client shadowJar implicit dependency issue. Signed-off-by: Austin Lee <austin@aryn.ai> * Add a wrapper client for ML predict. Signed-off-by: Austin Lee <austin@aryn.ai> * Add tests for the internal ML client. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * [Feature] Add Retrieval Augmented Generation search processors (#1275) * Put RAG pipeline behind a feature flag. Signed-off-by: Austin Lee <austin@aryn.ai> * Add support for chat history in RAG using the Conversational Memory API Signed-off-by: Austin Lee <austin@aryn.ai> * Fix spotless Signed-off-by: Austin Lee <austin@aryn.ai> * Fix RAG feature flag enablement. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments and suggestions. Signed-off-by: Austin Lee <austin@aryn.ai> * Address comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add unit tests for MachineLearningPlugin Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * Allow RAG pipeline feature flag to be enabled and disabled dynamically (#1293) * Allow RAG pipeline feature flag to be enabled and disabled dynamically. Signed-off-by: Austin Lee <austin@aryn.ai> * Address review comments. Signed-off-by: Austin Lee <austin@aryn.ai> * Add negative test cases for RAG feature flag being turned off. Signed-off-by: Austin Lee <austin@aryn.ai> * Improve error checking. Signed-off-by: Austin Lee <austin@aryn.ai> --------- Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * apply spotless Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com> (cherry picked from commit 1112612) Signed-off-by: HenryL27 <hmlindeman@yahoo.com> * fix http library version Signed-off-by: HenryL27 <hmlindeman@yahoo.com> --------- Signed-off-by: HenryL27 <hmlindeman@yahoo.com> Signed-off-by: Austin Lee <austin@aryn.ai> Signed-off-by: Austin Lee <austin.t.lee@gmail.com> Co-authored-by: Austin Lee <austin.t.lee@gmail.com>
Description
Use Search Pipeline processors, Remote Inference and HttpConnector to enable Retrieval Augmented Generation (RAG)
Issues Resolved
#1150
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.