Data Source — Content Items
A Content Items data source connects your digital employee to structured content defined in Retorik Studio (restaurants, accommodation, products, news, etc.). Semantic search identifies the most relevant items and displays them to the user as media cards.
This type is particularly suited to frequently updated content (catalogues, points of interest, offers): the source updates automatically at each re-indexing without needing to re-import files.
Configuration
User access
The toggle "I want users to be able to view or download information from this data source" controls whether matched items are displayed to the user as media cards.
Content type
Select the content type to index from those available in your Retorik Studio.
Content filter
Optional field to restrict indexed items to a specific subset, using a Liquid expression. See Build a content filter below.
After any change, use "Save and re-index" to apply the changes to semantic search.
Media cards
When an item is selected by semantic search and user access is enabled, it is displayed as a media card containing a title, an optional image, a description, and a "Learn more" button linking to the item's detail page.
The "Learn more" button behaviour is configurable based on your project's needs (detail page, web page, etc.). Contact the DAVI team for content requiring custom display.
Build a content filter
The content filter applies to indexing: only items matching the expression are included in semantic search.
The syntax uses Liquid format: ContentItem.Content.ContentPart.Field.Type == "value"
- The expression must start with
ContentItem.Content. - Part 3: technical name of the content part
- Part 4: technical name of the field
- Part 5: value type of the field (case-sensitive)
| Field type | Value type |
|---|---|
| Text Field | .Text |
| MultiText Field | .Values |
| Boolean Field | .Value |
| Numeric Field | .Value |
The and and or logical operators allow complex expressions. They are evaluated right to left. Parentheses are not valid in Liquid.
To find the technical names of your content parts and fields, check the "Content > Content Definition > Content Types" page in Retorik Studio.
Examples
| Goal | Liquid expression |
|---|---|
| Restaurants whose name contains "brasserie" | ContentItem.Content.Thing.Name.Text contains "brasserie" |
| Restaurants in Reims | ContentItem.Content.Place.PostalCode.Text == "51100" |
| Accommodations with 3+ rooms | ContentItem.Content.LodgingBusiness.NumberOfRooms.Value >= 3 |
| Water activities (multiple categories) | ContentItem.Content.Thing.Categories.Values contains "Kayak" or ContentItem.Content.Thing.Categories.Values contains "Sailing" |
| "Favourite" places | ContentItem.Content.Thing.Favorite.Value == true |
| Products with a non-empty description | ContentItem.Content.Thing.Description.Text != "" and ContentItem.Content.Thing.Description.Text != empty |
Test your expression with a simple filter before building a complex one. If no results appear after re-indexing, check the technical names and casing in your expression.
Filter responses by tag
To restrict this source to a specific context (entity, site, department), fill in the "Filter data sources" section at the bottom of the configuration page. See the Overview for details.