SemanticSearchBehavior.Properties Property
Gets Semantic Search behavior settings.
Namespace: DevExpress.AIIntegration.WinForms
Assembly: DevExpress.AIIntegration.WinForms.SemanticSearch.v25.1.dll
NuGet Package: DevExpress.AIIntegration.WinForms.SemanticSearch
Declaration
Property Value
Type | Description |
---|---|
SemanticSearchBehaviorProperties | Behavior settings. |
Remarks
The following code snippet activates semantic search for a GridLookUpEdit
:
using DevExpress.AIIntegration.SemanticSearch;
using DevExpress.AIIntegration.WinForms;
public Form1() {
InitializeComponent();
gridLookUpEdit1.Properties.DataSource = DataHelper.Items;
gridLookUpEdit1.Properties.DisplayMember = "Model";
gridLookUpEdit1.Properties.ValueMember = "Id";
behaviorManager1.Attach<SemanticSearchBehavior>(gridLookUpEdit1.Properties.View, behavior => {
behavior.Properties.VectorCollectionName = "Cars";
behavior.Properties.DataSourceKeyField = "Id";
behavior.Properties.SearchResultCount = 10;
behavior.Properties.SearchMode = ControlSearchMode.Semantic;
// It is implied, that Cosine Distance filtering is used for the vector store.
// Lower = more similar
behavior.Properties.ScoreThreshold = 0.5D;
behavior.Properties.ScoreThresholdFilter = ScoreThresholdFilter.LessOrEqual;
});
}
See the following help topic for additional information: Semantic Search.
See Also