Use Model Importer
This page will cover the simple workflow for the Model Importer, part of the Data Science Workbench. In order to use the Model Importer, your account must be enabled for the Build Platform, which then enables you to create models and algorithms in your own data center (or third-party clouds) and publish these strategies directly to the Omnichannel Personalization via FTP with implicit SSL. This service allows you to create strategies using your in-house algorithms and datasets, upload to our cloud, and use them along with the native strategies available with our Recommend product to:
-
Innovate using your preferred tools and proprietary data sets.
-
Keep the "secret sauce" of how you develop your strategies in your data center secret. You only need to pass Algonomy the final strategy model, no information about the algorithm used to compute the strategy is needed.
-
Benefit from our infrastructure and Experience Optimizer, while still differentiating by creating your own strategies.
When using this service, you have the flexibility to create your strategies using any and all data sources you have access to and using your preferred tools and programming languages. Algonomy only requires that the final model to be published be in a standard format that is described at the end of this page.
Note: There are restrictions on the overall Strategy Size and Refresh Rate that are allowed. Contact Algonomy support team to get more information.
Workflow
- Create a strategy configuration on SFTP for the new recommendation model
- Load the model for the defined strategy
- Create/update the recommendation model in the proper structure using your preferred tools and data sets and upload to SFTP
- Check the status of the model publish to catch any issues
- Once status = done, you can assign the strategy to the appropriate recommendation placement and publish via the dashboard.
- Repeat steps 2 and 3 to refresh the strategy at appropriate intervals
- Delete a strategy when it is no longer required
Create Strategy
The command createstrategy is needed to define your new strategy. This step is needed for each new strategy you define. It is not needed when refreshing the models for existing strategies.
All strategies defined via this process have “byos-“ appended at the start of the strategy name.
Options | Format | Description |
---|---|---|
-name | Alphanumeric | The name given to the strategy. “byos-“ will automatically be appended at the beginning of the name |
-seedType | Alphanumeric | The value provided through instrumentation for each call that potentially uses the strategy. The full list is given above in the Strategy Structure |
-strategyFamily | Pre-defined | None by default, the complete list is provided just below this table |
-boosting | “true” or “false” | False by default. Enable/Disable boosting of this strategy |
-deduping | “true” or “false” | True by default. Enable/Disable deduping of product recommendation |
Examples:
Build-SFTP> site createstrategy –name test-strat-1 –seedType product
Response> 200 Strategy byos-test-strat-1 created
Build-SFTP> site createstrategy –name test-strat-2 –seedType segment –strategyFamily ProductBoughtBought –boosting true –deduping true
Response> 200 Strategy byos-test-strat-2 created
Load Strategy
The command loadstrategy is used to tie together the strategy name to the uploaded recommendation model and to load the strategy. The command returns a jobId that can be used to check on the status of the strategy just published.
Example:
Build-SFTP> site loadstrategy model_1.txt –name byos-test-strat-1
Response> 200 {“jobId”: “801f7739-e93b-4415-ef5e-05536c2d665b”}
Note: The FTP account creation is handled by our client services team. If you do not already have an account, please reach out to them. Example to load a recommendation model with a file name test_stratey.txt into model_1.txt on the SFTP site.
>SFTP build-SFTP.richrelevance.com 2222
build-SFTP> put ~/test_strategy.txt model_1.txt
Strategy Status
The status of a published strategy can be checked using the strategystatus command. It takes input as either the name of the strategy or the jobId and returns the current status of the requested strategy.
Example:
Build-SFTP> site strategystatus -name byos-test-strat-2
Response> 200 {"status":"running","startTime":"2015-05-12 10:25:44.380003","endTime":null,"message":"305025 line(s). 305025 valid line(s) . 0 empty new line(s). 0 missing product(s)","queueTime":"2015-05-12 10:35:13.520019"}
Build-SFTP> site strategystatus -jobId 801f7739-e93b-4415-ef5e-05536c2d665b
Response> 200 {"status":"running","startTime":"2015-06-02 11:35:24.350003","endTime":null,"message":"305025 line(s). 305025 valid line(s) . 0 empty new line(s). 0 missing product(s)","queueTime":"2015-06-02 11:35:17.515099"}
Note: Once the strategy status shows “done”, it will be visible under “Strategy Configuration” on the dashboard. It can then be assigned a strategy message and published. For more information, refer Strategies User Guide.
Additional Commands
List Strategy
The liststrategy command will give a list of all of the strategies created via this process, along with their configuration.
Example:
Build-SFTP> site liststrategy
Response> 200- [ {
"name" : "byos-test-strat-1",
"seedType" : "product",
"strategyFamily" : null,
"boosting" : false,
"deduping" : true
}, {
"name" : "byos-test-strat-2",
"seedType" : "segment",
"strategyFamily" : ProductBoughtBought,
"boosting" : true,
"deduping" : true
} ]
Delete Strategy
If a strategy is no longer in use, you can delete it using the deletestrategy command, using the strategy name as input. It is advised that you deactivate the strategy via the dashboard before you delete it from SFTP.
Example
Build-SFTP> site deletestrategy –name byos-test-strat-2
Strategy Structure and File Format
Custom strategies are defined by a simple table with three columns. The columns are delimited by ctrl-A and row-delimited by newline. Custom strategies always return lists of product IDs. The key value is used as the seed for the strategy: what piece of information from the page should the strategy use to choose which products to recommend?
Field | Format | Description | |
---|---|---|---|
Key | Alphanumeric | The input ("seed") for the strategy. The seed value is provided through instrumentation for each call that potentially uses the strategy. The following key types are currently supported. | |
customer segment ID | A unique identifier for a customer segment, as instrumented on your site. | ||
product ID | A unique identifier for the item (sometimes called the item ID). For a detailed description, refer the Relevance Cloud Developers Site . | ||
product brand ID | A unique identifier for a brand, often instrumented to enable brand filtering. | ||
product category ID | The category ID associated with a product or set of products, used to provide category context. | ||
user ID | A user ID, generally connected to an email address, is a direct link to the login credentials a consumer uses to log into and buy products from an e-commerce site. For a detailed description, refer the Relevance Cloud Developers Site . | ||
Multiproduct | When we use multiple products/categories as a seed, scores are combined from both seeds to decide recommendation. | ||
search | search string from the request context is used as a seed with some modifications (remove punctuations, basic stemming). Search string 'quick, red cars' will be converted into 3 seeds 'quick red cars', 'quick red car', 'car red quick'. Each seed will be tried for a match in the model. | ||
DMA | Designated Marketing Area | ||
sitewide | No seed, returns highest scoring result from across the whole site. | ||
Product | Alphanumeric | Product ID (from your product catalog data feed) that is to be recommended. | |
Score | Numeric | Scores get sorted in descending order to decide recommendation. |