Skip to content

Commit

Permalink
Final wording updates (#589) (#590)
Browse files Browse the repository at this point in the history
(cherry picked from commit bcf5156)

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4362a1a commit 8b95d4a
Show file tree
Hide file tree
Showing 39 changed files with 300 additions and 235 deletions.
44 changes: 24 additions & 20 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ export const UI_METADATA_SCHEMA_VERSION = 1;

// frontend-specific workflow types, derived from the available preset templates
export enum WORKFLOW_TYPE {
SEMANTIC_SEARCH = 'Semantic search',
MULTIMODAL_SEARCH = 'Multimodal search',
HYBRID_SEARCH = 'Hybrid search',
RAG = 'Retrieval-augmented generation',
VECTOR_SEARCH_WITH_RAG = 'Vector search with retrieval-augmented generation',
CUSTOM = 'Custom',
SEMANTIC_SEARCH = 'Semantic Search',
MULTIMODAL_SEARCH = 'Multimodal Search',
HYBRID_SEARCH = 'Hybrid Search',
RAG = 'RAG with Lexical Retrieval',
VECTOR_SEARCH_WITH_RAG = 'RAG with Vector Retrieval',
CUSTOM = 'Custom Search',
UNKNOWN = 'Unknown',
}
// If no datasource version is found, we default to 2.17.0
Expand Down Expand Up @@ -579,43 +579,46 @@ export enum TRANSFORM_CONTEXT {
OUTPUT = 'output',
}
export enum TRANSFORM_TYPE {
STRING = 'String',
FIELD = 'Field',
EXPRESSION = 'JSONPath Expression',
STRING = 'Custom string',
FIELD = 'Data field',
EXPRESSION = 'JSONPath expression',
TEMPLATE = 'Prompt',
}

export const INPUT_TRANSFORM_OPTIONS = [
{
id: TRANSFORM_TYPE.FIELD,
description: 'Map an existing field from your data.',
description:
'Use an existing field from your data as the model input field.',
},
{
id: TRANSFORM_TYPE.EXPRESSION,
description: 'Extract data before mapping to the input field.',
description:
'Extract data from a JSON structure and map the extracted data to the model input field.',
},
{
id: TRANSFORM_TYPE.TEMPLATE,
description: 'Configure a prompt and map to the input field.',
description: 'Configure a prompt to map data to the model input field.',
},
{
id: TRANSFORM_TYPE.STRING,
description: 'Declare a string to the input field.',
description: 'Use a custom string in the model input field.',
},
];

export const OUTPUT_TRANSFORM_OPTIONS = [
{
id: TRANSFORM_TYPE.FIELD,
description: 'Map an existing field from your data.',
id: NO_TRANSFORMATION,
description: '',
},
{
id: TRANSFORM_TYPE.EXPRESSION,
description: 'Extract data before mapping to the input field.',
id: TRANSFORM_TYPE.FIELD,
description: 'Copy the model output into a new document field.',
},
{
id: NO_TRANSFORMATION,
description: 'Leave the output field as-is.',
id: TRANSFORM_TYPE.EXPRESSION,
description:
'Extract data from a JSON structure and map the extracted data to a new document field.',
},
];

Expand Down Expand Up @@ -647,6 +650,7 @@ export const MAX_DESCRIPTION_LENGTH = 1000;
export const MAX_JSON_STRING_LENGTH = 10000;
export const MAX_TEMPLATE_STRING_LENGTH = 10000;
export const MAX_BYTES = 1048576; // OSD REST request payload size limit
export const MAX_BYTES_FORMATTED = '1,048,576';
export const MAX_WORKFLOW_NAME_TO_DISPLAY = 40;
export const WORKFLOW_NAME_REGEXP = RegExp('^[a-zA-Z0-9_-]*$');
export const INDEX_NAME_REGEXP = WORKFLOW_NAME_REGEXP;
Expand All @@ -670,7 +674,7 @@ export const MODEL_OUTPUT_SCHEMA_NESTED_PATH =
'output.properties.inference_results.items.properties.output.items.properties.dataAsMap.properties';
export const MODEL_OUTPUT_SCHEMA_FULL_PATH = 'output.properties';
export enum CONFIG_STEP {
INGEST = 'Ingestion pipeline',
INGEST = 'Ingest pipeline',
SEARCH = 'Search pipeline',
}
export enum SOURCE_OPTIONS {
Expand Down
6 changes: 3 additions & 3 deletions documentation/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ Click "Save" to return to the form.

### Aside: advanced data transformations

Continuing with the above example, let's suppose the input data (the document) is more complex, and a simple field-level mapping is not sufficient. Maybe you need to parse out some nested field's value. This can be done by changing the transform type to `Expression`
Continuing with the above example, let's suppose the input data (the document) is more complex, and a simple field-level mapping is not sufficient. Maybe you need to parse out some nested field's value. This can be done by changing the transformation type to `Expression`

![expression-ingest](./images/expression-ingest.png)

From there, click "Configure" to open the "Extract data with expression" modal. On the right-hand side, you can click "Run preview" to fetch the input data to this processor.
From there, click "Configure" to open the "Configure JSONPath expression" modal. On the right-hand side, you can click "Run preview" to fetch the input data to this processor.

![expression-modal-ingest](./images/expression-modal-ingest.png)

Expand Down Expand Up @@ -282,7 +282,7 @@ Nothing special needs to be configured.

### Search pipeline

Single ML inference **search response** processor. Choose `Template` as the transform type for the `prompt` input field. Open up the template configuration by clicking "Configure". Select a preset to start with for your convenience. Then, create an input variable that parses out the list of reviews, something like `review`. Inject the variable into the prompt by copying and pasting it. Click "Run preview" to test that the final transformed prompt with sample dynamic data looks as expected. Click "Save" to save and exit.
Single ML inference **search response** processor. Choose `Template` as the transformation type for the `prompt` input field. Open up the template configuration by clicking "Configure". Select a preset to start with for your convenience. Then, create an input variable that parses out the list of reviews, something like `review`. Inject the variable into the prompt by copying and pasting it. Click "Run preview" to test that the final transformed prompt with sample dynamic data looks as expected. Click "Save" to save and exit.

---

Expand Down
2 changes: 1 addition & 1 deletion public/component_types/indices/base_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class BaseIndex extends BaseComponent {
this.label = 'Index';
this.description =
category === COMPONENT_CATEGORY.INGEST
? 'Ingest index'
? 'Index for ingesting data'
: 'Retrieval index';
this.inputs = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function EditWorkflowMetadataModal(
fullWidth={true}
fieldPath={`description`}
showError={true}
placeholder="Provide a description for identifying this workflow."
placeholder="Provide a description for this workflow."
textArea={true}
/>
</EuiFlexItem>
Expand Down
6 changes: 3 additions & 3 deletions public/pages/workflow_detail/components/export_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ export function ExportModal(props: ExportModalProps) {
)}
<EuiFlexItem grow={false}>
<EuiText size="s">
{`To build out identical resources in other environments, create and provision a workflow using the below template.`}{' '}
{`To build identical resources in other environments, create and provision a workflow following the below template.`}{' '}
<EuiLink href={CREATE_WORKFLOW_LINK} target="_blank">
Learn more
</EuiLink>
</EuiText>
<EuiText
size="s"
color="subdued"
>{`Note: certain resource IDs in the template, such as model IDs, may be cluster-specific and not work out-of-the-box
in other environments. Ensure these values are updated before attempting to provision in other environments.`}</EuiText>
>{`Note: Certain resource IDs in the template, such as model IDs, may be specific to a cluster and not function properly
in other clusters. Make sure to update these values before provisioning the workflow in a new cluster.`}</EuiText>
</EuiFlexItem>
<EuiFlexItem>
<EuiFlexGroup direction="row" justifyContent="spaceBetween">
Expand Down
Loading

0 comments on commit 8b95d4a

Please sign in to comment.