Semantic Search

 
ID Name Description
1CarA vehicle with four wheels
2BusA large vehicle for transporting passengers
3TeaA hot drink made from brewed leaves
4CoffeeA hot drink made from brewed beans
5ComputerAn electronic device for processing data
6MouseAn input device for controlling the cursor on the screen
7AirplaneAn aircraft for transporting passengers and cargo
8TableFurniture for working or dining
9ChairA comfortable seat with armrests
10PhoneA device for voice and text communication
11BookA printed publication with texts and illustrations
12PenA tool for writing with ink
13WatchA device for measuring time
14TelevisionA device for watching videos and broadcasts
15CameraA device for taking photographs
16BicycleA two-wheeled vehicle
17PlateA dish for serving food
18CupA container for drinking hot beverages
19BackpackA bag carried on the back
20CalculatorAn electronic device for calculations
Data grid with 100 rows and 3 columns
0 rows are selected

This demo incorporates semantic search into the DevExpress Blazor Grid. Semantic search finds results based on meaning rather than exact wording, understanding the context and intent behind a question or phrase. This allows your DevExpress-powered app to deliver more relevant answers by connecting related concepts, even if exact words differ.

To review the benefits of this feature, search for dictionary entries and their descriptions and use synonyms or generic descriptions instead of exact search strings (such as “clothing” instead of a specific product name). You can fine-tune the search results: use the Similarity Factor spin editor to change the search precision.

Follow the steps below to reproduce the capabilities of this demo in your Blazor project:

  1. Add AI libraries of your choice to the project. In this demo, we use OpenAI.
  2. Configure your Grid: bind it to data, create columns, enable all appropriate functionality.
  3. Add an external Search Box to the ToolbarTemplate.
  4. In the DxSearchBox.TextChanged event handler, call the Filter method to find similarities between data items and the search string. Refer to the SmartFilterProvider.cs tab for implementation details.