diff --git a/dynatrace/dashboards/openai/Travel-Advisor-Overview.json b/dynatrace/dashboards/openai/Travel-Advisor-Overview.json index d47888c..8d6a66b 100644 --- a/dynatrace/dashboards/openai/Travel-Advisor-Overview.json +++ b/dynatrace/dashboards/openai/Travel-Advisor-Overview.json @@ -1 +1 @@ -{"version":14,"variables":[{"key":"KubernetesMode","type":"query","input":"fetch dt.entity.cloud_application_namespace\n| fields entity.name\n| dedup entity.name\n| append [data record(entity.name=\"\")]","multiple":false,"defaultValue":""}],"tiles":{"0":{"type":"data","title":"Total Search Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| makeTimeseries count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"lineChart","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"legend":{"hidden":true},"fieldMapping":{"timestamp":"timeframe","leftAxisValues":["count()"],"leftAxisDimensions":[]},"categoricalBarChartSettings":{},"hiddenLegendFields":[]},"singleValue":{"showLabel":true,"label":"","prefixIcon":"","autoscale":true,"alignment":"center"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"honeycomb":{"shape":"square","dataMappings":{}},"histogram":{"dataMappings":[{"valueAxis":"interval","rangeAxis":""}]}}},"1":{"type":"data","title":"Total","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"2":{"type":"data","title":"Cache Hit Rate","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| summarize genCount = toDouble(countIf(matchesPhrase(content, \"gpt-3.5\"))),\n vecEmbeddingCount = toDouble(countIf(matchesPhrase(content, \"text-embedding-ada-002\")))\n| fieldsAdd totalCount = genCount + vecEmbeddingCount\n| fieldsAdd cacheHitRate = vecEmbeddingCount / totalCount * 100\n| fieldsKeep cacheHitRate","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cacheHitRate"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cacheHitRate","unitCategory":"percentage","baseUnit":"percent","displayUnit":null,"decimals":0,"suffix":"","delimiter":false,"added":1702472811365}],"histogram":{"dataMappings":[{"valueAxis":"cacheHitRate","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"3":{"type":"markdown","title":"","content":"## OpenAI Requests"},"4":{"type":"data","title":"Generations","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"served from OpenAI","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"5":{"type":"data","title":"Vectors","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"text-embedding-ada-002\")\n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"served from cache","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"6":{"type":"markdown","title":"","content":"### Semantic Cache Quick View\nSee also dedicated Weaviate dashboards for deeper statistics"},"7":{"type":"markdown","title":"","content":"## OpenAI Token Costs"},"8":{"type":"data","title":"Prompt Token Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\")\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize promptTokensCount = sum(promptTokens)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"promptTokensCount"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{},"sortBy":{"columnId":"[\"timestamp\"]","direction":"descending"}},"histogram":{"dataMappings":[{"valueAxis":"promptTokensCount","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"9":{"type":"data","title":"Completion Token Count","query":"fetch logs\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize completionTokensCount = sum(completionTokens)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"completionTokensCount"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"completionTokensCount","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"11":{"type":"data","title":"Costs","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize cost = (sum(promptTokens) / 1000.0 * 0.0010) + (sum(completionTokens) / 1000.0 * 0.0020) ","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cost"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cost","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":4,"suffix":"","delimiter":false,"added":1702478013644}],"histogram":{"dataMappings":[{"valueAxis":"cost","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"12":{"type":"data","title":"Costs","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"text-embedding-ada-002\")\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize cost = (sum(promptTokens) / 1000.0 * 0.0001) ","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cost"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cost","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":4,"suffix":"","delimiter":false,"added":1702478013644}],"histogram":{"dataMappings":[{"valueAxis":"cost","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"13":{"type":"data","title":"Cache Saving","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize genCount = countIf(matchesPhrase(content, \"gpt-3.5\")),\n vecEmbeddingCount = countIf(matchesPhrase(content, \"text-embedding-ada-002\")),\n sumCompletions = sum(completionTokens),\n sumPrompts = sum(promptTokens)\n| fieldsAdd cacheSaving = sumCompletions / genCount * vecEmbeddingCount / 1000 * 0.0020\n| fieldsKeep cacheSaving","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cacheSaving"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cacheSaving","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":3,"suffix":"","delimiter":false,"added":1702494249230}],"histogram":{"dataMappings":[{"valueAxis":"cacheSaving","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"14":{"type":"markdown","title":"","content":"![openai logo](https://upload.wikimedia.org/wikipedia/commons/4/4d/OpenAI_Logo.svg)"},"15":{"type":"data","title":"Search Volume by Prompt","query":"fetch logs\n| filter matchesPhrase(content, \"GET /api/v1/completion?prompt=\")\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| parse content, \"LD 'prompt=' STRING:prompt\"\n| fieldsKeep timestamp, prompt\n// Make a timeseries to chart count of prompts, split by the prompt phrase\n| makeTimeseries { count(), by: prompt }","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"lineChart","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxis":"prompt","categoryAxisLabel":"prompt","valueAxis":"interval","valueAxisLabel":"interval"},"hiddenLegendFields":["count()"],"fieldMapping":{"timestamp":"timeframe","leftAxisValues":["count()"],"leftAxisDimensions":["prompt"]},"leftYAxisSettings":{"label":"Search Volume by Prompt","min":"auto"},"colorPalette":"fireplace","seriesOverrides":[]},"singleValue":{"showLabel":true,"label":"","prefixIcon":"","recordField":"prompt","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","dataMappings":{"category":"prompt","value":"prompt"}},"histogram":{"dataMappings":[{"valueAxis":"interval","rangeAxis":""}]},"unitsOverrides":[]}},"16":{"type":"data","title":"Total Search Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| fieldsKeep content\n| summarize count()\n//| makeTimeseries count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"legend":{"hidden":true},"categoricalBarChartSettings":{},"hiddenLegendFields":[]},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"17":{"type":"markdown","title":"","content":"## Search Intelligence"},"18":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD ': ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| summarize sum(score)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"Customer Satisfaction","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"background"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{}},"histogram":{"dataMappings":[{"valueAxis":"sum(score)","rangeAxis":""}]}}},"19":{"type":"markdown","title":"","content":"## User Sentiment Analysis\n"},"20":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD ': ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| fieldsKeep prompt, score\n| summarize sum(score), by:{prompt}","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"table","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxis":"prompt","valueAxis":"sum(score)","categoryAxisLabel":"prompt","valueAxisLabel":"sum(score)"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{"category":"prompt","value":"sum(score)"}},"histogram":{"dataMappings":[{"valueAxis":"sum(score)","rangeAxis":""}]}}},"21":{"type":"markdown","title":"","content":"## Customer Feedback by Prompt"},"22":{"type":"markdown","title":"","content":"- `0` = No feedback received (neutral)\n- More negative = worse\n- More positive = better\n"},"23":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD ': ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| fieldsKeep prompt, score\n| summarize sum(score), by:{prompt}\n| filter `sum(score)` < 0","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"table","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxis":"prompt","valueAxis":"sum(score)","categoryAxisLabel":"prompt","valueAxisLabel":"sum(score)"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{"category":"prompt","value":"sum(score)"}},"histogram":{"dataMappings":[{"valueAxis":"sum(score)","rangeAxis":""}]}}},"24":{"type":"markdown","title":"","content":"## Negative Feedback"}},"layouts":{"0":{"x":0,"y":11,"w":13,"h":4},"1":{"x":0,"y":7,"w":3,"h":3},"2":{"x":0,"y":21,"w":3,"h":3},"3":{"x":0,"y":6,"w":9,"h":1},"4":{"x":3,"y":7,"w":3,"h":3},"5":{"x":6,"y":7,"w":3,"h":3},"6":{"x":0,"y":20,"w":17,"h":1},"7":{"x":9,"y":0,"w":10,"h":1},"8":{"x":9,"y":1,"w":5,"h":3},"9":{"x":9,"y":4,"w":4,"h":2},"11":{"x":14,"y":1,"w":3,"h":3},"12":{"x":3,"y":21,"w":3,"h":3},"13":{"x":14,"y":4,"w":4,"h":2},"14":{"x":0,"y":0,"w":8,"h":6},"15":{"x":0,"y":15,"w":17,"h":5},"16":{"x":13,"y":11,"w":3,"h":3},"17":{"x":0,"y":10,"w":18,"h":1},"18":{"x":8,"y":25,"w":12,"h":2},"19":{"x":0,"y":24,"w":10,"h":1},"20":{"x":0,"y":28,"w":11,"h":2},"21":{"x":0,"y":27,"w":11,"h":1},"22":{"x":0,"y":25,"w":8,"h":2},"23":{"x":11,"y":28,"w":9,"h":2},"24":{"x":11,"y":27,"w":11,"h":1}},"importedWithCode":false} \ No newline at end of file +{"version":14,"variables":[{"key":"KubernetesMode","type":"query","input":"fetch dt.entity.cloud_application_namespace\n| fields entity.name\n| dedup entity.name\n| append [data record(entity.name=\"\")]","multiple":false,"defaultValue":""}],"tiles":{"0":{"type":"data","title":"Total Search Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| makeTimeseries count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"lineChart","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"legend":{"hidden":true},"fieldMapping":{"timestamp":"timeframe","leftAxisValues":["count()"],"leftAxisDimensions":[]},"categoricalBarChartSettings":{},"hiddenLegendFields":[]},"singleValue":{"showLabel":true,"label":"","prefixIcon":"","autoscale":true,"alignment":"center"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"honeycomb":{"shape":"square","dataMappings":{}},"histogram":{"dataMappings":[{"valueAxis":"interval","rangeAxis":""}]}}},"1":{"type":"data","title":"Total","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"2":{"type":"data","title":"Cache Hit Rate","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| summarize genCount = toDouble(countIf(matchesPhrase(content, \"gpt-3.5\"))),\n vecEmbeddingCount = toDouble(countIf(matchesPhrase(content, \"text-embedding-ada-002\")))\n| fieldsAdd totalCount = genCount + vecEmbeddingCount\n| fieldsAdd cacheHitRate = vecEmbeddingCount / totalCount * 100\n| fieldsKeep cacheHitRate","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cacheHitRate"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cacheHitRate","unitCategory":"percentage","baseUnit":"percent","displayUnit":null,"decimals":0,"suffix":"","delimiter":false,"added":1702472811365}],"histogram":{"dataMappings":[{"valueAxis":"cacheHitRate","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"3":{"type":"markdown","title":"","content":"## OpenAI Requests"},"4":{"type":"data","title":"Generations","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"served from OpenAI","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"5":{"type":"data","title":"Vectors","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"text-embedding-ada-002\")\n| summarize count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"served from cache","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"6":{"type":"markdown","title":"","content":"### Semantic Cache Quick View\nSee also dedicated Weaviate dashboards for deeper statistics"},"7":{"type":"markdown","title":"","content":"## OpenAI Token Costs"},"8":{"type":"data","title":"Prompt Token Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\")\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize promptTokensCount = sum(promptTokens)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"promptTokensCount"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{},"sortBy":{"columnId":"[\"timestamp\"]","direction":"descending"}},"histogram":{"dataMappings":[{"valueAxis":"promptTokensCount","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"9":{"type":"data","title":"Completion Token Count","query":"fetch logs\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize completionTokensCount = sum(completionTokens)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"completionTokensCount"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"completionTokensCount","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"11":{"type":"data","title":"Costs","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") \n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize cost = (sum(promptTokens) / 1000.0 * 0.0010) + (sum(completionTokens) / 1000.0 * 0.0020) ","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cost"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cost","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":4,"suffix":"","delimiter":false,"added":1702478013644}],"histogram":{"dataMappings":[{"valueAxis":"cost","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"12":{"type":"data","title":"Costs","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"text-embedding-ada-002\")\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize cost = (sum(promptTokens) / 1000.0 * 0.0001) ","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cost"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cost","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":4,"suffix":"","delimiter":false,"added":1702478013644}],"histogram":{"dataMappings":[{"valueAxis":"cost","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"13":{"type":"data","title":"Cache Saving","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| parse content, \"LD 'prompt_tokens=' INT:promptTokens\"\n| parse content, \"LD 'completion_tokens=' INT:completionTokens\"\n| parse content, \"LD 'model=' STRING:llmModel\"\n| summarize genCount = countIf(matchesPhrase(content, \"gpt-3.5\")),\n vecEmbeddingCount = countIf(matchesPhrase(content, \"text-embedding-ada-002\")),\n sumCompletions = sum(completionTokens),\n sumPrompts = sum(promptTokens)\n| fieldsAdd cacheSaving = sumCompletions / genCount * vecEmbeddingCount / 1000 * 0.0020\n| fieldsKeep cacheSaving","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"content","valueAxisLabel":"promptTokens"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"cacheSaving"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"unitsOverrides":[{"identifier":"cacheSaving","unitCategory":"currency","baseUnit":"usd","displayUnit":null,"decimals":3,"suffix":"","delimiter":false,"added":1702494249230}],"histogram":{"dataMappings":[{"valueAxis":"cacheSaving","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"14":{"type":"markdown","title":"","content":"![openai logo](https://upload.wikimedia.org/wikipedia/commons/4/4d/OpenAI_Logo.svg)"},"15":{"type":"data","title":"Search Volume by Prompt","query":"fetch logs\n| filter matchesPhrase(content, \"GET /api/v1/completion?prompt=\")\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| parse content, \"LD 'prompt=' STRING:prompt\"\n| fieldsKeep timestamp, prompt\n// Make a timeseries to chart count of prompts, split by the prompt phrase\n| makeTimeseries { count(), by: prompt }","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"lineChart","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxis":"prompt","categoryAxisLabel":"prompt","valueAxis":"interval","valueAxisLabel":"interval"},"hiddenLegendFields":["count()"],"fieldMapping":{"timestamp":"timeframe","leftAxisValues":["count()"],"leftAxisDimensions":["prompt"]},"leftYAxisSettings":{"label":"Search Volume by Prompt","min":"auto"},"colorPalette":"fireplace","seriesOverrides":[]},"singleValue":{"showLabel":true,"label":"","prefixIcon":"","recordField":"prompt","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","dataMappings":{"category":"prompt","value":"prompt"}},"histogram":{"dataMappings":[{"valueAxis":"interval","rangeAxis":""}]},"unitsOverrides":[]}},"16":{"type":"data","title":"Total Search Count","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"gpt-3.5\") or matchesPhrase(content, \"text-embedding-ada-002\")\n| fieldsKeep content\n| summarize count()\n//| makeTimeseries count()","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"legend":{"hidden":true},"categoricalBarChartSettings":{},"hiddenLegendFields":[]},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","autoscale":true,"alignment":"center","recordField":"count()","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[["content"]],"columnWidths":{}},"histogram":{"dataMappings":[{"valueAxis":"count()","rangeAxis":""}]},"honeycomb":{"shape":"square","dataMappings":{}}}},"17":{"type":"markdown","title":"","content":"## Search Intelligence"},"18":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD 'for search term: ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| summarize sum(score)","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"singleValue","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{}},"singleValue":{"showLabel":true,"label":"Customer Satisfaction","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"background"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{}},"histogram":{"dataMappings":[{"valueAxis":"sum(score)","rangeAxis":""}]}}},"19":{"type":"markdown","title":"","content":"## User Sentiment Analysis\n"},"20":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD 'for search term: ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| fieldsKeep prompt, score\n| summarize sum(score), by:{prompt}","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"table","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxis":"prompt","valueAxis":"sum(score)","categoryAxisLabel":"prompt","valueAxisLabel":"sum(score)"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{"category":"prompt","value":"sum(score)"}},"histogram":{"dataMappings":[{"valueAxis":"sum(score)","rangeAxis":""}]}}},"21":{"type":"markdown","title":"","content":"## Customer Feedback by Prompt"},"22":{"type":"markdown","title":"","content":"- `0` = No feedback received (neutral)\n- More negative = worse\n- More positive = better\n"},"23":{"type":"data","title":"","query":"fetch logs\n// filter by the namespace or set the filter to if running demo locally\n| filter ($KubernetesMode!=\"\" and k8s.namespace.name == $KubernetesMode)\n or ($KubernetesMode==\"\" and isNull(k8s.namespace.name))\n| filter matchesPhrase(content, \"user feedback for search term:\")\n| parse content, \"LD 'for search term: ' STRING:prompt\"\n| fieldsAdd score = if(matchesPhrase(content, \"Positive\"), 1, else: -1)\n| fieldsKeep prompt, score\n| summarize sum(score), by:{prompt}\n| filter `sum(score)` < 0","davis":{"enabled":false,"davisVisualization":{"isAvailable":true}},"visualization":"table","visualizationSettings":{"thresholds":[{"id":1,"field":"sum(score)","title":"","isEnabled":true,"rules":[{"id":0,"color":{"Default":"var(--dt-colors-charts-categorical-color-09-default, #649438)"},"comparator":">","label":"","value":0},{"id":1,"color":{"Default":"var(--dt-colors-charts-categorical-color-02-default, #2c2f3f)"},"comparator":"=","label":"","value":0},{"id":2,"color":{"Default":"var(--dt-colors-charts-categorical-color-12-default, #cd3741)"},"comparator":"<","label":"","value":0}]}],"chartSettings":{"gapPolicy":"connect","circleChartSettings":{"groupingThresholdType":"relative","groupingThresholdValue":0,"valueType":"relative"},"categoryOverrides":{},"categoricalBarChartSettings":{"categoryAxisLabel":"prompt","valueAxisLabel":"sum(score)"}},"singleValue":{"showLabel":false,"label":"","prefixIcon":"","recordField":"sum(score)","autoscale":true,"alignment":"center","colorThresholdTarget":"value"},"table":{"rowDensity":"condensed","enableSparklines":false,"hiddenColumns":[],"lineWrapIds":[],"columnWidths":{}},"honeycomb":{"shape":"hexagon","legend":"auto","dataMappings":{}},"histogram":{"dataMappings":[]}}},"24":{"type":"markdown","title":"","content":"## Negative Feedback"}},"layouts":{"0":{"x":0,"y":11,"w":13,"h":4},"1":{"x":0,"y":7,"w":3,"h":3},"2":{"x":0,"y":21,"w":3,"h":3},"3":{"x":0,"y":6,"w":9,"h":1},"4":{"x":3,"y":7,"w":3,"h":3},"5":{"x":6,"y":7,"w":3,"h":3},"6":{"x":0,"y":20,"w":17,"h":1},"7":{"x":9,"y":0,"w":10,"h":1},"8":{"x":9,"y":1,"w":5,"h":3},"9":{"x":9,"y":4,"w":4,"h":2},"11":{"x":14,"y":1,"w":3,"h":3},"12":{"x":3,"y":21,"w":3,"h":3},"13":{"x":14,"y":4,"w":4,"h":2},"14":{"x":0,"y":0,"w":8,"h":6},"15":{"x":0,"y":15,"w":17,"h":5},"16":{"x":13,"y":11,"w":3,"h":3},"17":{"x":0,"y":10,"w":18,"h":1},"18":{"x":8,"y":25,"w":12,"h":2},"19":{"x":0,"y":24,"w":10,"h":1},"20":{"x":0,"y":28,"w":10,"h":2},"21":{"x":0,"y":27,"w":11,"h":1},"22":{"x":0,"y":25,"w":8,"h":2},"23":{"x":11,"y":28,"w":9,"h":2},"24":{"x":11,"y":27,"w":11,"h":1}},"importedWithCode":false} \ No newline at end of file