Skip to main content
The Part Number Detection use case of the LWAI Prediction API detects part numbers in order to help with query routing and classification, and uses the embedding model to ingest text and return a JSON response of true if the input is a part number, or false if the input is not a part number.
IMPORTANT: This use case is only supported with a custom-trained embedding model trained with the Part Number Classification use case.

Prerequisites

To use this API, you need:
  • The unique APPLICATION_ID for your Lucidworks AI application, which is provided by Lucidworks.
  • A bearer token generated with a scope value of machinelearning.predict. For more information, see Authentication API.
  • A custom-trained Part Number Classification model.
  • The CUSTOM_DEPLOYMENT_ID field from the custom-trained model for the use case request. The path is: /ai/prediction/part-number-detection/CUSTOM_DEPLOYMENT_ID.

Unique values for the Part Number Detection use case

Some parameter values available in the part number detection use case are unique to this use case, including values for the modelConfig parameter. Refer to the API spec for more information.

Part Number Detection use case example

curl --request POST \ 
  --url 'https://APPLICATION_ID.applications.lucidworks.com/ai/prediction/part-number-detection/CUSTOM_DEPLOYMENT_ID' \
  --header 'Cache-Control: no-cache' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --data '{
    "batch": [
        {
            "text": "54956gf-98796v"
        },
        {
            "text": "bright pink sprinkles"
        }
    ]
}'