UpStart Commerce Search
Semantic (Neural) Search
Setting Up Semantic (Neural) Search with PIM
9min
prerequisites before enabling neural search, ensure you have access to the product information management system appropriate api credentials required permissions for attribute management step 1 create required attributes create neural description attribute curl curl location 'https //api upstartcommerce com/pim/attributes' \\ \ header 'x upstart tenant tenant id' \\ \ header 'x upstart site\ site id' \\ \ header 'content type application/json' \\ \ header 'x upstart api key api key' \\ \ data '{ "name" "neural description", "typename" "string", "searchproperties" { "knnvectorsupported" true, "indexed" false, "knnvectorembeddings" { "semantic catalog model" { "dimension" 384, "method" { "name" "hnsw", "space type" "l2", "engine" "faiss" } } } } // additional configuration }' create neural name attribute similar configuration as above, but with "name" as the attribute name step 2 commit attributes curl location 'https //api upstartcommerce com/pim/batch/attributes/change status' \\ \ header 'x upstart tenant tenant id' \\ \ header 'x upstart site site id' \\ \ header 'content type application/json' \\ \ header 'x upstart api key api key' \\ \ data '\[ { "id" "neural description attribute id", "status" "commit" }, { "id" "name attribute id" "status" "commit" } ]' step 3 create product template (screenshots will be added in the published doc) 1\ upon logging in to the upstart commerce portal, navigate to pim on the left navigation and select product templates 2\ click on the +create template button and enter the template name and description 3\ scroll down in the create product template pop up and select the product type 4\ once all the details are added, click on create & open 5\ from the attributes list, search for neural/semantic attributes and select all that are applicable 6\ once selected, click on the add button to add the neural search attribute to the template 7\ once added, the attribute will be shown under the added attributes section 8\ click on the publish button to publish the product template for a detailed guide on how to create a product template, go to product templates docid 3ivoqv3bkrkg xw876ash a step 4 update catalog route the catalog route needs to be updated to optimize the retrieval of knn vectors this step is crucial because it prevents the system from retrieving knn vectors on every search request, which would be inefficient curl location request patch 'https //api upstartcommerce com/v1/search/routes/catalog location live' \\ \ header 'x upstart tenant tenant id' \\ \ header 'x upstart api key api key' \\ \ header 'content type application/json' \\ \ data '{ "indexes" \[ { "id" "catalog location live", "querypipeline" "cataloglocationlive", "defaultpayload" { "search" { " source" { "excludes" \[ "dynamicproperties neural description semantic catalog model embedding", "dynamicproperties name semantic catalog model embedding" ] } } } } ] }' important notes about knn vectors the excludes field in the payload specifically excludes the knn vector fields ( neural description semantic catalog model embedding and name semantic catalog model embedding ) this exclusion is important because knn vectors are large data structures that aren't needed in the search response retrieving them with every search would increase response time and bandwidth usage the vectors are only needed for the internal neural search computation the vector embeddings are still used in the search process, but they're not returned in the response payload once the ml model and index are set up, these vectors will be automatically generated and stored for every new product created any existing product that gets updated the fields you've designated for neural search (name and description in this case) step 5 final setup contact the upstart commerce team to reindex your catalog indexes to complete the neural search setup