Utilizing OpenAI entity extraction for search queries
The OpenAI Entity Extraction tuning stage use large language models at query time to identify and extract meaningful entities from a user’s search query, such as people, organizations, products, or topics. By running as tuning stages, entity extraction dynamically influences how SmartHub interprets the query and shapes the resulting search behavior, improving relevance and intent recognition without modifying indexed content or requiring re-indexing.
Prerequisites
Note the following prerequisites before configuring the AI Visual Interpreter component:
-
If you are using OpenAI, the model you use must be gpt-4o or later.
Configure the tuning stage
-
In the SmartHub Administration portal, click General Settings.
-
In the User Experience Tuning section, click Add Query Tuning.
-
In the User Experience Tuning field, select OpenAI Entity Extractor from the drop-down list.
-
In the Name field, enter a name for your tuning stage.
-
In the Model Name field, enter the model name for your OpenAI model.
-
In the API Key, field, provide the API key for your OpenAI resource.
-
In the Prompt field, define the instructions that guide the AI model on how to identify and extract entities from content using the selected ontology. Use this field to control what the model looks for and how entities should be interpreted during extraction.
-
In the Ontology field, specify the entity types and relationships that you wish to extract. This ensures that both document content and user queries are analyzed using the same structured knowledge model. For more information, refer to the entity extractor ontology use cases and examples.
-
In the Test Query field, enter a sample query to test your tuning stage configuration.
-
Click Test Entity Extraction. The tuning stage will send the test query to the OpenAI model and will populate a response in the Response field.
-
When you are happy with your test results, click Accept.