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

Add documentation for default use cases #6767

Merged
merged 13 commits into from
Mar 29, 2024

Conversation

amitgalitz
Copy link
Member

Description

opensearch-project/flow-framework#496 added default use cases to the flow framework plugin through substitution, this is a follow up for our substitution param PR we had.

nit: currently links in default link are all set to same link, will update to correct links but rest is ready for review

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

nav_order: 10
---

# Default Use Cases
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest a more meaningful name for the topic. Workflow templates? Sample workflows?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed name to Default Workflows

@hdhalter hdhalter added v2.13.0 release-notes PR: Include this PR in the automated release notes 2 - In progress Issue/PR: The issue or PR is in progress. labels Mar 21, 2024
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

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

Some styling and consistency suggestions, and one suggestion to make it easier for users to know the required params needed for the different use cases. Overall looking good!

_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
_automating-configurations/default-use-cases.md Outdated Show resolved Hide resolved
@kolchfa-aws kolchfa-aws self-assigned this Mar 22, 2024
@kolchfa-aws
Copy link
Collaborator

Thank you for providing the PR, @amitgalitz! After you are done with the tech review, please let me know and I will do a doc review on the PR. Thanks!

@owaiskazi19
Copy link
Member

Linking opensearch-project/flow-framework#541 to this PR.

@amitgalitz amitgalitz force-pushed the default-params branch 6 times, most recently from 188cd5b to 4b8958f Compare March 28, 2024 02:23
@amitgalitz
Copy link
Member Author

For the table headers I made the fix required by style check but style check is persisting there. Also for the openai comment, this is already set to openai in code for use_case so can't be changed to OpenAi. Also all use cases should be all lower case.

Signed-off-by: Amit Galitzky <[email protected]>
Signed-off-by: Amit Galitzky <[email protected]>
@hdhalter hdhalter added 4 - Doc review PR: Doc review in progress and removed 2 - In progress Issue/PR: The issue or PR is in progress. labels Mar 28, 2024
Signed-off-by: Fanit Kolchina <[email protected]>
kolchfa-aws and others added 5 commits March 28, 2024 16:35
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@amitgalitz @kolchfa-aws Please see my comments and changes and let me know if you have any questions. Thanks!

_automating-configurations/api/create-workflow.md Outdated Show resolved Hide resolved
_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved
_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved
_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved

- Deploys the default pretrained sparse encoding model (`amazon/neural-sparse/opensearch-neural-sparse-encoding-v1`)
- Creates an ingest pipeline that contains a `sparse_encoding` processor, which converts the text in a document field to vector embeddings using the deployed model
- Creates a sample index for sparse search, specifying the default pipeline as the newly created ingest pipeline
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know I initially said no periods here, but once the fragments become complex/lengthy, as the second two are, then periods are preferred.

| `openai_chat_model_deploy` | Creates and deploys an OpenAI chat model (by default, `gpt-3.5-turbo`). | `create_connector.credential.key` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/openai-chat-defaults.json) |
| `local_neural_sparse_search_bi_encoder` | Configures [neural sparse search]({{site.url}}{{site.baseurl}}/search-plugins/neural-sparse-search/): <br> - Deploys a pretrained sparse encoding model<br> - Creates an ingest pipeline with a sparse encoding processor <br> - Creates a sample index to use for sparse search, specifying the newly created pipeline as default pipeline | None |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/local-sparse-search-biencoder-defaults.json) |
| `semantic_search` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/): <br> - Creates an ingest pipeline with a `text_embedding` processor and a k-NN index <br> You must provide a model ID of the text embedding model to use. | `create_ingest_pipeline.model_id` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/semantic-search-defaults.json) |
| `semantic_search_with_query_enricher` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/) similarly to the `semantic_search` template. Adds a [`query_enricher`]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/neural-query-enricher/) search processor that sets a default model ID is defaulted for neural queries. You must provide a model ID of the text embedding model to use. | `create_ingest_pipeline.model_id` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/semantic-search-query-enricher-defaults.json) |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not following "search processor that sets a default model ID is defaulted for neural queries".

| `semantic_search` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/): <br> - Creates an ingest pipeline with a `text_embedding` processor and a k-NN index <br> You must provide a model ID of the text embedding model to use. | `create_ingest_pipeline.model_id` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/semantic-search-defaults.json) |
| `semantic_search_with_query_enricher` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/) similarly to the `semantic_search` template. Adds a [`query_enricher`]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/neural-query-enricher/) search processor that sets a default model ID is defaulted for neural queries. You must provide a model ID of the text embedding model to use. | `create_ingest_pipeline.model_id` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/semantic-search-query-enricher-defaults.json) |
| `semantic_search_with_cohere_embedding` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/) and deploys a Cohere embedding model. You must provide the API key for the Cohere model. | `create_connector.credential.key` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/cohere-embedding-semantic-search-defaults.json) |
| `semantic_search_with_cohere_embedding_query_enricher` | Configures [semantic search]({{site.url}}{{site.baseurl}}/search-plugins/semantic-search/) and deploys a Cohere embedding model. Adds a [`query_enricher`]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/neural-query-enricher/) search processor that sets a default model ID is defaulted for neural queries. You must provide the API key for the Cohere model. | `create_connector.credential.key` |[Defaults](https://github.com/opensearch-project/flow-framework/blob/2.13/src/main/resources/defaults/cohere-embedding-semantic-search-with-query-enricher-defaults.json) |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved
_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved
_automating-configurations/workflow-templates.md Outdated Show resolved Hide resolved
@hdhalter hdhalter added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels Mar 29, 2024
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
kolchfa-aws and others added 2 commits March 29, 2024 11:35
Signed-off-by: Fanit Kolchina <[email protected]>
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you, @amitgalitz!

@kolchfa-aws kolchfa-aws merged commit acdcc05 into opensearch-project:main Mar 29, 2024
3 checks passed
@hdhalter hdhalter added 3 - Tech review PR: Tech review in progress 3 - Done Issue is done/complete and removed 3 - Tech review PR: Tech review in progress 5 - Editorial review PR: Editorial review in progress labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Done Issue is done/complete release-notes PR: Include this PR in the automated release notes v2.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants