You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this version is very similar with just a few different fields, common to 3 other templates (with a fourth containing only additional minor differences):
Every additional type of model (bedrock, cohere, etc.), use case (chat, hybrid search, multimodal search, semantic search), produces a combinatorial explosion of substitution templates with only minor differences between the steps, limiting the practicality of creating every possible combination.
The original design of the front-end included modular components for each of these workflow steps; there's no reason they can't be equally modular on the back-end.
What solution would you like?
Review the existing substitution templates as well as sample templates in the documentation. Identify overlapping workflow steps that are repeated across multiple templates in different combinations.
Consider not only exactly identical code but code where steps could be renamed to be identical
Design a means of using an Include Directive to add these values to a template file. Consider multiple designs such as:
simple text-based inclusion when reading files prior to parsing the JSON
smaller JSON component files that can be referenced during JSON parsing
include entire templates
some other idea I haven't thought of
Refactor the existing templates to use these components.
Using lessons learned in the above steps, consider the possibility to design further modularity to add additional step(s) simply by adding a suffix to an existing template name.
What alternatives have you considered?
Do similar steps to create the modular pieces, but assemble them together with automatic code generation. This would allow a one-time generation of the templates (possibly automated as part of CI) to keep the existing code the same and eliminate run-time parsing steps.
Do you have any additional context?
These issues essentially ask for the same thing more broadly; this feature attempts to build a structure to support them
This design should consider the possibility that these workflow steps might be assembled in a higher-level "scripting" or front-end UI sequencer.
This effort should focus primarily on entire workflow steps with identical textual content; if there are minor variations (e.g., many connectors are identical except for adding "input_type": "search_document", and "truncate": "END" fields) we should consider ways of including those without adding complexity.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
A core principle in software development is "Don't Repeat Yourself" (DRY).
Our substitution templates contain a lot of repetition. For example, this JSON is exactly identical in 9 of the 17 substitution templates.
This JSON is common to the two bedrock templates:
While this version is very similar with just a few different fields, common to 3 other templates (with a fourth containing only additional minor differences):
Every additional type of model (bedrock, cohere, etc.), use case (chat, hybrid search, multimodal search, semantic search), produces a combinatorial explosion of substitution templates with only minor differences between the steps, limiting the practicality of creating every possible combination.
The original design of the front-end included modular components for each of these workflow steps; there's no reason they can't be equally modular on the back-end.
What solution would you like?
What alternatives have you considered?
Do similar steps to create the modular pieces, but assemble them together with automatic code generation. This would allow a one-time generation of the templates (possibly automated as part of CI) to keep the existing code the same and eliminate run-time parsing steps.
Do you have any additional context?
These issues essentially ask for the same thing more broadly; this feature attempts to build a structure to support them
This design should consider the possibility that these workflow steps might be assembled in a higher-level "scripting" or front-end UI sequencer.
This effort should focus primarily on entire workflow steps with identical textual content; if there are minor variations (e.g., many connectors are identical except for adding
"input_type": "search_document",
and"truncate": "END"
fields) we should consider ways of including those without adding complexity.The text was updated successfully, but these errors were encountered: