Wiki source code of Requête en langage naturel

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

Show last authors
1 {{ddtoc/}}
2
3 ----
4
5 (% class="wikigeneratedid" %)
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.
7
8 = Prerequisites =
9
10 Cubes in your recently refreshed portfolios.
11
12 = Creating charts using natural language queries =
13
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.
15
16 == From the dashboard editor ==
17
18 (% class="wikigeneratedid" %)
19 In the dashboard editor, you can add a chart created using a natural language query to the dashboard.
20
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.
23 [[image:Natural_language_panel_FR.png]]
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.
28 [[image:Natural_language_request_example_FR.png||alt="Exemple requête"]]
29 1. Click on the chart of your choice.
30 ➡ The **‘Create a new chart **’ box **appears **with a preview of the chart.
31 [[image:1738661254101-163.png||alt="Création nouveau graphique"]]
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)**.
34
35 == From the dashboard ==
36
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.
38
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.
42
43 (% class="box infomessage" %)
44 (((
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.
46 )))
47
48 (% start="4" %)
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.
52 ​​​​​​​[[image:1738662183414-447.png]]
53 1. Click on the desired chart to view a preview.
54 ​​​​​​​[[image:1738662401588-131.png||alt="Aperçu du flux"]]
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.
58
59 = Formulating a natural language query{{id name="Formulation_requête"/}} =
60
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.
62
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.
64
65 We will see later in this document just how important the choice of terms in a query is.
66
67 == Chart type ==
68
69 For a given query, you will be presented with a list of results comprising various charts, depending on the content of the query.
70
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).
72
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.
74
75 Here are the keywords to use in the query when selecting charts:
76
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’
85
86 ‘consumption’
87 )))
88 |Arrow indicator|‘arrow’
89 |Bar chart|(((
90 ‘bar’
91
92 ‘histogram’
93 )))
94 |Bar chart|‘bar’
95 |Map|‘map’
96 |Scatter plot|(((
97 ‘scatter’
98
99 ‘correlation’
100 )))
101 |Bubble chart|‘bubble’
102 |Line chart|(((
103 ‘line’
104
105 ‘curve’
106 )))
107 |Area chart|(((
108 ‘area’
109
110 ‘area’
111 )))
112 |Radar chart|‘radar’
113 |Table|(((
114 ‘table’
115
116 ‘table’
117 )))
118 |Indicator|‘indicator’
119 |{{glossaryReference glossaryId="Glossary" entryId="Tableau croisé"}}Cross table{{/glossaryReference}}|‘Cross table’
120 |Text|‘text’
121
122 == Sort ==
123
124 You can sort your search results using the following keywords:
125
126 |**Sort**|**Keywords**|**Query examples**
127 |Ascending|(((
128 ‘sort’ (ascending)
129
130 “sorted” (ascending)
131
132 ‘sorts’ (ascending)
133
134 ‘sorted’ (ascending)
135
136 ‘sort’ (ascending)
137
138 ‘order’ (ascending)
139
140 ‘ascending’
141 )))|(((
142 ‘Costs by region in France in 2006, sorted by cost in a table’
143
144 ‘Costs by region in France in 2006, sorted in a table’
145
146 ‘Costs by region in France in 2006, in ascending order in a table’
147
148 ‘Costs by region in France in 2006, sorted in ascending order in a table’
149 )))
150 |Descending|(((
151 ‘sorted’ (descending)
152
153 “sorted” (descending)
154
155 “sorts” (descending)
156
157 “arranged” (descending)
158
159 ‘sort’ (descending)
160
161 ‘order’ (descending)
162
163 ‘descending’
164 )))|(((
165 ‘Costs by region in France in 2006, sorted in descending order by cost in a table’
166
167 “Costs by region in France in 2006, in descending order in a table”
168
169 ‘Costs by region in 2006 sorted in descending order in a table’
170 )))
171
172 == Trend of a metric ==
173
174 A metric has a trend. It can be stable (default trend), increasing or decreasing:
175
176 |**Trend**|**Meaning**
177 |Stable|Default trend: The higher, the better
178 |Increasing|(((
179 The larger, the better
180
181 //Example: for a margin//
182 )))
183 |Decreasing|(((
184 The smaller, the better
185
186 //Example: for a cost//
187 )))
188
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.
190
191 (% class="wikigeneratedid" id="HImpactdelatendancesurletri" %)
192 **Impact of the trend on sorting**
193
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.
195
196 |**Trend**|**Examples of queries**|**Sort order obtained**
197 |Stable|(((
198 ‘Revenue by region, sorted’
199
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”
204
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’
209
210 Cost is a measure with a decreasing trend
211 )))|//Sorting the ‘Cost’ measure by the ‘Region’ dimension will be in ascending order//
212
213 == Worst / Best ==
214
215 You can identify the top X best/worst members from your query results using the following keywords:
216
217 |**Cases**|**Keywords**|**Example**
218 |The X best|(((
219 ‘Top’
220
221 ‘best’
222
223 ‘biggest’
224
225 ‘most important’
226 )))|(((
227 The best value for money in France
228
229 The 5 best profit margins in 2016
230
231 The 2 highest turnover figures in Europe
232
233 Top 3 costs in France in 2016
234 )))
235 |The X worst|(((
236 ‘Worst’
237
238 “not as good”
239
240 “worse”
241
242 ‘smaller’
243 )))|(((
244 The worst cost in France
245
246 The 5 worst profit margins in 2016
247
248 The 2 worst turnover figures in Europe
249 )))
250
251 == Aggregation method ==
252
253 You can define an aggregation function for the metrics in your query by specifying the following keywords:
254
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”
260
261 == Target ==
262
263 You can apply targets to metrics by including the following keyword in the query:
264
265 |**Keywords**
266 |“objective”
267
268 You can also specify the names of the objectives you wish to apply directly.
269
270 **Example**
271
272 Consider a data model with the following columns
273
274 (((
275 |**Dimensions**|**Measures**
276 |Date|Communication quality
277 |Line type|Communication cost (with ‘Obj’ target)
278 )))
279
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’.
284
285 == (% style="color:inherit; font-family:inherit; font-size:26px" %)Using synonyms(%%) ==
286
287 {{id name="Synonymes"/}}Natural language search supports synonyms for the terms in your queries.
288
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.
290
291 === Enabling synonym dictionaries ===
292
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**’.
295
296 [[image:Activate_synonym_dictionary_FR.png]]
297
298
299 === Example of use ===
300
301 Consider a data model with the following columns
302
303 (((
304 |**Dimensions**|**Measures**
305 |Date|Communication quality
306 |Line type|Call charges
307 )))
308
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”).
312
313 (% class="box warningmessage" %)
314 (((
315 ❗This only applies if your thesaurus contains these synonyms.
316 )))
317
318 = Query results{{id name="Résultats_requête"/}} =
319
320 [[image:Requête_direct_TDB2.png]]
321
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.
323
324 * **Query terms**
325
326 A query result will be ranked higher if the query terms contain the exact names of the columns in your data models.
327
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.
329
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
335 )))
336 |(((
337 **Request 1:**
338
339 **With exact names**
340 )))|(((
341 **Query 2:**
342
343 **With partial names**
344 )))|(((
345 **Query 3:**
346
347 **With synonyms**
348 )))
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’.
352
353 This query differs from the original query; the scores will be low.
354 )))
355 |Score*: 5/5|Score*: 3/5|Score*: 2/5
356 |(% colspan="3" %)* The scores shown are for illustrative purposes only in this document
357
358 * **Type of chart suggested**
359
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.