Wiki source code of Requête en langage naturel

Last modified by Aurelie Bertrand on 2026/06/29 11:14

Hide last authors
abertrand 23.10 1 {{ddtoc/}}
jhurst 1.1 2
abertrand 29.1 3 ----
4
abertrand 12.2 5 (% class="wikigeneratedid" %)
Aurelie Bertrand 55.1 6 Natural language queries enable users to explore data by converting a query into a graphical visualisation. This allows users to interact with the data without any specialist knowledge.
abertrand 12.2 7
Aurelie Bertrand 55.1 8 = Prerequisites =
jhurst 1.1 9
Aurelie Bertrand 55.1 10 Cubes in your recently refreshed portfolios.
jhurst 1.1 11
Aurelie Bertrand 55.1 12 = Creating charts using natural language queries =
jhurst 1.1 13
Aurelie Bertrand 55.1 14 Natural language queries can be run from the dashboard editor or directly within the dashboard. They are based on the data models of the currently selected role.
jhurst 1.1 15
Aurelie Bertrand 55.1 16 == From the dashboard editor ==
jhurst 1.1 17
abertrand 12.6 18 (% class="wikigeneratedid" %)
Aurelie Bertrand 55.1 19 In the dashboard editor, you can add a chart created using a natural language query to the dashboard.
abertrand 12.6 20
Aurelie Bertrand 55.1 21 1. Open the Dashboard Editor and select the dashboard page to which you wish to add a chart.
22 1. In the left-hand side panel, click **‘Create new charts’ and **tick the **‘Natural language’** option.
Aurelie Bertrand 45.1 23 [[image:Natural_language_panel_FR.png]]
Aurelie Bertrand 55.1 24 1. Then enter your query in the search bar.
25 See the section [[Formulating a natural language query>>doc:||anchor="Formulation_requête"]] for further details.
26 ➡ A list of charts is displayed, sorted by relevance.
27 See the section [[Query results>>doc:||anchor="Résultats_requête"]] for further details.
Aurelie Bertrand 45.1 28 [[image:Natural_language_request_example_FR.png||alt="Exemple requête"]]
Aurelie Bertrand 55.1 29 1. Click on the chart of your choice.
30 ➡ The **‘Create a new chart **’ box **appears **with a preview of the chart.
Aurelie Bertrand 52.1 31 [[image:1738661254101-163.png||alt="Création nouveau graphique"]]
Aurelie Bertrand 55.1 32 1. Rename the chart if necessary and click on **Add chart**.
33 ➡ The new chart is added to the selected dashboard and to the list of **Information Flows (Existing charts)**.
abertrand 12.2 34
Aurelie Bertrand 55.1 35 == From the dashboard ==
jhurst 1.1 36
Aurelie Bertrand 55.1 37 It is also possible to add an additional content element – **//‘Data Query’//** – to your final dashboard so that you can create new charts directly within the dashboard.
jhurst 1.1 38
Aurelie Bertrand 55.1 39 1. Open the Dashboard Editor and select the dashboard page to which you wish to add the query box.
40 1. In the left-hand side panel, click on **‘Additional Content’** to display the list of **elements.**
41 1. Drag and drop the **‘Data Query’** element onto the dashboard page.
abertrand 12.7 42
abertrand 12.8 43 (% class="box infomessage" %)
44 (((
Aurelie Bertrand 55.1 45 💡 You may find that, when running queries, you filter by members of a dimension or measure. It is therefore advisable to add the **//‘Filtered Items’//**element to the dashboard so that you can remove them for future queries.
abertrand 12.7 46 )))
47
abertrand 13.1 48 (% start="4" %)
Aurelie Bertrand 55.1 49 1. Save and view the dashboard.
50 ➡ You can enter a query in the search bar of the **‘Data Query’** box. See the section [[Formulating a query in natural language>>doc:||anchor="Formulation_requête"]] for further details.
51 ➡ The results are displayed with a score indicating their relevance. See the section [[Query results>>doc:||anchor="Résultats_requête"]] for further details.
Aurelie Bertrand 54.1 52 ​​​​​​​[[image:1738662183414-447.png]]
Aurelie Bertrand 55.1 53 1. Click on the desired chart to view a preview.
Aurelie Bertrand 52.1 54 ​​​​​​​[[image:1738662401588-131.png||alt="Aperçu du flux"]]
Aurelie Bertrand 55.1 55 1. You can save it by clicking the [[image:1705681243815-758.png||queryString="width=21&height=18" height="18" width="21"]] and then **Save**.
56 Rename it if necessary and click **OK.**
57 ➡ It is added to the {{glossaryReference glossaryId="Glossary" entryId="Flux"}}Flow{{/glossaryReference}} portfolio.
jhurst 1.1 58
Aurelie Bertrand 55.1 59 = Formulating a natural language query{{id name="Formulation_requête"/}} =
jhurst 1.1 60
Aurelie Bertrand 55.1 61 Natural language queries rely primarily on keywords to suggest the most relevant charts, as well as on the column names in the data models.
jhurst 1.1 62
Aurelie Bertrand 55.1 63 A query will therefore basically consist of measure names from your model and/or dimension names, followed or not by chart types and/or sorting operations.
jhurst 1.1 64
Aurelie Bertrand 55.1 65 We will see later in this document just how important the choice of terms in a query is.
jhurst 1.1 66
Aurelie Bertrand 55.1 67 == Chart type ==
jhurst 1.1 68
Aurelie Bertrand 55.1 69 For a given query, you will be presented with a list of results comprising various charts, depending on the content of the query.
jhurst 1.1 70
Aurelie Bertrand 55.1 71 However, it is possible to specify a particular chart type, provided that the query remains coherent (the query “Communication costs as a line chart” is not coherent).
jhurst 1.1 72
Aurelie Bertrand 55.1 73 The number of entries in the query results also has an impact. Indeed, in the case of a coherent query but with too many results, you will be offered a chart suited to the number of results to be displayed.
jhurst 1.1 74
Aurelie Bertrand 55.1 75 Here are the keywords to use in the query when selecting charts:
jhurst 1.1 76
Aurelie Bertrand 55.1 77 |**Chart names**|**Keywords**
78 |Pie chart|‘sector’
79 ‘pie chart’
80 ‘ratio’
81 |Gauge|‘gauge’
82 |Progress bar|‘progress bar’
83 |Energy bars|(((
84 ‘energy’
jhurst 1.1 85
Aurelie Bertrand 55.1 86 ‘consumption’
jhurst 1.1 87 )))
Aurelie Bertrand 55.1 88 |Arrow indicator|‘arrow’
89 |Bar chart|(((
90 ‘bar’
jhurst 1.1 91
Aurelie Bertrand 55.1 92 ‘histogram’
jhurst 1.1 93 )))
Aurelie Bertrand 55.1 94 |Bar chart|‘bar’
95 |Map|‘map’
96 |Scatter plot|(((
97 ‘scatter’
jhurst 1.1 98
Aurelie Bertrand 55.1 99 ‘correlation’
jhurst 1.1 100 )))
Aurelie Bertrand 55.1 101 |Bubble chart|‘bubble’
102 |Line chart|(((
103 ‘line’
jhurst 1.1 104
Aurelie Bertrand 55.1 105 ‘curve’
jhurst 1.1 106 )))
Aurelie Bertrand 55.1 107 |Area chart|(((
108 ‘area’
jhurst 1.1 109
Aurelie Bertrand 55.1 110 ‘area’
jhurst 1.1 111 )))
Aurelie Bertrand 55.1 112 |Radar chart|‘radar’
113 |Table|(((
114 ‘table’
jhurst 1.1 115
Aurelie Bertrand 55.1 116 ‘table’
jhurst 1.1 117 )))
Aurelie Bertrand 55.1 118 |Indicator|‘indicator’
119 |{{glossaryReference glossaryId="Glossary" entryId="Tableau croisé"}}Cross table{{/glossaryReference}}|‘Cross table’
120 |Text|‘text’
jhurst 1.1 121
Aurelie Bertrand 55.1 122 == Sort ==
jhurst 1.1 123
Aurelie Bertrand 55.1 124 You can sort your search results using the following keywords:
jhurst 1.1 125
Aurelie Bertrand 55.1 126 |**Sort**|**Keywords**|**Query examples**
127 |Ascending|(((
128 ‘sort’ (ascending)
jhurst 1.1 129
Aurelie Bertrand 55.1 130 “sorted” (ascending)
jhurst 1.1 131
Aurelie Bertrand 55.1 132 ‘sorts’ (ascending)
jhurst 1.1 133
Aurelie Bertrand 55.1 134 ‘sorted’ (ascending)
jhurst 1.1 135
Aurelie Bertrand 55.1 136 ‘sort’ (ascending)
jhurst 1.1 137
Aurelie Bertrand 55.1 138 ‘order’ (ascending)
jhurst 1.1 139
Aurelie Bertrand 55.1 140 ‘ascending’
jhurst 1.1 141 )))|(((
Aurelie Bertrand 55.1 142 ‘Costs by region in France in 2006, sorted by cost in a table’
jhurst 1.1 143
Aurelie Bertrand 55.1 144 ‘Costs by region in France in 2006, sorted in a table’
jhurst 1.1 145
Aurelie Bertrand 55.1 146 ‘Costs by region in France in 2006, in ascending order in a table’
jhurst 1.1 147
Aurelie Bertrand 55.1 148 ‘Costs by region in France in 2006, sorted in ascending order in a table’
jhurst 1.1 149 )))
Aurelie Bertrand 55.1 150 |Descending|(((
151 ‘sorted’ (descending)
jhurst 1.1 152
Aurelie Bertrand 55.1 153 “sorted” (descending)
jhurst 1.1 154
Aurelie Bertrand 55.1 155 “sorts” (descending)
jhurst 1.1 156
Aurelie Bertrand 55.1 157 “arranged” (descending)
jhurst 1.1 158
Aurelie Bertrand 55.1 159 ‘sort’ (descending)
jhurst 1.1 160
Aurelie Bertrand 55.1 161 ‘order’ (descending)
jhurst 1.1 162
Aurelie Bertrand 55.1 163 ‘descending’
jhurst 1.1 164 )))|(((
Aurelie Bertrand 55.1 165 ‘Costs by region in France in 2006, sorted in descending order by cost in a table’
jhurst 1.1 166
Aurelie Bertrand 55.1 167 “Costs by region in France in 2006, in descending order in a table”
jhurst 1.1 168
Aurelie Bertrand 55.1 169 ‘Costs by region in 2006 sorted in descending order in a table’
jhurst 1.1 170 )))
171
Aurelie Bertrand 55.1 172 == Trend of a metric ==
jhurst 1.1 173
Aurelie Bertrand 55.1 174 A metric has a trend. It can be stable (default trend), increasing or decreasing:
jhurst 1.1 175
Aurelie Bertrand 55.1 176 |**Trend**|**Meaning**
177 |Stable|Default trend: The higher, the better
178 |Increasing|(((
179 The larger, the better
jhurst 1.1 180
Aurelie Bertrand 55.1 181 //Example: for a margin//
jhurst 1.1 182 )))
Aurelie Bertrand 55.1 183 |Decreasing|(((
184 The smaller, the better
jhurst 1.1 185
Aurelie Bertrand 55.1 186 //Example: for a cost//
jhurst 1.1 187 )))
188
Aurelie Bertrand 55.1 189 You can edit a metric’s trend via Digdash Studio, in the advanced configuration of a data source, within the metric’s properties. See the section [[Editing the metric’s trend>>||anchor="Tendance_mesure"]] for further details.
jhurst 1.1 190
abertrand 28.1 191 (% class="wikigeneratedid" id="HImpactdelatendancesurletri" %)
Aurelie Bertrand 55.1 192 **Impact of the trend on sorting**
jhurst 1.1 193
Aurelie Bertrand 55.1 194 The trend affects sorting. If the sort order (ascending or descending) is not explicitly specified, it will be based on the trend of the metric being sorted. Consequently, a measure with a stable or rising trend will be sorted in descending order, whilst a measure with a falling trend will be sorted in ascending order.
jhurst 1.1 195
Aurelie Bertrand 55.1 196 |**Trend**|**Examples of queries**|**Sort order obtained**
abertrand 23.4 197 |Stable|(((
Aurelie Bertrand 55.1 198 ‘Revenue by region, sorted’
jhurst 1.1 199
Aurelie Bertrand 55.1 200 Turnover is a metric with a stable trend
201 )))|//The ‘Revenue’ measure will be sorted in descending order by the ‘Region’ dimension//
202 |Ascending|(((
203 “Sort by region: Margin”
jhurst 1.1 204
Aurelie Bertrand 55.1 205 Margin is a measure with an increasing trend
206 )))|//The ‘Margin’ measure will be sorted in descending order by region//
207 |Descending|(((
208 ‘Cost by region, sorted’
jhurst 1.1 209
Aurelie Bertrand 55.1 210 Cost is a measure with a decreasing trend
211 )))|//Sorting the ‘Cost’ measure by the ‘Region’ dimension will be in ascending order//
jhurst 1.1 212
Aurelie Bertrand 55.1 213 == Worst / Best ==
jhurst 1.1 214
Aurelie Bertrand 55.1 215 You can identify the top X best/worst members from your query results using the following keywords:
jhurst 1.1 216
Aurelie Bertrand 55.1 217 |**Cases**|**Keywords**|**Example**
218 |The X best|(((
219 ‘Top’
jhurst 1.1 220
Aurelie Bertrand 55.1 221 ‘best’
jhurst 1.1 222
Aurelie Bertrand 55.1 223 ‘biggest’
jhurst 1.1 224
Aurelie Bertrand 55.1 225 ‘most important’
jhurst 1.1 226 )))|(((
Aurelie Bertrand 55.1 227 The best value for money in France
jhurst 1.1 228
Aurelie Bertrand 55.1 229 The 5 best profit margins in 2016
jhurst 1.1 230
Aurelie Bertrand 55.1 231 The 2 highest turnover figures in Europe
jhurst 1.1 232
Aurelie Bertrand 55.1 233 Top 3 costs in France in 2016
jhurst 1.1 234 )))
Aurelie Bertrand 55.1 235 |The X worst|(((
236 ‘Worst’
jhurst 1.1 237
Aurelie Bertrand 55.1 238 “not as good”
jhurst 1.1 239
Aurelie Bertrand 55.1 240 “worse”
jhurst 1.1 241
Aurelie Bertrand 55.1 242 ‘smaller’
jhurst 1.1 243 )))|(((
Aurelie Bertrand 55.1 244 The worst cost in France
jhurst 1.1 245
Aurelie Bertrand 55.1 246 The 5 worst profit margins in 2016
jhurst 1.1 247
Aurelie Bertrand 55.1 248 The 2 worst turnover figures in Europe
jhurst 1.1 249 )))
250
Aurelie Bertrand 55.1 251 == Aggregation method ==
jhurst 1.1 252
Aurelie Bertrand 55.1 253 You can define an aggregation function for the metrics in your query by specifying the following keywords:
jhurst 1.1 254
Aurelie Bertrand 55.1 255 |**Aggregation**|**Keywords**|**Query examples**
256 |Sum|‘sum’|“Total communication costs”
257 |Average|‘average’|‘Average communication cost’
258 |Minimum|‘min’|‘Minimum communication cost’
259 |Maximum|‘max’|“Max communication cost”
jhurst 1.1 260
Aurelie Bertrand 55.1 261 == Target ==
jhurst 1.1 262
Aurelie Bertrand 55.1 263 You can apply targets to metrics by including the following keyword in the query:
jhurst 1.1 264
Aurelie Bertrand 55.1 265 |**Keywords**
266 |“objective”
jhurst 1.1 267
Aurelie Bertrand 55.1 268 You can also specify the names of the objectives you wish to apply directly.
jhurst 1.1 269
Aurelie Bertrand 55.1 270 **Example**
abertrand 23.4 271
Aurelie Bertrand 55.1 272 Consider a data model with the following columns
abertrand 23.4 273
274 (((
Aurelie Bertrand 55.1 275 |**Dimensions**|**Measures**
276 |Date|Communication quality
277 |Line type|Communication cost (with ‘Obj’ target)
jhurst 1.1 278 )))
279
Aurelie Bertrand 55.1 280 * Example 1: ‘Communication cost in gauge with target’
281 ➡ All targets for all measurements are applied (one target per measurement).\\
282 * Example 2: ‘Communication cost in gauge with Obj’
283 ➡ The ‘Obj’ target is applied to the associated measure ‘Communication cost’.
jhurst 1.1 284
Aurelie Bertrand 55.1 285 == (% style="color:inherit; font-family:inherit; font-size:26px" %)Using synonyms(%%) ==
jhurst 1.1 286
Aurelie Bertrand 55.1 287 {{id name="Synonymes"/}}Natural language search supports synonyms for the terms in your queries.
jhurst 1.1 288
Aurelie Bertrand 55.1 289 You can enter synonyms or import them from a dictionary. See the page [[Using synonyms>>doc:Digdash.user_guide.studio.managers.translation.synonyms_use.WebHome]] for further details.
jhurst 1.1 290
Aurelie Bertrand 55.1 291 === Enabling synonym dictionaries ===
jhurst 1.1 292
Aurelie Bertrand 55.1 293 You must then ensure that the use of synonym dictionaries is enabled for the **Natural Language Query** feature in the server configuration.
294 From the home menu, go to **Configuration -> Server Settings -> Dictionaries & Languages -> Synonym Dictionaries**and tick the box labelled **‘Use synonym dictionaries for natural language queries**’.
jhurst 1.1 295
Aurelie Bertrand 45.1 296 [[image:Activate_synonym_dictionary_FR.png]]
jhurst 1.1 297
298
Aurelie Bertrand 55.1 299 === Example of use ===
abertrand 20.1 300
Aurelie Bertrand 55.1 301 Consider a data model with the following columns
abertrand 23.4 302
303 (((
Aurelie Bertrand 55.1 304 |**Dimensions**|**Measures**
305 |Date|Communication quality
306 |Line type|Call charges
jhurst 1.1 307 )))
308
Aurelie Bertrand 55.1 309 In this case:
310 The query//“Call charges by line type”//is equivalent to the query//“Call costs by line// type”
311 (“prix” is a synonym for “coût” and “genre” is a synonym for “type”).
jhurst 1.1 312
abertrand 23.4 313 (% class="box warningmessage" %)
jhurst 1.1 314 (((
Aurelie Bertrand 55.1 315 ❗This only applies if your thesaurus contains these synonyms.
jhurst 1.1 316 )))
317
Aurelie Bertrand 55.1 318 = Query results{{id name="Résultats_requête"/}} =
abertrand 12.2 319
abertrand 23.10 320 [[image:Requête_direct_TDB2.png]]
abertrand 12.2 321
Aurelie Bertrand 55.1 322 The results of a query provide a list of charts ranked by relevance, with an associated score out of 5. The higher the score, the more relevant the associated chart is considered to be. The name of the associated data model is shown, along with a description of the chart.
abertrand 12.2 323
Aurelie Bertrand 55.1 324 * **Query terms**
abertrand 12.2 325
Aurelie Bertrand 55.1 326 A query result will be ranked higher if the query terms contain the exact names of the columns in your data models.
jhurst 1.1 327
Aurelie Bertrand 55.1 328 A query will therefore be considered less effective if its terms contain partial names of your columns, or synonyms for the column names in your data model.
jhurst 1.1 329
Aurelie Bertrand 55.1 330 |(% colspan="3" %)**Example**
331 |(% colspan="3" %)Consider a data model with the following columns(((
332 |**Dimensions**|**Measures**
333 |Date|Communication quality
334 |Line type|Call cost
jhurst 1.1 335 )))
336 |(((
Aurelie Bertrand 55.1 337 **Request 1:**
jhurst 1.1 338
Aurelie Bertrand 55.1 339 **With exact names**
jhurst 1.1 340 )))|(((
Aurelie Bertrand 55.1 341 **Query 2:**
jhurst 1.1 342
Aurelie Bertrand 55.1 343 **With partial names**
jhurst 1.1 344 )))|(((
Aurelie Bertrand 55.1 345 **Query 3:**
jhurst 1.1 346
Aurelie Bertrand 55.1 347 **With synonyms**
jhurst 1.1 348 )))
Aurelie Bertrand 55.1 349 |‘Communication costs by line type’|“Cost by type”|“Price by line type”
350 |If only exact terms are used in this query, the results may be well-ranked.|If partial terms are used in this query, the results may be of lower quality.|(((
351 ‘price’ is synonymous with ‘cost’, ‘line category’ is synonymous with ‘line type’.
jhurst 1.1 352
Aurelie Bertrand 55.1 353 This query differs from the original query; the scores will be low.
jhurst 1.1 354 )))
Aurelie Bertrand 55.1 355 |Score*: 5/5|Score*: 3/5|Score*: 2/5
356 |(% colspan="3" %)* The scores shown are for illustrative purposes only in this document
jhurst 1.1 357
Aurelie Bertrand 55.1 358 * **Type of chart suggested**
jhurst 1.1 359
Aurelie Bertrand 55.1 360 The list of results for a query includes charts that are more or less relevant to what is expected. Given the nature of the search terms, some charts will be ranked lower than others, resulting in a lower score for the latter.