From 700ab6b462d8539f4606ce4aa1c6485b5b99094f Mon Sep 17 00:00:00 2001 From: wenjade wang Date: Tue, 31 Oct 2023 19:01:51 -0700 Subject: [PATCH] Update AzureSQLPromptFlow Examples --- .gitignore | 14 + AzureSQLPromptFlowSamples/src/README.md | 229 + .../src/requirements.txt | 29 + .../src/sql-promptflow-demo/acs/.env_sample | 5 + .../acs/azure_congnitive_search_prepare.ipynb | 519 ++ .../sql-promptflow-demo/batch_run_and_eval.py | 113 + .../configs/flow_config_sample.json | 23 + .../configs/key_config_local_sample.json | 6 + .../data/batch_run_data.jsonl | 10 + .../src/sql-promptflow-demo/deploy.py | 212 + .../deployment/deployment_base.yaml | 28 + .../deployment/endpoint_base.yaml | 3 + .../deployment/model_base.yaml | 14 + .../evaluation/.promptflow/flow.tools.json | 51 + .../lkg_sources/aggregate_variants_results.py | 28 + .../.promptflow/lkg_sources/concat_scores.py | 29 + .../lkg_sources/groundedness_score.jinja2 | 35 + .../evaluation/aggregate_variants_results.py | 28 + .../evaluation/concat_scores.py | 29 + .../evaluation/flow.dag.sample.yaml | 56 + .../evaluation/groundedness_score.jinja2 | 35 + .../evaluation/requirements.txt | 1 + .../promptflow/.promptflow/chat.detail.json | 8036 +++++++++++++++++ .../promptflow/.promptflow/chat.output.json | 255 + .../promptflow/.promptflow/flow.detail.json | 1 + .../promptflow/.promptflow/flow.layout.json | 45 + .../promptflow/.promptflow/flow.log | 14 + .../promptflow/.promptflow/flow.tools.json | 4 + .../get_retrieved_documents.cpython-310.pyc | Bin 0 -> 482 bytes .../retrieve_customer.cpython-310.pyc | Bin 0 -> 1471 bytes .../retrieve_orders.cpython-310.pyc | Bin 0 -> 2166 bytes .../retrieve_products.cpython-310.pyc | Bin 0 -> 1890 bytes .../retrieve_products_stats.cpython-310.pyc | Bin 0 -> 1945 bytes .../promptflow/chat.jinja2 | 83 + .../promptflow/flow.dag.sample.yaml | 603 ++ .../promptflow/get_retrieved_documents.py | 9 + .../promptflow/requirements.txt | 1 + .../promptflow/retrieve_customer.py | 32 + .../promptflow/retrieve_orders.py | 43 + .../promptflow/retrieve_products.py | 56 + .../promptflow/retrieve_products_stats.py | 44 + .../promptflow/single_run_data.jsonl | 1 + .../src/sql-promptflow-demo/run.py | 65 + .../src/sql-promptflow-demo/setup.py | 127 + 44 files changed, 10916 insertions(+) create mode 100644 .gitignore create mode 100644 AzureSQLPromptFlowSamples/src/README.md create mode 100644 AzureSQLPromptFlowSamples/src/requirements.txt create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/.env_sample create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/azure_congnitive_search_prepare.ipynb create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/batch_run_and_eval.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/flow_config_sample.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/key_config_local_sample.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/data/batch_run_data.jsonl create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deploy.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/deployment_base.yaml create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/endpoint_base.yaml create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/model_base.yaml create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/flow.tools.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/aggregate_variants_results.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/concat_scores.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/groundedness_score.jinja2 create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/aggregate_variants_results.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/concat_scores.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/flow.dag.sample.yaml create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/groundedness_score.jinja2 create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/requirements.txt create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.detail.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.output.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.detail.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.layout.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.log create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.tools.json create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/get_retrieved_documents.cpython-310.pyc create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_customer.cpython-310.pyc create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_orders.cpython-310.pyc create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_products.cpython-310.pyc create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_products_stats.cpython-310.pyc create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/chat.jinja2 create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/flow.dag.sample.yaml create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/get_retrieved_documents.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/requirements.txt create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_customer.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_orders.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products_stats.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/single_run_data.jsonl create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/run.py create mode 100644 AzureSQLPromptFlowSamples/src/sql-promptflow-demo/setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f97ec0d --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +.env +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/flow_config.json +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/key_config_local.json +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/flow.dag.yaml +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/flow.dag.yaml + +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/deployment.yaml +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/endpoint.yaml +AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/model.yaml diff --git a/AzureSQLPromptFlowSamples/src/README.md b/AzureSQLPromptFlowSamples/src/README.md new file mode 100644 index 0000000..ddd29e2 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/README.md @@ -0,0 +1,229 @@ +# Azure SQL Promptflow Samples + +This is the code repository for Azure SQL Promptflow Demo. It demonstrates how to create a chatbot that can query the data from your own Azure SQL database. + +## Prerequisites +- Azure subscription +- Azure Cognitive Search service +- Azure Machine Learning workspace +- Azure SQL Server with Sample AdventureWorksLT database +- Azure Open AI service + +and the following python packages + +## Developers: Note + +This works with the latest promptflow version as of 10/31/2023, the further improvement of promptflow will be updated in the future. + +## Getting started + +### Install VSCode and Promptflow + +- You need to install Visual studio Code: [Here](https://code.visualstudio.com/). +- You also need to install the PromptFlow extension, available here: [Prompt Flow community ecosystem](https://learn.microsoft.com/azure/machine-learning/prompt-flow/community-ecosystem?view=azureml-api-2). + +### Install python packages + +**Warning:** As far as we know, the only vesion of python currently working is python 3.9 environment. + +And install the packages by: + +```bash +pip install -r requirements.txt +``` + +(Optional, install VS code extension: [https://marketplace.visualstudio.com/items?itemName=ms-python.python]) + +### Filling in configurations needed + +Create configure files in the `src/sql-promptflow-demo/configs` based on the sample files. You will need to set up Azure Open AI (AOAI), Azure Congnitive Search (ACS) and Azure SQL Server with sample AdentureWorksLT database. + + +Note that we have two models, `aoai_deployment_name` and `aoai_agent_deployment_name`. Those can be the same, but however: + +1. `aoai_deployment_name` is used for the final answer produced by the model. +2. `aoai_agent_deployment_name` is used to reformulate the question you are asking adequately. + +Default build_image: `mcr.microsoft.com/azureml/promptflow/promptflow-runtime:latest` + + +### Sending secret keys to Key Vault + +The AML workspace used to deploy this flow comes with a default key vault for storing secret keys. Navigate to the AML workspace in Azure Portal and in the Overview pane find the associated key vault. Grab its URI and add it as the `keyvault_uri` key within your team config. + +For the file `src/sql-promptflow-demo/configs/key_config_local.json` in the copilot dir (file not tracked by git) and add the following JSON structure and save: + +```json +{ + "aoai-api-key": "YOUR_OPENAI_KEY", + "aoai-api-key-embed": "YOUR_OPENAI_KEY", + "acs-key": "YOUR_ACS_KEY", + "connectionString": "SQL_CONNECTION_STRING", +} +``` + +You can copy `config_local_sample.json` as well. + +These secrets are used to access ACS, AOAI, and Azure SQL database. They will be uploaded with setup.py is run. + +Now your secrets should be in key vault, and the flow can access these secrets locally via your `az login` auth and in deployment via the default key vault association with AML. + +**IMPORTANT:** you need to give yourself access to the Key Vault. + +- You can do this by navigating to the Key Vault on the Azure Portal +- Click on *Access policies* And *+ Create*. +- Add yourself with all secret privileges. + +**Note:** secrets in Azure Key Vault must consist of lowercase alphanumeric characters or dashes (-). Because of this, existing config_local.json values (prior to Key Vault) need to be renamed to fit this format (lowercase, replace `_` with `-`). + + +### Run setup.py to set up the flow + +```powershell +python setup.py +``` +In case you experience authentication errors, replace `credential = DefaultAzureCredential()` with `credential = DefaultAzureCredential(exclude_shared_token_cache_credential=True)`. You will need to replace it in promptflow modules as well. +### Test the flow + +```bash +# run chat flow with default question in flow.dag.yaml +python -m promptflow._cli.pf flow test --flow . --interactive +``` + +Alternatively, you can open in VS code the `flow.dag.yaml`, and there is a little "run all" icon that looks like >> at the top right, you can click it to run. + +### Batch run and evaluate the flow +Prepare batch run data `data\batch_run_data.jsonl` and run the following command to batch run the flow and evaluate the results. + +```bash +python batch_run_and_eval.py +``` + +### Deploy the flow on local + +See below, go to the parent directory first! + +```bash +# go to parent directory +cd .. +# run chat flow with default question in flow.dag.yaml +python -m promptflow._cli.pf flow serve --source promptflow --port 8080 --host localhost +``` + +Then it can be tested with (use git bash): + +```bash +curl http://localhost:8080/score --data '{"chat_history":[], "question":"Why my jobs are running slow?", "team_name":"test"}' -X POST -H "Content-Type: application/json" +``` + +The above doesn't work in Windows Powershell, this alternate command with Invoke-WebRequest worked instead: + +```powershell +$uri = "http://localhost:8080/score" +$body = @{ + chat_history = @() + question = "Why my jobs are running slow?" + team_name = "test" +} | ConvertTo-Json + +$headers = @{ + "Content-Type" = "application/json" +} + +$response = Invoke-WebRequest -Uri $uri -Method POST -Body $body -Headers $headers + +# Display the response (if needed) +$response.Content +``` + +### Run the flow on cloud + +The same flow can be executed on cloud, and the code will be uploaded to AML workspace. After that, you can deploy using the portal's UI. The job can be found from the output of the run.py as well as from the portal. + +1. To run, one need to create runtime first. And in the config.json, put the runtime name there. +2. You need to create two connections from portal, one is for AzureOpenAI connection with `azure_open_ai_connection_name` name that you specified in `configs/flow_config_sample.json`. And the other is customized connection that contains key for ACS and SQL database with name `SQLDB_connection_name` that you specified in `configs/flow_config_sample.json`. Here is the detailed steps. [reference](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/tools-reference/python-tool?view=azureml-api-2#how-to-consume-custom-connection-in-python-tool). + +For `azure_open_ai_connection_name`, you will need to create a connection to store the AOAI model parameters for the chat. + +For `SQLDB_connection_name`, you will need to create a connection to store the SQL database connection string. + +```json +{ + "OPENAI_API_BASE_EMBED": "https://{LLM}.openai.azure.com/", + "connectionString": "SQL_CONNECTION_STRING", + "OPENAI_API_KEY_EMBED": "YOUR_OPENAI_KEY", + "OPENAI_API_VERSION": "2023-03-15-preview", + "search-key": "YOUR_ACS_KEY", +} +``` + +```bash +# go to parent directory +cd .. +# run chat flow with default question in flow.dag.yaml +python run.py +``` + +### Deploy on cloud + +For set up the promptflow, the user should have run the `setup.py` file, which will modify the workload file (`flow.dag.yaml`). + +By running the script of `deploy.py` step by step, one can create an endpoint for the flow in their azure machine learning workspace. +The `deploy.py` script will produce various deployment files under the `Deployments/` folder from tempaltes. + +**IMPORTANT**: there are two next steps you need to take to finialize setting up the PromptFlow endpoint. + +1. As for running on the cloud (see above), you will need to manually create the required connections on your PromptFlow endpoint. + CF [Create necessary connections](https://promptflow.azurewebsites.net/community/cloud/local-to-cloud.html#create-necessary-connections) for reference. + The name of the connection should match what you have set in your configuration file. +2. Once deployed, you need to allow the endpoint to use the connection that's stored in Azure ML. + 1. For this, navigate to your *Azure ML workspace* on the *Azure Portal*. + 2. Click on *Access control (IAM)* and click *+ Add*, *Role assignment*. + 3. In the role list, select *AzureML Data Scientist* and click *Next*. + 4. Click on *Managed identity*, *+ Select members*. + 5. Select your subscription and under *Managed identity* select *All system-assigned managed identities*. + 6. Search for an identity with the same name as your deployment endpoint and add it. + 7. Click *save*. +3. In addition, you will need to add the endpoint to access the default AzureML Key Vault for secrets + 1. Grab the application ID by searching the endpoint name in Azure Portal, going to the "Identity" tab and finding the object (principal) ID + 2. Navigate to Key Vault (can find in Overview of AzureML workspace) + 3. Goto *Access policies* and click *Create* + 4. Select *Get* under *Secret permissions*. This is all the endpoints will need. + 5. Hit Next + 6. Enter the app ID for the endpoint or search for it. + 7. Finalize the access policy + 8. The bot should now be able to access Key Vault + +**Note:** `config_local.json` is not copied to AzureML (security risk). A tmp directory is first created without this file and uploaded with the model. + +### Generate a docker + +See below, go to the parent directory first! + +```bash +# go to parent directory +cd .. +# run chat flow with default question in flow.dag.yaml +python -m promptflow._cli.pf flow export --source d:\Repos\DRICopilot0725\DRICopilot\src\core\copilot\promptflow --output d:\Repos --format docker +``` + +### Troubleshooting + +If running "az ml" results in the extension not being recognized, you may need to upgrade you azure cli: [https://learn.microsoft.com/azure/machine-learning/how-to-configure-cli?view=azureml-api-2&tabs=public] + +From the documentation: "The new Machine Learning extension requires Azure CLI version >=2.38.0. Ensure this requirement is met" + +After upgrading, run these commands to refresh things: + +```bash +az extension remove -n azure-cli-ml +az extension remove -n ml +az extension add -n ml +``` + +### References +- [Auzre SQL Database documentation](https://docs.microsoft.com/en-us/azure/azure-sql/database) +- [Azure Cognitive Search documentation](https://docs.microsoft.com/en-us/azure/search/) +- [Azure Machine Learning documentation](https://docs.microsoft.com/en-us/azure/machine-learning/) +- [Azure Open AI documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/) +- [PromptFlow documentation](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow?view=azureml-api-2/) diff --git a/AzureSQLPromptFlowSamples/src/requirements.txt b/AzureSQLPromptFlowSamples/src/requirements.txt new file mode 100644 index 0000000..2ff466d --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/requirements.txt @@ -0,0 +1,29 @@ +azure-ai-ml +azure-core +azure-identity +azure-keyvault +azure-kusto-data +azure-search-documents>=11.4.0b11 +azure-storage-blob +pyodbc +bs4 +jinja2 +jsbeautifier +langchain +logger +matplotlib +openai +pandas +plotly +promptflow>=0.1.0b8 +promptflow-tools +python-dotenv +ipywidgets +scikit-learn +scipy +tiktoken +tenacity +tqdm + +types-PyYAML +types-requests \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/.env_sample b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/.env_sample new file mode 100644 index 0000000..20d9833 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/.env_sample @@ -0,0 +1,5 @@ +connectionString="" +OPENAI_API_KEY_AZURE_Embeddings= +OPENAI_API_BASE_Embeddings="" +AZURE_SEARCH_SERVICE_ENDPOINT="" +AZURE_SEARCH_KEY= diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/azure_congnitive_search_prepare.ipynb b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/azure_congnitive_search_prepare.ipynb new file mode 100644 index 0000000..d090ec9 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/acs/azure_congnitive_search_prepare.ipynb @@ -0,0 +1,519 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Prepare Azure Cognitive Search with Vector Search\n", + "\n", + "This script demonstrates how to use the Azure Cognitive Search SDK to create an index over Azure AdventureLT database. This is used to create a search index for the Azure SQL promptflow demo.\n", + "\n", + "\n", + "### Prerequisites\n", + "\n", + "To run the code, you need to install the packages in the requirements.txt file. You can do this by running the following command:\n", + "\n", + "```python\n", + "pip install -r requirements.txt\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "import pyodbc\n", + "import json\n", + "import openai\n", + "from tqdm.auto import tqdm\n", + "from dotenv import load_dotenv\n", + "import os\n", + "from tenacity import retry, wait_random_exponential, stop_after_attempt\n", + "from azure.core.credentials import AzureKeyCredential\n", + "import requests\n", + "load_dotenv()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "# init openai service to create embeddings\n", + "openai.api_key = os.getenv(\"OPENAI_API_KEY_AZURE_Embeddings\")\n", + "openai.api_type = \"azure\"\n", + "openai.api_base = os.getenv(\"OPENAI_API_BASE_Embeddings\")\n", + "openai.api_version = \"2023-03-15-preview\"\n", + "\n", + "@retry(wait=wait_random_exponential(min=1, max=20), stop=stop_after_attempt(6))\n", + "# Function to generate embeddings for title and content fields, also used for query embeddings\n", + "def generate_embeddings(text, embedding_model_deploy_id=\"text-embedding-ada-002\"):\n", + " response = openai.Embedding.create(\n", + " input=text, engine=embedding_model_deploy_id)\n", + " embeddings = response['data'][0]['embedding']\n", + " return embeddings" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total records to be indexed: 294, the maximum length of the description field is 221 characters.\n" + ] + } + ], + "source": [ + "connectionString=os.environ[\"connectionString\"]\n", + "\n", + "# SQL QUERY to get products details from the database\n", + "sqlQuery=\"\"\"SELECT PC.Name AS ProductCategoryName, SP.ProductId, SP.Name, SP.ProductNumber, SP.Color, SP.ListPrice, SP.Size, SP.ProductCategoryID, SP.ProductModelID, PD.ProductDescriptionID, PD.Description\n", + "from [SalesLT].[Product] SP\n", + "INNER JOIN SalesLT.ProductCategory PC ON PC.ProductCategoryID = SP.ProductCategoryID\n", + "INNER JOIN [SalesLT].[ProductModelProductDescription] PMPD ON PMPD.ProductModelID = SP.ProductModelID\n", + "INNER JOIN [SalesLT].[ProductDescription] PD ON PD.ProductDescriptionID = PMPD.ProductDescriptionID\n", + "WHERE PMPD.Culture = 'en'\"\"\"\n", + "\n", + "# Connect to the database and execute the query to get the data for indexing\n", + "conn = pyodbc.connect(connectionString)\n", + "cursor = conn.cursor()\n", + "queryResults = pd.DataFrame()\n", + "try:\n", + " cursor.execute(sqlQuery)\n", + " records = cursor.fetchall()\n", + " queryResults = pd.DataFrame.from_records(records, columns=[col[0] for col in cursor.description])\n", + "except Exception as e:\n", + " print(f\"connection could not be established: {e}\")\n", + "finally:\n", + " cursor.close()\n", + "\n", + "queryResultsJson = json.loads(queryResults.to_json(orient='records'))\n", + "print(f\"Total records to be indexed: {len(queryResultsJson)}, the maximum length of the description field is {queryResults['Description'].str.len().max()} characters.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Generating embeddings for the product name and product description fields.\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "97b2f1a7a2bc414695204d583bede35c", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/294 [00:00", + "SQLDB_connection_name": "", + "aoai_type": "azure_open_ai", + "aoai_api_base": "", + "aoai_api_type": "azure", + "aoai_api_version": "2023-03-15-preview", + "aoai_deployment_name": "", + "OPENAI_API_BASE_EMBED": "", + "OPENAI_API_VERSION": "2023-03-15-preview", + "embed_deployment_name": "text-embedding-ada-002", + "max_retrieved_documents": 5, + "subscription_id": "", + "resource_group_name": "", + "workspace_name": "", + "promptflow_runtime": "", + "endpoint_name": "", + "endpoint_deployment_name": "promptflow-demo-v1-1", + "model_name": "", + "keyvault_uri": "", + "tenant-id": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "promptflow_image_base": "mcr.microsoft.com/azureml/promptflow/promptflow-runtime:20230927.v2" +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/key_config_local_sample.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/key_config_local_sample.json new file mode 100644 index 0000000..3ef79f8 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/configs/key_config_local_sample.json @@ -0,0 +1,6 @@ +{ + "aoai-api-key": "", + "aoai-api-key-embed": "", + "acs-key": "", + "connectionString": "" +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/data/batch_run_data.jsonl b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/data/batch_run_data.jsonl new file mode 100644 index 0000000..274a694 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/data/batch_run_data.jsonl @@ -0,0 +1,10 @@ +{"chat_history": [], "question": "Can you recommend some home exercise products for me?", "customer": {"FirstName": "A.", "MiddleName": "Francesca", "LastName": "Leonetti"}} +{"chat_history": [], "question": "Do you have products in yellow colors for me?", "customer": {"FirstName": "Abigail", "MiddleName": "J.", "LastName": "Gonzalez"}} +{"chat_history": [], "question": "What is the best selling products in general?", "customer": {"FirstName": "Abraham", "MiddleName": "L.", "LastName": "Swearengin"}} +{"chat_history": [], "question": "What products did I previously buy?", "customer": {"FirstName": "Aidan", "MiddleName": "", "LastName": "Delaney"}} +{"chat_history": [], "question": "Do you have socks that are less than 9 dollars?", "customer": {"FirstName": "Ajay", "MiddleName": "", "LastName": "Manchepalli"}} +{"chat_history": [], "question": "Which moutain bike is the least expensive?", "customer": {"FirstName": "Alan", "MiddleName": "", "LastName": "Brewer"}} +{"chat_history": [], "question": "What colors do you have for women's shorts?", "customer": {"FirstName": "Alan", "MiddleName": "", "LastName": "Steiner"}} +{"chat_history": [], "question": "What sizes do you have for women's mountain shorts?", "customer": {"FirstName": "Alberto", "MiddleName": "F.", "LastName": "Baltazar"}} +{"chat_history": [], "question": "Can you recommend some new products for me?", "customer": {"FirstName": "Alexander", "MiddleName": "J.", "LastName": "Berger"}} +{"chat_history": [], "question": "What is the best selling touring bikes?", "customer": {"FirstName": "Alexander", "MiddleName": "J.", "LastName": "Deborde"}} diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deploy.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deploy.py new file mode 100644 index 0000000..79962ce --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deploy.py @@ -0,0 +1,212 @@ +""" +Deploying this prompt flow to an endpoint. + +Copyright (c) Microsoft Corporation. All rights reserved. + +Author: Azure Data DRI Copilot Team +Assumptions: None +""" + +# Imports and loading config file +# ----------------------------------------------------------------------------- + + +# %% +import json +import yaml +import os +import shutil +import subprocess + +print("Loading configs from file.") +with open(f'./configs/flow_config.json') as f: + config = json.load(f) + +# Creating helper functions +# ----------------------------------------------------------------------------- + + +# %% +def run_command(command: list, verbose=True): + """Executing a command as a bus-process.""" + process = subprocess.Popen( + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) + stdout, stderr = process.communicate() + if verbose: + print(stdout.decode('utf-8')) + print(stderr.decode('utf-8')) + return stdout, stderr + + +def get_latest_model_version(model_name): + """Getting the latest model version for a given model.""" + command = 'az ml model list --output json'.split() + stdout, stderr = run_command(command, verbose=False) + model_list = json.loads(stdout.decode('utf-8')) + model_list = [model for model in model_list if model['name'] == model_name] + version_list = [int(model['latest version']) for model in model_list] + return max(version_list) + + +def check_if_deployment_exists(endpoint_name, endpoint_deployment_name): + """Checks if a given deployment already exists for an endpoint.""" + command = f"az ml online-deployment list --endpoint-name {endpoint_name} --output json".split( + ) + print(command) + stdout, stderr = run_command(command, verbose=False) + print(stdout.decode('utf-8')) + if stdout is not None and stdout.decode('utf-8') != '': + deployment_list = json.loads(stdout.decode('utf-8')) + return len(deployment_list) > 0 and any(obj.get("name") == endpoint_deployment_name for obj in deployment_list) + return False + + +# Main Execution +# ----------------------------------------------------------------------------- + +# %% +# For the first time, install the azure-cli-ml extension +# ----------------------------------------------------------------------------- +print("Install azure-cli-ml extension.") +command = ["az", "extension", "add", "-n", "ml"] +run_command(command) + +# %% +# Set subscription id +# ----------------------------------------------------------------------------- + +print("Set azure subscription id.") +command = ["az", "account", "set", "--subscription", config["subscription_id"]] +run_command(command) + +# %% +# Set workspace +# ----------------------------------------------------------------------------- +print("Config workspace.") +command = ["az", "configure", "--defaults", f'workspace={config["workspace_name"]}', + f'group={config["resource_group_name"]}'] +run_command(command) + +# %% +# Create endpoint using the endpoint.yaml. It will be generated from the template. +# ----------------------------------------------------------------------------- +print("Setting up endpoint deployment file.") +with open('./deployment/endpoint_base.yaml') as f: + config_flow = yaml.load(f, Loader=yaml.FullLoader) +# replace the deployment_name with the one you want to use +config_flow["name"] = config['endpoint_name'] + +# write the yaml file back +with open('./deployment/endpoint.yaml', 'w') as f: + yaml.dump(config_flow, f) + +print("Create endpoint if not exist.") +try: + command = ["az", "ml", "online-endpoint", + "create", "--file", "./deployment/endpoint.yaml"] + run_command(command, verbose=False) +except Exception as e: + command = ["az", "ml", "online-endpoint", + "update", "--file", "./deployment/endpoint.yaml"] + run_command(command) +finally: + print("Endpoint created.") + +# %% +# Register flow to a model in the AML workspace +# REMEMBER to: +# 1. Go to the azure portal for the workspace +# 2. add access control to the "data scientist role" for the endpoint for the workspace. +# ----------------------------------------------------------------------------- +print("Setting up model registration file.") +with open('./deployment/model_base.yaml') as f: + config_flow = yaml.load(f, Loader=yaml.FullLoader) +# replace the deployment_name with the one you want to use +config_flow["name"] = config['model_name'] + +# write the yaml file back +with open('./deployment/model.yaml', 'w') as f: + yaml.dump(config_flow, f) + +# %% +# Deploy model to AML workspace +# Before we upload model, we create tmp directory to store current solution +# We delete sensitive files (for now, config_local.json) +# ----------------------------------------------------------------------------- +src_for_tmp = './promptflow' +temp_dir = '../.copilot_tmp' + +# if temp_dir exists already, delete it +if os.path.exists(temp_dir): + shutil.rmtree(temp_dir) + +print(f'Creating temp directory: {temp_dir}') +os.makedirs(temp_dir, exist_ok=True) + +# %% +shutil.copytree(src_for_tmp, temp_dir, dirs_exist_ok=True) +# %% +# remove config_local.json from tmp folder +print('Removing config_local.json from tmp folder if it exists.') +# remove file if it exists +if os.path.exists(os.path.join(temp_dir, 'cofigs/key_config_local.json')): + os.remove(os.path.join(temp_dir, 'cofigs/key_config_local.json')) +# %% +print("Register model to AML workspace.") +command = ["az", "ml", "model", "create", "--file", "./deployment/model.yaml"] +# Run the command and capture its outputs +run_command(command) +# %% +# now we delete tmp folder +print(f'Deleting temp directory: {temp_dir}') +shutil.rmtree(temp_dir) + +# %% +# Grab latest model version from model registration step above +print('Getting latest model version...') +latest_model_version = get_latest_model_version(config['model_name']) +print(f'Latest model version: {latest_model_version}') + +# %% +# Set up endpoint deployment +# ----------------------------------------------------------------------------- +config_string = "deployment.subscription_id=,deployment.resource_group=,deployment.workspace_name=,deployment.endpoint_name=,deployment.deployment_name=" +config_string = config_string.replace("", config["subscription_id"]).replace( + "", config["resource_group_name"]).replace( + "", config["workspace_name"]).replace( + "", config["endpoint_name"]).replace( + "", config["endpoint_deployment_name"]) + +print("Setting up model deployment yaml.") +with open(r'./deployment/deployment_base.yaml') as f: + config_flow = yaml.load(f, Loader=yaml.FullLoader) + +# Replacing needed data in the deployment script. +config_flow["endpoint_name"] = config['endpoint_name'] +config_flow["environment_variables"]["PRT_CONFIG_OVERRIDE"] = config_string +config_flow["name"] = config["endpoint_deployment_name"] +config_flow["environment"]["image"] = config["promptflow_image_base"] + +model_name = config["model_name"] +config_flow["model"] = f"azureml:{model_name}:{latest_model_version}" + +# write the yaml file back +with open(r'./deployment/deployment.yaml', 'w') as f: + yaml.dump(config_flow, f) + +# %% +print('Pushing online deployment.') + +is_new_deployment = not check_if_deployment_exists( + config['endpoint_name'], config["endpoint_deployment_name"]) +if is_new_deployment: + command = ["az", "ml", "online-deployment", "create", "--file", + r"./deployment/deployment.yaml", "--all-traffic"] + run_command(command) +else: + # If run into existing deployment name, can update use the below + command = ["az", "ml", "online-deployment", "update", "--file", + r"./deployment/deployment.yaml"] + run_command(command) + +# %% diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/deployment_base.yaml b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/deployment_base.yaml new file mode 100644 index 0000000..5a8ed6d --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/deployment_base.yaml @@ -0,0 +1,28 @@ +$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json +endpoint_name: dummy +environment: + image: dummy + inference_config: + liveness_route: + path: /health + port: 8080 + readiness_route: + path: /health + port: 8080 + scoring_route: + path: /score + port: 8080 +environment_variables: + PROMPTFLOW_RESPONSE_INCLUDED_FIELDS: '["answer", "retrieved_documents"]' + PROMPTFLOW_RUN_MODE: serving + PRT_CONFIG_OVERRIDE: deployment.subscription_id=,deployment.resource_group=,deployment.workspace_name=,deployment.endpoint_name=,deployment.deployment_name= +instance_count: 1 +instance_type: Standard_DS3_v2 +liveness_probe: + timeout: 200 +model: dummy +name: promptflow-demo-v1-1 +readiness_probe: + timeout: 200 +request_settings: + request_timeout_ms: 200000 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/endpoint_base.yaml b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/endpoint_base.yaml new file mode 100644 index 0000000..69068dc --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/endpoint_base.yaml @@ -0,0 +1,3 @@ +$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineEndpoint.schema.json +auth_mode: key +name: dummy diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/model_base.yaml b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/model_base.yaml new file mode 100644 index 0000000..7658e5f --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/deployment/model_base.yaml @@ -0,0 +1,14 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +description: Register SQLDB promptflow model +name: dummy +path: ../../.copilot_tmp +properties: + azureml.promptflow.chat_history : chat_history + azureml.promptflow.chat_input: question + azureml.promptflow.chat_output: answer + azureml.promptflow.mode: chat + azureml.promptflow.source_flow_id: sql-promptflow-demo + azureml.promptflow.dag_file : flow.dag.yaml + is-promptflow : True + request_settings: + request_timeout_ms: 200000 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/flow.tools.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/flow.tools.json new file mode 100644 index 0000000..73f3134 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/flow.tools.json @@ -0,0 +1,51 @@ +{ + "package": {}, + "code": { + "groundedness_score.jinja2": { + "type": "llm", + "inputs": { + "context": { + "type": [ + "string" + ] + }, + "question": { + "type": [ + "string" + ] + }, + "answer": { + "type": [ + "string" + ] + } + }, + "description": "This is a llm tool", + "is_builtin": false + }, + "concat_scores.py": { + "type": "python", + "inputs": { + "groundesness_score": { + "type": [ + "string" + ] + } + }, + "function": "concat_results", + "is_builtin": false + }, + "aggregate_variants_results.py": { + "type": "python", + "inputs": { + "results": { + "type": [ + "object" + ] + } + }, + "function": "aggregate_variants_results", + "is_builtin": false + } + } +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/aggregate_variants_results.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/aggregate_variants_results.py new file mode 100644 index 0000000..390f53f --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/aggregate_variants_results.py @@ -0,0 +1,28 @@ +from typing import List +from promptflow import tool, log_metric +import numpy as np + + +@tool +def aggregate_variants_results(results: List[dict]): + aggregate_results = {} + for result in results: + for name, value in result.items(): + if name not in aggregate_results.keys(): + aggregate_results[name] = [] + try: + float_val = float(value) + except Exception: + float_val = np.nan + aggregate_results[name].append(float_val) + + for name, value in aggregate_results.items(): + metric_name = name + aggregate_results[name] = np.nanmean(value) + if 'pass_rate' in metric_name: + metric_name = metric_name + "(%)" + aggregate_results[name] = aggregate_results[name] * 100.0 + aggregate_results[name] = round(aggregate_results[name], 2) + log_metric(metric_name, aggregate_results[name]) + + return aggregate_results diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/concat_scores.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/concat_scores.py new file mode 100644 index 0000000..9fa6986 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/concat_scores.py @@ -0,0 +1,29 @@ +from promptflow import tool +import numpy as np +import re + + +@tool +def concat_results(groundesness_score: str): + + load_list = [{'name': 'gpt_groundedness', 'score': groundesness_score}] + score_list = [] + errors = [] + for item in load_list: + try: + score = item["score"] + match = re.search(r'\d', score) + if match: + score = match.group() + score = float(score) + except Exception as e: + score = np.nan + errors.append({"name": item["name"], "msg": str(e), "data": item["score"]}) + score_list.append({"name": item["name"], "score": score}) + + variant_level_result = {} + for item in score_list: + item_name = str(item["name"]) + variant_level_result[item_name] = item["score"] + variant_level_result[item_name + '_pass_rate'] = 1 if item["score"] > 3 else 0 + return variant_level_result diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/groundedness_score.jinja2 b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/groundedness_score.jinja2 new file mode 100644 index 0000000..e3a5dad --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/.promptflow/lkg_sources/groundedness_score.jinja2 @@ -0,0 +1,35 @@ +System: +You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. +User: +You will be presented with a CONTEXT and an ANSWER about that CONTEXT. You need to decide whether the ANSWER is entailed by the CONTEXT by choosing one of the following rating: +1. 5: The ANSWER follows logically from the information contained in the CONTEXT. +2. 1: The ANSWER is logically false from the information contained in the CONTEXT. +3. an integer score between 1 and 5 and if such integer score does not exists, use 1: It is not possible to determine whether the ANSWER is true or false without further information. + +Read the passage of information thoroughly and select the correct answer from the three answer labels. Read the CONTEXT thoroughly to ensure you know what the CONTEXT entails. + +Note the ANSWER is generated by a computer system, it can contain certain symbols, which should not be a negative factor in the evaluation. +Independent Examples: +## Example Task #1 Input: +{"CONTEXT": "The Academy Awards, also known as the Oscars are awards for artistic and technical merit for the film industry. They are presented annually by the Academy of Motion Picture Arts and Sciences, in recognition of excellence in cinematic achievements as assessed by the Academy's voting membership. The Academy Awards are regarded by many as the most prestigious, significant awards in the entertainment industry in the United States and worldwide.", "ANSWER": "Oscar is presented every other two years"} +## Example Task #1 Output: +1 +## Example Task #2 Input: +{"CONTEXT": "The Academy Awards, also known as the Oscars are awards for artistic and technical merit for the film industry. They are presented annually by the Academy of Motion Picture Arts and Sciences, in recognition of excellence in cinematic achievements as assessed by the Academy's voting membership. The Academy Awards are regarded by many as the most prestigious, significant awards in the entertainment industry in the United States and worldwide.", "ANSWER": "Oscar is very important awards in the entertainment industry in the United States. And it's also significant worldwide"} +## Example Task #2 Output: +5 +## Example Task #3 Input: +{"CONTEXT": "In Quebec, an allophone is a resident, usually an immigrant, whose mother tongue or home language is neither French nor English.", "ANSWER": "In Quebec, an allophone is a resident, usually an immigrant, whose mother tongue or home language is not French."} +## Example Task #3 Output: +5 +## Example Task #4 Input: +{"CONTEXT": "Some are reported as not having been wanted at all.", "ANSWER": "All are reported as being completely and fully wanted."} +## Example Task #4 Output: +1 + +Reminder: The return values for each task should be correctly formatted as an integer between 1 and 5. Do not repeat the context. + +## Actual Task Input: +{"CONTEXT": {{context}}, "ANSWER": {{answer}}} + +Actual Task Output: \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/aggregate_variants_results.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/aggregate_variants_results.py new file mode 100644 index 0000000..390f53f --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/aggregate_variants_results.py @@ -0,0 +1,28 @@ +from typing import List +from promptflow import tool, log_metric +import numpy as np + + +@tool +def aggregate_variants_results(results: List[dict]): + aggregate_results = {} + for result in results: + for name, value in result.items(): + if name not in aggregate_results.keys(): + aggregate_results[name] = [] + try: + float_val = float(value) + except Exception: + float_val = np.nan + aggregate_results[name].append(float_val) + + for name, value in aggregate_results.items(): + metric_name = name + aggregate_results[name] = np.nanmean(value) + if 'pass_rate' in metric_name: + metric_name = metric_name + "(%)" + aggregate_results[name] = aggregate_results[name] * 100.0 + aggregate_results[name] = round(aggregate_results[name], 2) + log_metric(metric_name, aggregate_results[name]) + + return aggregate_results diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/concat_scores.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/concat_scores.py new file mode 100644 index 0000000..9fa6986 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/concat_scores.py @@ -0,0 +1,29 @@ +from promptflow import tool +import numpy as np +import re + + +@tool +def concat_results(groundesness_score: str): + + load_list = [{'name': 'gpt_groundedness', 'score': groundesness_score}] + score_list = [] + errors = [] + for item in load_list: + try: + score = item["score"] + match = re.search(r'\d', score) + if match: + score = match.group() + score = float(score) + except Exception as e: + score = np.nan + errors.append({"name": item["name"], "msg": str(e), "data": item["score"]}) + score_list.append({"name": item["name"], "score": score}) + + variant_level_result = {} + for item in score_list: + item_name = str(item["name"]) + variant_level_result[item_name] = item["score"] + variant_level_result[item_name + '_pass_rate'] = 1 if item["score"] > 3 else 0 + return variant_level_result diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/flow.dag.sample.yaml b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/flow.dag.sample.yaml new file mode 100644 index 0000000..7eaba44 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/flow.dag.sample.yaml @@ -0,0 +1,56 @@ +inputs: + question: + type: string + default: What feeds all the fixtures in low voltage tracks instead of each light having a line-to-low voltage transformer? + is_chat_input: false + context: + type: string + default: Track lighting, invented by Lightolier, was popular at one period of time because it was much easier to install than recessed lighting, and individual fixtures are decorative and can be easily aimed at a wall. It has regained some popularity recently in low-voltage tracks, which often look nothing like their predecessors because they do not have the safety issues that line-voltage systems have, and are therefore less bulky and more ornamental in themselves. A master transformer feeds all of the fixtures on the track or rod with 12 or 24 volts, instead of each light fixture having its own line-to-low voltage transformer. There are traditional spots and floods, as well as other small hanging fixtures. A modified version of this is cable lighting, where lights are hung from or clipped to bare metal cables under tension + is_chat_input: false + answer: + type: string + default: The main transformer is the object that feeds all the fixtures in low voltage tracks. + is_chat_input: false +outputs: + gpt_groundedness: + type: object + reference: ${concat_scores.output.gpt_groundedness} + evaluation_only: false + is_chat_output: false +nodes: +- name: groundedness_score + type: llm + source: + type: code + path: groundedness_score.jinja2 + inputs: + question: ${inputs.question} + context: ${inputs.context} + answer: ${inputs.answer} + max_tokens: 256 + deployment_name: mp-aoi-gpt-4-32k + temperature: 0.0 + model: gpt-4 + api: chat + provider: AzureOpenAI + connection: DRI-Copilot-SQL-OAI + module: promptflow.tools.aoai + aggregation: false +- name: concat_scores + type: python + source: + type: code + path: concat_scores.py + inputs: + groundesness_score: ${groundedness_score.output} + aggregation: false +- name: aggregate_variants_results + type: python + source: + type: code + path: aggregate_variants_results.py + inputs: + results: ${concat_scores.output} + aggregation: true +environment: + python_requirements_txt: requirements.txt diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/groundedness_score.jinja2 b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/groundedness_score.jinja2 new file mode 100644 index 0000000..e3a5dad --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/groundedness_score.jinja2 @@ -0,0 +1,35 @@ +System: +You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. +User: +You will be presented with a CONTEXT and an ANSWER about that CONTEXT. You need to decide whether the ANSWER is entailed by the CONTEXT by choosing one of the following rating: +1. 5: The ANSWER follows logically from the information contained in the CONTEXT. +2. 1: The ANSWER is logically false from the information contained in the CONTEXT. +3. an integer score between 1 and 5 and if such integer score does not exists, use 1: It is not possible to determine whether the ANSWER is true or false without further information. + +Read the passage of information thoroughly and select the correct answer from the three answer labels. Read the CONTEXT thoroughly to ensure you know what the CONTEXT entails. + +Note the ANSWER is generated by a computer system, it can contain certain symbols, which should not be a negative factor in the evaluation. +Independent Examples: +## Example Task #1 Input: +{"CONTEXT": "The Academy Awards, also known as the Oscars are awards for artistic and technical merit for the film industry. They are presented annually by the Academy of Motion Picture Arts and Sciences, in recognition of excellence in cinematic achievements as assessed by the Academy's voting membership. The Academy Awards are regarded by many as the most prestigious, significant awards in the entertainment industry in the United States and worldwide.", "ANSWER": "Oscar is presented every other two years"} +## Example Task #1 Output: +1 +## Example Task #2 Input: +{"CONTEXT": "The Academy Awards, also known as the Oscars are awards for artistic and technical merit for the film industry. They are presented annually by the Academy of Motion Picture Arts and Sciences, in recognition of excellence in cinematic achievements as assessed by the Academy's voting membership. The Academy Awards are regarded by many as the most prestigious, significant awards in the entertainment industry in the United States and worldwide.", "ANSWER": "Oscar is very important awards in the entertainment industry in the United States. And it's also significant worldwide"} +## Example Task #2 Output: +5 +## Example Task #3 Input: +{"CONTEXT": "In Quebec, an allophone is a resident, usually an immigrant, whose mother tongue or home language is neither French nor English.", "ANSWER": "In Quebec, an allophone is a resident, usually an immigrant, whose mother tongue or home language is not French."} +## Example Task #3 Output: +5 +## Example Task #4 Input: +{"CONTEXT": "Some are reported as not having been wanted at all.", "ANSWER": "All are reported as being completely and fully wanted."} +## Example Task #4 Output: +1 + +Reminder: The return values for each task should be correctly formatted as an integer between 1 and 5. Do not repeat the context. + +## Actual Task Input: +{"CONTEXT": {{context}}, "ANSWER": {{answer}}} + +Actual Task Output: \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/requirements.txt b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/requirements.txt new file mode 100644 index 0000000..e9f7355 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/evaluation/requirements.txt @@ -0,0 +1 @@ +pyodbc \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.detail.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.detail.json new file mode 100644 index 0000000..889962c --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.detail.json @@ -0,0 +1,8036 @@ +{ + "flow_runs": [ + { + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "status": "Completed", + "error": null, + "inputs": { + "chat_history": [], + "customer": { + "FirstName": "Donald", + "LastName": "Blanton", + "MiddleName": "L." + }, + "question": "I'm looking for new bike jerseys for my customers" + }, + "output": { + "answer": "Hello Mr. Blanton, I found some bike jerseys in our database that you might be interested in for your customers. Here are the top options:\n\n1. **Long-Sleeve Logo Jersey**\n - Available Sizes: S, L, XL\n - Color: Multi\n - Price: $49.99\n - Description: Unisex long-sleeve AWC logo microfiber cycling jersey\n\n2. **Short-Sleeve Classic Jersey**\n - Available Sizes: M, XL\n - Color: Yellow\n - Price: $53.99\n - Description: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\n\nBased on your previous purchases, you bought a **Long-Sleeve Logo Jersey, M** and a **Short-Sleeve Classic Jersey, S**. Considering your customers' preferences, these two options should be suitable for them. The Long-Sleeve Logo Jersey is perfect for cooler weather, while the Short-Sleeve Classic Jersey is great for warmer days with its breathable material and moisture control.", + "retrieved_documents": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + "metrics": null, + "request": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "root_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "source_run_id": null, + "flow_id": "template_chat_flow", + "start_time": "2023-10-31T23:19:55.955482Z", + "end_time": "2023-10-31T23:20:01.856561Z", + "index": 0, + "api_calls": [ + { + "name": "get_customer_details", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": { + "FirstName": "Donald", + "LastName": "Blanton", + "MiddleName": "L." + } + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "start_time": 1698819595.956483, + "end_time": 1698819597.806704, + "error": null, + "children": null, + "node_name": "retrieve_customer" + }, + { + "name": "get_products", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "search_text": "I'm looking for new bike jerseys for my customers", + "top_k": 5 + }, + "output": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "start_time": 1698819595.957485, + "end_time": 1698819597.824704, + "error": null, + "children": [ + { + "name": "openai.api_resources.embedding.Embedding.create", + "type": "LLM", + "inputs": { + "input": "I'm looking for new bike jerseys for my customers", + "engine": "text-embedding-ada-002" + }, + "output": { + "object": "list", + "data": [ + { + "object": "embedding", + "index": 0, + "embedding": [ + -0.019217126071453094, + -0.018360724672675133, + -0.027612455189228058, + -0.00834991317242384, + -0.006575475446879864, + 0.018010379746556282, + -0.004972966853529215, + -0.006721452809870243, + 0.007383217569440603, + -0.03381487727165222, + -0.00016716451500542462, + -0.02138408087193966, + 0.010873701423406601, + -0.012547576799988747, + 0.0016519787022843957, + 0.009491781704127789, + 0.021656572818756104, + -0.009420414455235004, + 0.005865051411092281, + -0.033529408276081085, + 0.0074286325834691525, + 0.004223615862429142, + 0.02338235080242157, + 0.0017517299856990576, + -0.014104669913649559, + -0.010049739852547646, + 0.02852075919508934, + -0.013280708342790604, + 0.006059688050299883, + -0.016025085002183914, + 0.027612455189228058, + 0.02313581109046936, + -0.022396191954612732, + -0.02911764569580555, + -0.025160033255815506, + 0.017335638403892517, + 0.02523788809776306, + 0.01488321740180254, + 0.022512974217534065, + -0.006857698317617178, + 3.968763121520169e-05, + 0.010568770579993725, + 0.009511245414614677, + -0.025964532047510147, + -0.032932523638010025, + 0.005365483928471804, + -0.007402681279927492, + -0.011327854357659817, + -0.008674307726323605, + 0.01062067411839962, + -0.007162629161030054, + 0.012573528103530407, + -0.010211937129497528, + -0.0072599477134644985, + 0.02303200587630272, + -0.019307957962155342, + 0.01974913291633129, + 0.023693770170211792, + 0.024563146755099297, + -0.007525951135903597, + 0.0016171062598004937, + 0.007986591197550297, + -0.024121969938278198, + 0.011580881662666798, + -0.013494809158146381, + -0.025588233023881912, + -0.007993078790605068, + -0.018036330118775368, + -0.0059980531223118305, + 0.0056769028306007385, + 0.03539792075753212, + 0.0023518598172813654, + -0.02492646872997284, + 0.006277032662183046, + 0.015544981695711613, + -0.01959342509508133, + -0.010114618577063084, + -0.033477507531642914, + 0.008771625347435474, + 0.0021231616847217083, + 0.027041520923376083, + -0.03397058695554733, + -0.017361590638756752, + 0.015116780996322632, + 0.0295588206499815, + 0.036280274391174316, + -0.01106833852827549, + 0.007766002789139748, + -0.00589749077335, + -0.017919549718499184, + 0.020955881103873253, + 0.0034256053622812033, + 0.008408304303884506, + 0.006225129123777151, + -0.02802767977118492, + 0.006974480580538511, + -0.029195500537753105, + 0.025004323571920395, + 0.021461935713887215, + -0.017465395852923393, + -0.00654627988114953, + 0.004658304154872894, + -0.0036040223203599453, + -0.012670846655964851, + -0.010276815854012966, + 0.0005778276245109737, + -0.013131487183272839, + 0.002118295757099986, + 0.011827421374619007, + -0.010776383802294731, + -0.018775951117277145, + 0.050527676939964294, + 0.020462801679968834, + 0.0063581308349967, + 0.015025950968265533, + -0.003287737723439932, + 0.007305362727493048, + 0.020112454891204834, + -0.016440309584140778, + -0.028105534613132477, + 0.013715396635234356, + 0.025614185258746147, + 0.010614186525344849, + -0.022824393585324287, + 0.004681011661887169, + -0.005527681205421686, + -0.02204584702849388, + -0.012515137903392315, + -0.00486267264932394, + 0.020514704287052155, + 0.004583693575114012, + 0.004904843866825104, + 0.009874566458165646, + 0.029584772884845734, + -0.017387542873620987, + 0.013124998658895493, + -0.010036763735115528, + 0.01955449767410755, + -0.008382352069020271, + -0.02862456627190113, + -0.019775085151195526, + 0.022266434505581856, + 0.014091694727540016, + 0.012275085784494877, + -0.013974912464618683, + -0.007993078790605068, + -0.0021491132210940123, + -0.014701556414365768, + 0.013974912464618683, + -0.02846885658800602, + 0.0005571474321186543, + -0.011996106244623661, + 0.015817472711205482, + 0.019671278074383736, + -0.007143165450543165, + -0.005456314422190189, + 0.001787413377314806, + 0.01864619180560112, + -0.007221020292490721, + -0.006695501506328583, + 0.009459341876208782, + -0.012502161785960197, + 0.027612455189228058, + -0.02487456612288952, + 0.049982696771621704, + 0.016401382163167, + 0.028858128935098648, + 0.00884948018938303, + -0.007097750436514616, + 0.0003730535972863436, + 0.007246971596032381, + 0.020800171419978142, + -0.007707612123340368, + -0.006604671012610197, + -0.012210207059979439, + 0.018814878538250923, + -0.005054065492004156, + 0.010036763735115528, + -0.0013210963224992156, + -0.0020858561620116234, + 0.03384082764387131, + 0.0002505947195459157, + 0.023070933297276497, + 0.02802767977118492, + 0.004677767865359783, + -0.009134947322309017, + 0.005144895985722542, + -0.04487023875117302, + 0.001458963961340487, + -0.01273572538048029, + 0.014273355714976788, + 0.01699826866388321, + 4.835504660150036e-05, + -0.014130622148513794, + -0.6635293960571289, + 6.746390863554552e-05, + 0.014143597334623337, + -0.01336505077779293, + 0.023966262117028236, + 0.01939878799021244, + 0.01154195424169302, + 0.004989186301827431, + -0.029377160593867302, + 0.017841694876551628, + 0.0060304924845695496, + 0.013923009857535362, + -0.006014273036271334, + -0.004927551373839378, + -0.0055925603955984116, + -0.007512975484132767, + 0.015337369404733181, + -0.015973182395100594, + 0.026911763474345207, + -0.014844289980828762, + -0.027586502954363823, + -0.011165657080709934, + -0.0009610185516066849, + 0.004291738383471966, + 0.024316607043147087, + 0.015012974850833416, + -0.006961504928767681, + -0.0055925603955984116, + 0.014221452176570892, + 0.039316605776548386, + -0.03908304125070572, + 0.03955017030239105, + -0.006004541181027889, + -0.008953286334872246, + 0.042949825525283813, + -0.01136678084731102, + 0.017037196084856987, + 0.010776383802294731, + 0.00044158194214105606, + 0.030726641416549683, + -0.014221452176570892, + -0.0015124890487641096, + -0.0025124349631369114, + 0.015376296825706959, + 0.0009926470229402184, + 0.031531140208244324, + 0.02976643480360508, + -0.02064446173608303, + 0.015324393287301064, + -0.0029714531265199184, + 0.020008649677038193, + -0.00431444589048624, + -0.004239835310727358, + -0.008356400765478611, + 0.02527681551873684, + -0.001735510304570198, + 0.009978372603654861, + 0.0009658844792284071, + 0.023849479854106903, + 0.02044982649385929, + -0.02108563855290413, + 0.0018733779434114695, + -0.026807956397533417, + -0.011931227520108223, + -0.0068512107245624065, + 0.015350344590842724, + -0.020423874258995056, + -0.030596883967518806, + 0.020618511363863945, + -0.019307957962155342, + 0.0054692900739610195, + 0.00932309590280056, + -0.013948961161077023, + 0.023122835904359818, + -0.0033672142308205366, + 0.03690311312675476, + -0.013871106319129467, + -0.011327854357659817, + -0.014182524755597115, + -0.0016430577961727977, + 0.010769895277917385, + 0.010503891855478287, + -0.003860293887555599, + -0.02961072511970997, + 0.0364878885447979, + -0.0014362563379108906, + -0.009355535730719566, + -0.007863321341574192, + 0.019372835755348206, + 0.02643165923655033, + 0.026003457605838776, + 0.0004403654602356255, + 0.01685553602874279, + -0.0083758644759655, + -0.013391003012657166, + 0.0370069183409214, + 0.009537196718156338, + 0.027301035821437836, + 0.012352940626442432, + -0.029195500537753105, + -0.009582611732184887, + -0.01615484245121479, + -0.012119376100599766, + 0.01664792187511921, + 0.027560552582144737, + -0.003568338928744197, + 0.002226967830210924, + -0.017776815220713615, + 0.00500865001231432, + -0.02268165908753872, + 0.015376296825706959, + -0.011736591346561909, + -0.01829584687948227, + -0.010153545998036861, + -0.000998323899693787, + -0.034775085747241974, + 0.00969939399510622, + -0.005076772999018431, + 0.0060012973845005035, + -0.02378460019826889, + 0.005566608626395464, + 0.007545414846390486, + 0.03760380297899246, + -0.004567473661154509, + -0.008408304303884506, + 0.03360726311802864, + 0.00466154795140028, + 0.009653978981077671, + -0.010717992670834064, + -0.029948094859719276, + 0.02019030973315239, + -0.0023956529330462217, + 0.01869809627532959, + -0.015142732299864292, + 0.03550172597169876, + -0.0076686847023665905, + 0.010996971279382706, + 0.003779195249080658, + 0.008525085635483265, + -0.04082179814577103, + -0.03620241954922676, + 0.0075843422673642635, + -0.00862240418791771, + -0.02836504951119423, + 0.00036453825305216014, + -0.008959774859249592, + -0.024809686467051506, + 0.002559472108259797, + -0.030804496258497238, + 0.016064012423157692, + -0.019009513780474663, + -0.008810552768409252, + -0.006144030950963497, + -0.004324177745729685, + 0.00029013026505708694, + -0.0017890353919938207, + -0.009368511848151684, + -0.005080016795545816, + -0.024005189538002014, + -0.015051902271807194, + 0.012099912390112877, + -0.006955016870051622, + -0.0011305146617814898, + -0.004885380156338215, + 0.017335638403892517, + -0.010490916669368744, + -0.0047913058660924435, + 0.015194635838270187, + -0.0074286325834691525, + -0.034022487699985504, + -0.0009366889717057347, + -0.015973182395100594, + -0.013533735647797585, + 0.01448096800595522, + -0.01834774948656559, + 0.01450691930949688, + -0.018360724672675133, + 0.011249999515712261, + 0.0050281137228012085, + -0.012904411181807518, + -0.0024345803540199995, + 0.0028822445310652256, + -0.016167819499969482, + 0.03256920352578163, + 0.014545846730470657, + 0.008538061752915382, + -0.004411764442920685, + 0.04230103641748428, + -0.009848615154623985, + 0.017789790406823158, + -0.0015246538678184152, + 0.010730967856943607, + -0.028598614037036896, + -0.020229237154126167, + 0.01426037959754467, + -0.009121972136199474, + 0.0037240481469780207, + 0.020553631708025932, + 0.012956313788890839, + 0.010439013130962849, + 0.031583044677972794, + -0.01664792187511921, + 0.03760380297899246, + -0.006656574085354805, + 0.010458476841449738, + -0.02199394255876541, + 0.016064012423157692, + -0.0012756811920553446, + 0.024965396150946617, + 0.014896192587912083, + 0.010860726237297058, + -0.0494636632502079, + -0.01358563918620348, + -0.0030493077356368303, + 0.01724480837583542, + 0.01695934124290943, + 0.002196150366216898, + 0.026600344106554985, + -0.004797793924808502, + -0.00034588557900860906, + -0.005475778132677078, + 0.012158303521573544, + 0.01243728306144476, + -0.022824393585324287, + 0.005417387001216412, + 0.0038473180029541254, + -0.010510379448533058, + 0.03955017030239105, + -0.00787629745900631, + -0.009433390572667122, + -0.01695934124290943, + 0.007616781629621983, + 0.021461935713887215, + -0.009848615154623985, + -0.004580449312925339, + 0.010938580147922039, + 0.01161332055926323, + -0.0009058714495040476, + 0.05221452936530113, + -0.01843857951462269, + 0.03145328536629677, + 0.006974480580538511, + -0.010834774002432823, + -0.007863321341574192, + 0.03062283620238304, + 0.028780274093151093, + 0.016128892078995705, + -0.0072599477134644985, + -0.0002264678623760119, + 0.028910033404827118, + -0.005637975409626961, + -0.01069204043596983, + -0.013676469214260578, + 0.0163105521351099, + 0.005018381867557764, + 0.0034904840867966413, + 0.006351643241941929, + 0.015233563259243965, + 0.0023080664686858654, + 0.010108130984008312, + 0.005076772999018431, + -0.003292603651061654, + 0.02541954815387726, + 0.0031806875485926867, + 0.043209340423345566, + -0.005333044566214085, + -0.017517300322651863, + -0.006598182953894138, + -0.03057093173265457, + -0.010977507568895817, + 0.014636676758527756, + -0.016518164426088333, + 0.02748269774019718, + 0.004019246902316809, + 0.010328719392418861, + 0.0007452962454408407, + -0.004732914734631777, + -0.009212802164256573, + -0.01629757694900036, + 0.033036328852176666, + -0.021007783710956573, + -0.011879324913024902, + -0.005725562106817961, + 0.015480102971196175, + -0.0003479130391497165, + -0.00897923856973648, + -0.003211505012586713, + 0.03425605222582817, + -0.021007783710956573, + 0.034074392169713974, + 0.01915224827826023, + 0.0062575689516961575, + -0.0028935985174030066, + -0.012502161785960197, + 0.009167387150228024, + 0.011165657080709934, + 0.032179929316043854, + -0.035527680069208145, + 0.005047577433288097, + 0.014870241284370422, + 0.014247403480112553, + 0.021967992186546326, + 0.0017857913626357913, + -0.02732698805630207, + 0.0185942891985178, + 0.011639272794127464, + -0.0012773030903190374, + -0.014130622148513794, + 0.0037824392784386873, + -0.03773356229066849, + 0.010815310291945934, + -0.0009585855877958238, + -0.034230101853609085, + 0.0007233996293507516, + -0.008589964359998703, + -0.008038493804633617, + 0.007766002789139748, + -0.019282005727291107, + 0.022707611322402954, + 0.008739186450839043, + -0.0052357264794409275, + -0.004538278095424175, + -0.029143596068024635, + -0.007824393920600414, + 0.09737023711204529, + 0.012482698075473309, + -0.014701556414365768, + 0.00021146461949683726, + -0.0017776815220713615, + 0.013507784344255924, + 0.000845858477987349, + -0.015376296825706959, + -0.0005607968778349459, + 0.002402140758931637, + -0.006747404579073191, + 0.011918251402676105, + -0.0026389488484710455, + 0.0015076231211423874, + -0.006059688050299883, + -0.012359428219497204, + -0.0044150082394480705, + -0.009939446114003658, + -0.006740916520357132, + -0.004337153863161802, + -0.007798442151397467, + -0.00902465358376503, + 0.005566608626395464, + 0.002533520571887493, + 0.01820501685142517, + 0.03576124459505081, + 0.02971453033387661, + 0.026509514078497887, + 0.006747404579073191, + -0.004882136359810829, + -0.00994593370705843, + 0.0036234857980161905, + -0.012080448679625988, + 0.006825258955359459, + -0.0204368494451046, + -0.003860293887555599, + -0.007136677857488394, + 0.019619375467300415, + 0.04751729965209961, + 0.015142732299864292, + 0.0321020744740963, + 0.014584774151444435, + -0.008667819201946259, + 0.0006990700494498014, + 0.006484644953161478, + -0.012450258247554302, + 0.0045544980093836784, + 0.00448961928486824, + 0.0036980966106057167, + -0.03051902912557125, + 0.01825691945850849, + -0.01834774948656559, + -0.00020213828247506171, + -0.007759515196084976, + 0.012871971353888512, + 0.035579580813646317, + -0.008395328186452389, + -0.030233561992645264, + -0.011840397492051125, + -0.04411764442920685, + 0.0007221831474453211, + 0.010964532382786274, + 0.017491348087787628, + 0.0039024651050567627, + -0.021228373050689697, + -0.0024864834267646074, + -0.005086504854261875, + 0.003376946086063981, + -0.017270760610699654, + -0.021604670211672783, + -0.012346452102065086, + -0.02597750723361969, + -0.004453935660421848, + 0.016375431790947914, + 0.0015887217596173286, + 0.010354670695960522, + 0.018711071461439133, + -0.011658736504614353, + 0.02612023986876011, + 0.0008312607533298433, + -0.006831747014075518, + -0.005459558684378862, + 0.00181336491368711, + -0.018633216619491577, + -0.0222794096916914, + 0.01291089877486229, + 0.003037953982129693, + 0.008025518618524075, + -0.020618511363863945, + 0.012456746771931648, + 0.03311418369412422, + -0.016751728951931, + -0.0005912088672630489, + 0.005213018506765366, + 5.116181910125306e-06, + -0.010166522115468979, + 0.014636676758527756, + 0.019411763176321983, + -0.01825691945850849, + -0.023525085300207138, + -0.002509190933778882, + 0.011282438412308693, + 0.029247403144836426, + -0.011262974701821804, + 0.0321020744740963, + 0.02094290591776371, + 0.002929281909018755, + -0.015791522338986397, + 0.00036453825305216014, + 0.0020258433651179075, + -3.520186510286294e-05, + 0.004084126092493534, + 0.010062715969979763, + 0.026262974366545677, + -0.019982697442173958, + 0.015843424946069717, + 0.007182092871516943, + -0.003138516331091523, + 0.017387542873620987, + -0.011198095977306366, + 0.013884082436561584, + -0.03591695427894592, + 0.021617645397782326, + 0.002215614076703787, + -0.017465395852923393, + -0.000613105483353138, + 0.023304495960474014, + -0.02189013734459877, + 0.017115050926804543, + -0.009167387150228024, + -0.004690743517130613, + 0.009446365758776665, + -0.019930794835090637, + -0.0075843422673642635, + -0.0480622798204422, + -0.010906141251325607, + 0.007130189798772335, + 0.023317473009228706, + -0.01017300970852375, + -0.03978373482823372, + -0.029455015435814857, + -0.001960964407771826, + 0.023304495960474014, + 0.015220587141811848, + -0.011074826121330261, + -0.024641001597046852, + -0.000695826078299433, + 0.0021847966127097607, + -0.00897923856973648, + 0.028546711429953575, + -0.027794115245342255, + 0.008881920017302036, + -0.003250432200729847, + -0.01286548376083374, + -0.026911763474345207, + -0.04173010215163231, + -0.01764705777168274, + -0.019165223464369774, + -0.007843857631087303, + 0.02503027580678463, + 0.0312197208404541, + 0.007603805512189865, + 0.013754324056208134, + -0.02422577701508999, + -0.011392733082175255, + 0.00270544970408082, + -0.015194635838270187, + 0.0025367646012455225, + -0.018516434356570244, + -0.004781574010848999, + 0.023343423381447792, + -0.001024275436066091, + 0.0130666084587574, + -0.03311418369412422, + -0.014429064467549324, + 0.006416521966457367, + -0.0036656572483479977, + -0.02932525798678398, + -0.02488754130899906, + -0.01945069059729576, + 0.0017776815220713615, + -0.007532438728958368, + -0.0004168468585703522, + 0.004427984356880188, + -0.011230535805225372, + -0.0004565851704683155, + 0.041911762207746506, + -0.010886677540838718, + 0.005245458334684372, + -0.004307958297431469, + 0.011853372678160667, + -0.027093423530459404, + 0.016427334398031235, + -0.02044982649385929, + 0.011444635689258575, + 0.0010940202046185732, + -0.026146192103624344, + -0.015363320708274841, + -0.03132352605462074, + 0.010484428144991398, + 0.02582179754972458, + -0.005868295673280954, + -0.0003568338870536536, + -0.004869160708039999, + -0.014078718610107899, + 0.02278546616435051, + 0.00613105483353138, + -0.03516435623168945, + -0.004067906178534031, + -0.02229238674044609, + -0.007208044640719891, + -0.016751728951931, + -0.031790655106306076, + -0.030648786574602127, + -0.013280708342790604, + 0.02104671113193035, + -0.03269895911216736, + 0.020462801679968834, + -0.018620241433382034, + -0.005138407927006483, + 0.011438148096203804, + 0.006877162028104067, + 0.019878892228007317, + -0.02234428934752941, + 0.002048550872132182, + 0.023408303037285805, + -0.024342559278011322, + -0.021059686318039894, + -0.05589964985847473, + -0.01102292351424694, + -0.017128026112914085, + 0.0042982264421880245, + 0.031479235738515854, + -0.005693122278898954, + -0.03399653732776642, + 0.0031450041569769382, + -0.0008040927350521088, + -0.03259515389800072, + -0.013455881737172604, + 0.001787413377314806, + -0.005981833674013615, + 0.0277162604033947, + -0.013403978198766708, + -0.00746756000444293, + -0.03129757568240166, + 0.031738750636577606, + -0.003581314580515027, + -0.013300172053277493, + 0.0026438147760927677, + -0.010653113014996052, + -0.014403113164007664, + 0.026989618316292763, + -0.04006920009851456, + 0.02054065652191639, + 0.011892300099134445, + -0.010614186525344849, + -0.004830233287066221, + -0.010439013130962849, + 0.007246971596032381, + -0.018983563408255577, + -0.006734428461641073, + 0.029299305751919746, + 0.0022804930340498686, + 0.02503027580678463, + -0.0030525517649948597, + 0.023693770170211792, + -0.019165223464369774, + -0.00597210181877017, + -0.0032828717958182096, + 0.023369375616312027, + -0.007104238495230675, + 0.02299307845532894, + -0.018166089430451393, + -0.01331314817070961, + 0.004103589802980423, + 0.0033055793028324842, + -0.008025518618524075, + -0.012249134480953217, + 0.012138839811086655, + -0.013910033740103245, + 0.011275950819253922, + 0.010108130984008312, + -0.013014704920351505, + 0.0009074934641830623, + -0.027742212638258934, + -0.0046226209960877895, + -0.023525085300207138, + 0.0018717559287324548, + 0.008538061752915382, + -0.028391001746058464, + -0.02732698805630207, + -0.018814878538250923, + 0.022201554849743843, + 0.01575259491801262, + 0.007065311074256897, + 0.0017793035367503762, + 0.0037240481469780207, + 0.02722318097949028, + -0.0319204144179821, + 0.021955015137791634, + 0.010276815854012966, + -0.005907222628593445, + -0.011658736504614353, + 0.01178849395364523, + 0.010698528960347176, + -0.016440309584140778, + 0.01740051805973053, + -0.008278545923531055, + -0.013403978198766708, + -0.00208747829310596, + 0.009952421300113201, + -0.005517949350178242, + -0.017076123505830765, + -0.01171712763607502, + 0.025160033255815506, + -0.00812932476401329, + 0.0077854664996266365, + -0.032439444214105606, + -0.03942041099071503, + 0.0163105521351099, + -0.02553633041679859, + 0.00464857229962945, + 0.008499134331941605, + -0.014987023547291756, + 0.0020582827273756266, + -0.017465395852923393, + 0.0010510380379855633, + 0.007149653509259224, + -0.0023956529330462217, + -0.025808822363615036, + -0.03321799263358116, + 0.02099480852484703, + -0.006351643241941929, + -0.00016909060650505126, + -0.016920413821935654, + -0.012099912390112877, + -0.02294117584824562, + 0.006380838807672262, + 0.0020031356252729893, + 0.01401383988559246, + 0.008667819201946259, + 0.013235293328762054, + 0.021669548004865646, + 0.021825257688760757, + -0.02541954815387726, + -0.011438148096203804, + -0.021903112530708313, + 0.00018135676509700716, + -0.015882352367043495, + -0.003921928815543652, + 0.0051805791445076466, + 0.01910034380853176, + 0.013468856923282146, + -0.036669548600912094, + -0.012573528103530407, + -0.009615051560103893, + -0.023369375616312027, + 0.017685985192656517, + 0.01725778356194496, + 0.009738321416079998, + 0.010899653658270836, + 0.008116348646581173, + -0.02727508544921875, + 0.0037824392784386873, + 0.013494809158146381, + 0.022474046796560287, + 0.006273788399994373, + -0.0034645325504243374, + 0.00830449815839529, + -0.003600778291001916, + -0.010724480263888836, + 0.009829151444137096, + -0.05304497852921486, + -0.0030038924887776375, + 0.040562279522418976, + 0.0014411222655326128, + 0.015726642683148384, + 0.008907871320843697, + -0.004758866503834724, + -0.013702421449124813, + -0.025938579812645912, + -0.03641003370285034, + 0.007908736355602741, + 0.008830016478896141, + 0.03591695427894592, + -0.028105534613132477, + -0.03594290465116501, + 0.010302767157554626, + 0.01885380409657955, + 0.0019869159441441298, + 0.010724480263888836, + 0.0008474804926663637, + -0.010698528960347176, + 0.009303632192313671, + -0.0063743507489562035, + -0.013923009857535362, + -0.021448960527777672, + -0.006663061678409576, + 0.01695934124290943, + -0.014987023547291756, + -0.019969722256064415, + 0.02248702198266983, + 0.0025367646012455225, + -0.007740051485598087, + 0.008758650161325932, + 0.025847749784588814, + 0.008077421225607395, + -0.016245674341917038, + -0.002042063046246767, + -0.009141434915363789, + 0.008583476766943932, + 0.021552767604589462, + -0.004486375022679567, + 0.013546711765229702, + 0.0034385810140520334, + -0.008589964359998703, + 0.00293576973490417, + -0.003370458260178566, + -0.008109861053526402, + 0.0029033301398158073, + -0.029091693460941315, + -0.02138408087193966, + 0.019269030541181564, + -0.0033737022895365953, + 0.0016836071154102683, + -0.013702421449124813, + -0.020852074027061462, + -0.030804496258497238, + -0.0011921495897695422, + 0.00438905693590641, + -0.019775085151195526, + -0.02606833726167679, + 0.01493512000888586, + -0.01650518923997879, + 0.007396193221211433, + 0.007195068523287773, + 0.21197231113910675, + -0.015869375318288803, + -0.00551146175712347, + 0.022370241582393646, + 0.0037564877420663834, + 0.009413926862180233, + 0.007065311074256897, + -0.00160494155716151, + -0.0004586126306094229, + 0.015272490680217743, + 0.023797575384378433, + 0.00700691994279623, + -0.01102292351424694, + -0.005861807614564896, + 0.023901382461190224, + -0.002577313920482993, + -0.015622836537659168, + -0.0036624132189899683, + -0.023771625012159348, + 0.01730968803167343, + -0.008499134331941605, + 0.023122835904359818, + 0.019165223464369774, + -0.014091694727540016, + 0.016531141474843025, + 0.015544981695711613, + -0.01571366749703884, + -0.0094723179936409, + 0.008914358913898468, + 0.0010267083998769522, + -0.009634515270590782, + 0.0017014488112181425, + 0.01221669465303421, + -0.013196365907788277, + 0.018581314012408257, + 0.004810769576579332, + 0.016492214053869247, + -0.010542819276452065, + 0.0008032817277126014, + 0.02208477444946766, + 0.017141003161668777, + -0.01423442829400301, + 0.0034385810140520334, + 0.0022642731200903654, + -0.00512218801304698, + -0.017439445480704308, + -0.04198961704969406, + 0.0013259622501209378, + 0.00030776922358199954, + 0.004333909600973129, + -0.03371107205748558, + -0.022110724821686745, + 0.023109860718250275, + 0.03643598407506943, + 0.024018164724111557, + -0.015402248129248619, + 0.00283520738594234, + -0.004106833599507809, + -0.019580448046326637, + -0.015843424946069717, + -0.02129325084388256, + 0.00880406517535448, + 0.02148788794875145, + 0.015246538445353508, + -0.01610293984413147, + 0.011671711690723896, + -0.02054065652191639, + -0.028832178562879562, + 0.012404843233525753, + -0.001263516373001039, + -0.0012529735686257482, + -0.01669982634484768, + 0.022227507084608078, + -0.002968209097161889, + -0.020981833338737488, + -0.02019030973315239, + -0.0012708152644336224, + 0.03830449655652046, + 0.00992646999657154, + 0.02019030973315239, + -0.0070523349568247795, + 0.010257352143526077, + -0.005002162419259548, + 0.0014013840118423104, + -0.0047069634310901165, + -0.03339965268969536, + 0.004908088129013777, + 0.002368079498410225, + -0.0010599588276818395, + 0.004324177745729685, + -0.001456530997529626, + 0.003720804350450635, + -0.010439013130962849, + 0.009420414455235004, + 0.02133217826485634, + -0.005994809325784445, + -0.015480102971196175, + 0.020826123654842377, + -0.014403113164007664, + 0.005722317844629288, + -0.008525085635483265, + 0.016284601762890816, + -0.02288927137851715, + -0.009829151444137096, + -0.015168684534728527, + 0.002489727456122637, + -0.005414143204689026, + 0.014740483835339546, + -0.008382352069020271, + -0.02992214262485504, + -0.0019869159441441298, + -0.0225389264523983, + 0.017880622297525406, + 0.0010575258638709784, + 0.004930795636028051, + -0.012878458946943283, + 0.004016003105789423, + -0.023473182693123817, + 0.01293685007840395, + -0.017724912613630295, + -0.0033347748685628176, + -0.003594290465116501, + -0.007370241917669773, + -0.017530275508761406, + 0.017439445480704308, + -0.009128459729254246, + 0.006513840518891811, + -0.0033023355063050985, + 0.027534600347280502, + -0.02776816487312317, + 0.010497404262423515, + -0.005920198746025562, + -0.0068512107245624065, + -0.03220587968826294, + -0.024666953831911087, + 0.005887758918106556, + 0.011833908967673779, + -0.002622729167342186, + -0.0002487699966877699, + 0.006799307651817799, + 0.011691175401210785, + 0.011684687808156013, + -0.001826340681873262, + -0.01496107131242752, + 0.009349048137664795, + -0.02168252505362034, + 0.019710205495357513, + -0.016414359211921692, + -0.013481833040714264, + -0.006114835385233164, + 0.007097750436514616, + -0.009692905470728874, + -0.008310985751450062, + -0.03386677801609039, + 0.022512974217534065, + 0.012430795468389988, + -0.0181531123816967, + -0.02238321676850319, + -0.003089857054874301, + 0.020618511363863945, + -0.012223182246088982, + 2.3505925128119998e-05, + 0.033685117959976196, + 0.012560552917420864, + -0.01659601926803589, + -0.027456745505332947, + -0.16474047303199768, + 0.0065592555329203606, + 0.018827853724360466, + -0.012943338602781296, + 0.03321799263358116, + 0.004632352851331234, + 0.010179497301578522, + 0.007285899017006159, + -0.024290656670928, + 0.009134947322309017, + 0.033373698592185974, + -0.005024869926273823, + -0.032724909484386444, + -0.013118511065840721, + -0.003138516331091523, + -0.018179064616560936, + -0.011697663925588131, + 0.020229237154126167, + 0.0072275083512067795, + 0.011438148096203804, + 0.020112454891204834, + 0.0027800602838397026, + -0.00016696176317054778, + -0.009764272719621658, + -0.002974696923047304, + 0.0025156789924949408, + -0.014545846730470657, + 0.01834774948656559, + -0.0015319527592509985, + 0.002827097661793232, + -0.009958909824490547, + -0.012281573377549648, + 0.03057093173265457, + 0.0007692202925682068, + 0.0036656572483479977, + -0.0008101751445792615, + -0.004658304154872894, + -0.010601210407912731, + -0.004788062069565058, + 0.018127162009477615, + 0.002126405481249094, + 0.011230535805225372, + 0.033477507531642914, + 0.004976210650056601, + 0.006306227762252092, + 0.021319203078746796, + 0.014195500873029232, + -0.007564878556877375, + 0.001328395213931799, + -0.0181531123816967, + 0.027534600347280502, + -0.005076772999018431, + 0.018724046647548676, + 0.005144895985722542, + 0.02637975662946701, + 0.011924739927053452, + 0.007097750436514616, + -0.0007789521478116512, + 0.03384082764387131, + -0.011230535805225372, + -0.005530925001949072, + -0.02183823473751545, + -0.008486158214509487, + 0.012138839811086655, + -0.02831314690411091, + -0.013663494028151035, + -0.00289197638630867, + -0.012372404336929321, + -0.017037196084856987, + 0.014403113164007664, + -0.007999567314982414, + -0.00542387505993247, + 0.0298183374106884, + 0.004664792213588953, + 0.025004323571920395, + 0.006870674435049295, + -0.044195499271154404, + 0.002452421933412552, + 0.010121106170117855, + -0.018166089430451393, + 0.005329800769686699, + 0.03620241954922676, + -0.019230103120207787, + 0.028780274093151093, + -0.021163493394851685, + 0.023006053641438484, + -0.011308390647172928, + -0.0027184253558516502, + -0.018970586359500885, + 0.009556660428643227, + -0.01109428983181715, + -0.026301901787519455, + 0.008894895203411579, + -0.009615051560103893, + -0.013326123356819153, + 0.026652246713638306, + 0.007830881513655186, + -0.007882785052061081, + 0.012722750194370747, + -0.007136677857488394, + 0.008862456306815147, + -0.01198961865156889, + -0.04287197068333626, + 0.022616781294345856, + 0.0370069183409214, + 0.009965397417545319, + 0.021267300471663475, + 0.03197231516242027, + 0.0008945176959969103, + 0.007882785052061081, + -0.023304495960474014, + 0.03544982522726059, + 0.01082179881632328, + 0.029688579961657524, + 0.016219722107052803, + 0.028858128935098648, + 0.01126946322619915, + -0.016492214053869247, + 0.017361590638756752, + -0.0046518160961568356, + 0.0357871949672699, + -0.013403978198766708, + 0.0012837910326197743, + -0.0002424848498776555, + 0.01019247341901064, + 0.016323529183864594, + -0.09077853709459305, + -0.022123700007796288, + 0.025069203227758408, + 0.008408304303884506, + -0.019256053492426872, + 0.007778978906571865, + 0.004077638033777475, + 0.048944633454084396, + -0.01834774948656559, + 0.020358994603157043, + -0.003759731538593769, + -0.018282869830727577, + -0.013001728802919388, + 0.022668683901429176, + 0.00905060488730669, + -0.013572663068771362, + -0.01564878784120083, + -0.0012254000175744295, + -0.012099912390112877, + -0.01226210966706276, + -0.008836505003273487, + -0.019619375467300415, + -0.010010812431573868, + -0.001213235198520124, + -0.0013957071350887418, + -0.03397058695554733, + -0.024199824780225754, + 0.0385899618268013, + 0.018983563408255577, + 0.0015465505421161652, + -0.0037921711336821318, + -0.01939878799021244, + 0.008933822624385357, + -0.03062283620238304, + -0.023966262117028236, + -0.011996106244623661, + -0.02582179754972458, + 0.0011434904299676418, + 0.04152248799800873, + -0.009368511848151684, + 0.01204152125865221, + 0.0036656572483479977, + 0.016271624714136124, + -0.02647058665752411, + 0.0036234857980161905, + -0.008298009634017944, + -0.029480967670679092, + 0.040692038834095, + 0.029377160593867302, + -0.033737022429704666, + -0.006011028774082661, + -0.00724048400297761, + 0.005868295673280954, + -0.02673010155558586, + 0.024705881252884865, + -0.018762974068522453, + -0.003824610495939851, + 0.016375431790947914, + -0.040614183992147446, + 0.006075907964259386, + 0.0011791738215833902, + 0.01605103723704815, + -0.039264705032110214, + -0.0015076231211423874, + 0.028806226328015327, + -0.013157438486814499, + -0.022915223613381386, + -0.011392733082175255, + 0.007143165450543165, + -0.003441825043410063, + -0.018672144040465355, + 0.018166089430451393, + -0.03181660547852516, + 0.01239186804741621, + -0.016583044081926346, + -0.005861807614564896, + 0.00744160870090127, + -0.0029714531265199184, + 0.007571366149932146, + -0.024848613888025284, + -0.016570068895816803, + -0.011087802238762379, + -0.022266434505581856, + -0.030441174283623695, + 0.02208477444946766, + 0.024199824780225754, + -0.012846020050346851, + 0.013468856923282146, + -0.010705016553401947, + -0.01650518923997879, + 0.016686849296092987, + 0.0035586070735007524, + 0.030674738809466362, + -0.010964532382786274, + -0.014999998733401299, + 0.004638840444386005, + 0.0020858561620116234, + -0.0019496105378493667, + 0.025769894942641258, + -0.00028627808205783367, + -0.018672144040465355, + -0.019307957962155342, + -0.061505187302827835, + 0.021098613739013672, + 0.014922143891453743, + -0.00030999945010989904, + 0.018827853724360466, + -0.0003298686060588807, + 0.01001730002462864, + -0.00902465358376503, + 0.029143596068024635, + 0.0053200689144432545, + -0.004771842155605555, + -0.003759731538593769, + -0.0043306658044457436, + -0.001372188446111977, + -0.008953286334872246, + 0.0012935228878632188, + 0.011035898700356483, + -0.0005474156350828707, + 0.025640137493610382, + 0.003274761838838458, + 0.021176468580961227, + -0.0019366347696632147, + -0.004732914734631777, + -0.0033477507531642914, + 0.0006528437952511013, + 0.01659601926803589, + -0.02074826881289482, + 0.024160897359251976, + 0.002963343169540167, + -0.005800172686576843, + 0.008142300881445408, + -0.02094290591776371, + -0.0046226209960877895, + 0.03269895911216736, + -0.013352075591683388, + -0.03734428808093071, + -0.01664792187511921, + 0.03057093173265457, + 0.007947663776576519, + -0.041756052523851395, + -0.01899653859436512, + -0.015480102971196175, + 0.009628026746213436, + -0.011840397492051125, + -0.03833044692873955, + 0.01945069059729576, + -0.017932524904608727, + -0.0092971445992589, + -0.009822663851082325, + 0.011691175401210785, + 0.019282005727291107, + 0.008531574159860611, + 0.0019317689584568143, + -0.0225389264523983, + -0.01512975711375475, + -0.02916954830288887, + -0.020229237154126167, + -0.015622836537659168, + 0.018373701721429825, + -0.00679281959310174, + 0.03381487727165222, + 0.0020080015528947115, + 0.002379433251917362, + 0.020981833338737488, + 0.034022487699985504, + -0.007545414846390486, + -0.029403112828731537, + -0.006163494195789099, + 0.023966262117028236, + -0.018775951117277145, + -0.017971452325582504, + 0.011931227520108223, + 0.0058455877006053925, + -0.00945285428315401, + -0.0001637178211240098, + 0.005316825117915869, + 0.006701989099383354, + -0.01515570841729641, + -0.010912628844380379, + 0.024952420964837074, + -0.00362672982737422, + -0.014364185743033886, + -0.005826123990118504, + -0.002304822439327836, + 0.01129541452974081, + 0.012580016627907753, + -0.0001540873636258766, + -0.0008105806191451848, + -0.006238105241209269, + 0.021565742790699005, + -0.03259515389800072, + -0.006552767939865589, + -0.0015003243461251259, + -0.015298441983759403, + 0.002827097661793232, + 0.00679281959310174, + -0.015285465866327286, + -0.0028060118202120066, + 0.0014540980337187648, + 0.01750432327389717, + 0.00438905693590641, + -0.002316176425665617, + 0.0015652031870558858, + 0.005634731613099575, + -0.0007769247167743742, + 0.004541522357612848, + -0.018529411405324936, + -0.012884947471320629, + -0.010516867972910404, + 0.0037921711336821318, + -0.01017300970852375, + -0.0010048117255792022, + 0.003331530839204788, + 0.025198960676789284, + -0.015194635838270187, + 0.010555795393884182, + 0.004924307577311993, + -0.015090829692780972, + -0.022123700007796288, + 0.0022075041197240353, + 0.026989618316292763, + 0.0034969721455127, + -0.010834774002432823, + 0.010185985825955868, + -0.0010096776532009244, + 0.0181531123816967, + -0.003996539395302534, + -0.0018555362476035953, + 0.006825258955359459, + 0.007195068523287773, + 0.009342559613287449, + -0.014429064467549324, + 0.0025448743253946304, + -0.0062024216167628765, + -0.006961504928767681, + -0.018360724672675133, + 0.004642084240913391, + 0.03443771228194237, + 0.01575259491801262, + 0.06072663888335228, + -0.006714964751154184, + -0.011827421374619007, + 0.005543901119381189, + -0.002770328428596258, + 0.01248918566852808, + 0.023551035672426224, + 0.0009626405080780387, + -0.02541954815387726, + -0.018983563408255577, + 0.008959774859249592, + -0.0002879000676330179, + -0.005491998046636581, + -0.0025108130648732185, + -0.033788926899433136, + 0.007843857631087303, + -0.0036364616826176643, + 0.007123701740056276, + 0.003633217653259635, + -0.01126946322619915, + 0.005618511699140072, + 8.971533679869026e-05, + 0.012703286483883858, + -0.0008235563873313367, + 0.0004427984240464866, + 0.004012759309262037, + -0.009491781704127789, + -0.00902465358376503, + -0.013676469214260578, + -0.018386676907539368, + 0.019230103120207787, + -0.001407060888595879, + 0.004463667515665293, + 0.008583476766943932, + 0.014065743423998356, + -0.016868511214852333, + -0.020527679473161697, + 0.029792385175824165, + 0.021617645397782326, + 0.02492646872997284, + 0.0017922793049365282, + 0.024121969938278198, + -0.028780274093151093, + 0.002655168529599905, + 0.004003027454018593, + -0.031790655106306076, + -0.008492646738886833, + -0.0003698096552398056, + -0.03897923603653908 + ] + } + ], + "model": "ada", + "usage": { + "prompt_tokens": 10, + "total_tokens": 10 + } + }, + "start_time": 1698819596.230166, + "end_time": 1698819597.151615, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "retrieve_products" + }, + { + "name": "get_customer_past_orders", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ] + }, + "output": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "start_time": 1698819597.807706, + "end_time": 1698819598.115706, + "error": null, + "children": null, + "node_name": "retrieve_past_orders" + }, + { + "name": "get_product_stats", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ] + }, + "output": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "start_time": 1698819597.835704, + "end_time": 1698819598.765096, + "error": null, + "children": null, + "node_name": "retrieve_products_stats" + }, + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nYOU ARE:\nYou are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details.\n\nSITUATION:\nYou are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information.\n\n\nYou are given:\n(1) The chat history that you have had with the current user.\n(2) The question to answer.\n(3) Detailed customer information with their past orders/purchases information retrieved from sql query results.\n(3) Detailed products information with description retrieved per this question against a search index.\n(4) Aggregated product sales counts information retrieved from sql query results.\n\nINSTRUCTIONS:\n- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know.\n- Remain grounded, do not invent new facts.\n- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document.\n- Use MARKDOWN to highlight your text.\n- Please greeting the users use their name and title that are provided to you.\n- Please explain in details and step by step in your answer.\n- Make sure to reference any documentation used in the response.\n- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders.\n\nYOUR TASK:\nYour task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly.\n\nsystem:\nThe following are the information that you used to answer customer' question.\n\n#Products Information:\nYou are given the following products as reference to your response. \n{% for item in retrieved_products %}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductListPrice: {{item.ListPrice}}\nProductDescription: {{item.Description}}\n{% endfor %}\n\n#Aggregated Products Sales Count:\nYou are given the following products sales summary which is ordered by product category name and sales count.\n{% for item in retrieved_products_stats%}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductSalesCountTotal: {{item.sales_count}}\nProductListPrice: {{item.ListPrice}}\nProductColor:{{item.Color}}\n{% endfor %}\n\n# Previous Purchases:\nHere is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question.\n{% for item in retrieved_orders %}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductDescription: {{item.Description}}\nProductListPrice: {{item.ListPrice}}\nProductSize: {{item.Size}}\n{% endfor %}\n\n# Customer Context:\n{% for item in retrieved_customers %}\nThe customer's name is {{item.FirstName}}, last name is {{item.LastName}} and title is {{item.Title}}.\n{% endfor %}\n\nChat history:\n{% for item in chat_history %}\nuser:\n{{item.inputs.question}}\nassistant:\n{{item.outputs.answer}}\n{% endfor %}\n\nAdditional INSTRUCTIONS:\nIf customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. \n\nIf customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products.\n\nIf customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information.\n\nuser:\n{{question}}", + "chat_history": [], + "deployment_name": "mp-aoi-gpt-4-32k", + "frequency_penalty": 0.0, + "max_tokens": 1000, + "presence_penalty": 0.0, + "question": "I'm looking for new bike jerseys for my customers", + "retrieved_customers": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "retrieved_orders": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "retrieved_products": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "retrieved_products_stats": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "temperature": 0.0, + "top_p": 1.0, + "stream": true + }, + "output": [], + "start_time": 1698819598.767096, + "end_time": 1698819601.541259, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://meta-prompter-az-openai.openai.azure.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "mp-aoi-gpt-4-32k", + "messages": [ + { + "role": "system", + "content": "YOU ARE:\nYou are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details.\n\nSITUATION:\nYou are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information.\n\n\nYou are given:\n(1) The chat history that you have had with the current user.\n(2) The question to answer.\n(3) Detailed customer information with their past orders/purchases information retrieved from sql query results.\n(3) Detailed products information with description retrieved per this question against a search index.\n(4) Aggregated product sales counts information retrieved from sql query results.\n\nINSTRUCTIONS:\n- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know.\n- Remain grounded, do not invent new facts.\n- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document.\n- Use MARKDOWN to highlight your text.\n- Please greeting the users use their name and title that are provided to you.\n- Please explain in details and step by step in your answer.\n- Make sure to reference any documentation used in the response.\n- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders.\n\nYOUR TASK:\nYour task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly." + }, + { + "role": "system", + "content": "The following are the information that you used to answer customer' question.\n\n#Products Information:\nYou are given the following products as reference to your response. \nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, XL\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, L\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, S\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, XL\nProductColor: Yellow\nProductListPrice: 53.99\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, M\nProductColor: Yellow\nProductListPrice: 53.99\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\n\n#Aggregated Products Sales Count:\nYou are given the following products sales summary which is ordered by product category name and sales count.\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, L\nProductSalesCountTotal: 10\nProductListPrice: 49.99\nProductColor:Multi\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, XL\nProductSalesCountTotal: 9\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, L\nProductSalesCountTotal: 8\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, M\nProductSalesCountTotal: 7\nProductListPrice: 49.99\nProductColor:Multi\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, S\nProductSalesCountTotal: 7\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, XL\nProductSalesCountTotal: 3\nProductListPrice: 49.99\nProductColor:Multi\n\n# Previous Purchases:\nHere is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question.\nProductName: Short-Sleeve Classic Jersey, S\nProductColor: Yellow\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\nProductListPrice: 53.99\nProductSize: S\nProductName: Mountain-500 Silver, 52\nProductColor: Silver\nProductDescription: Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride.\nProductListPrice: 564.99\nProductSize: 52\nProductName: Mountain-400-W Silver, 40\nProductColor: Silver\nProductDescription: This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road.\nProductListPrice: 769.49\nProductSize: 40\nProductName: HL Mountain Frame - Black, 42\nProductColor: Black\nProductDescription: Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps.\nProductListPrice: 1349.6\nProductSize: 42\nProductName: LL Mountain Handlebars\nProductColor: None\nProductDescription: All-purpose bar for on or off-road.\nProductListPrice: 44.54\nProductSize: None\nProductName: Long-Sleeve Logo Jersey, M\nProductColor: Multi\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductListPrice: 49.99\nProductSize: M\nProductName: LL Mountain Frame - Silver, 40\nProductColor: Silver\nProductDescription: Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame.\nProductListPrice: 264.05\nProductSize: 40\nProductName: HL Mountain Pedal\nProductColor: Silver/Black\nProductDescription: Stainless steel; designed to shed mud easily.\nProductListPrice: 80.99\nProductSize: None\n\n# Customer Context:\nThe customer's name is Donald, last name is Blanton and title is Mr..\nThe customer's name is Donald, last name is Blanton and title is Mr..\n\nChat history:\n\nAdditional INSTRUCTIONS:\nIf customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. \n\nIf customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products.\n\nIf customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information." + }, + { + "role": "user", + "content": "I'm looking for new bike jerseys for my customers" + } + ], + "temperature": 0.0, + "top_p": 1.0, + "n": 1, + "stream": true, + "stop": null, + "max_tokens": 1000, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": [], + "start_time": 1698819598.777101, + "end_time": 1698819601.541259, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "chat" + }, + { + "name": "my_python_tool", + "type": "Tool", + "inputs": { + "input1": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "input2": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "input3": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "input4": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "start_time": 1698819598.769096, + "end_time": 1698819598.779262, + "error": null, + "children": null, + "node_name": "get_retrieved_documents" + } + ], + "variant_id": "", + "name": "", + "description": "", + "tags": null, + "system_metrics": { + "duration": 5.901079, + "total_tokens": 1521 + }, + "result": { + "answer": "Hello Mr. Blanton, I found some bike jerseys in our database that you might be interested in for your customers. Here are the top options:\n\n1. **Long-Sleeve Logo Jersey**\n - Available Sizes: S, L, XL\n - Color: Multi\n - Price: $49.99\n - Description: Unisex long-sleeve AWC logo microfiber cycling jersey\n\n2. **Short-Sleeve Classic Jersey**\n - Available Sizes: M, XL\n - Color: Yellow\n - Price: $53.99\n - Description: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\n\nBased on your previous purchases, you bought a **Long-Sleeve Logo Jersey, M** and a **Short-Sleeve Classic Jersey, S**. Considering your customers' preferences, these two options should be suitable for them. The Long-Sleeve Logo Jersey is perfect for cooler weather, while the Short-Sleeve Classic Jersey is great for warmer days with its breathable material and moisture control.", + "retrieved_documents": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + "upload_metrics": false + } + ], + "node_runs": [ + { + "node": "retrieve_customer", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_customer_0", + "status": "Completed", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": { + "FirstName": "Donald", + "LastName": "Blanton", + "MiddleName": "L." + } + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:55.956483Z", + "end_time": "2023-10-31T23:19:57.806704Z", + "index": 0, + "api_calls": [ + { + "name": "get_customer_details", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": { + "FirstName": "Donald", + "LastName": "Blanton", + "MiddleName": "L." + } + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "start_time": 1698819595.956483, + "end_time": 1698819597.806704, + "error": null, + "children": null, + "node_name": "retrieve_customer" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 1.850221 + }, + "result": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ] + }, + { + "node": "retrieve_products", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_products_0", + "status": "Completed", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "search_text": "I'm looking for new bike jerseys for my customers", + "top_k": 5 + }, + "output": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:55.957485Z", + "end_time": "2023-10-31T23:19:57.833707Z", + "index": 0, + "api_calls": [ + { + "name": "get_products", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "search_text": "I'm looking for new bike jerseys for my customers", + "top_k": 5 + }, + "output": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "start_time": 1698819595.957485, + "end_time": 1698819597.824704, + "error": null, + "children": [ + { + "name": "openai.api_resources.embedding.Embedding.create", + "type": "LLM", + "inputs": { + "input": "I'm looking for new bike jerseys for my customers", + "engine": "text-embedding-ada-002" + }, + "output": { + "object": "list", + "data": [ + { + "object": "embedding", + "index": 0, + "embedding": [ + -0.019217126071453094, + -0.018360724672675133, + -0.027612455189228058, + -0.00834991317242384, + -0.006575475446879864, + 0.018010379746556282, + -0.004972966853529215, + -0.006721452809870243, + 0.007383217569440603, + -0.03381487727165222, + -0.00016716451500542462, + -0.02138408087193966, + 0.010873701423406601, + -0.012547576799988747, + 0.0016519787022843957, + 0.009491781704127789, + 0.021656572818756104, + -0.009420414455235004, + 0.005865051411092281, + -0.033529408276081085, + 0.0074286325834691525, + 0.004223615862429142, + 0.02338235080242157, + 0.0017517299856990576, + -0.014104669913649559, + -0.010049739852547646, + 0.02852075919508934, + -0.013280708342790604, + 0.006059688050299883, + -0.016025085002183914, + 0.027612455189228058, + 0.02313581109046936, + -0.022396191954612732, + -0.02911764569580555, + -0.025160033255815506, + 0.017335638403892517, + 0.02523788809776306, + 0.01488321740180254, + 0.022512974217534065, + -0.006857698317617178, + 3.968763121520169e-05, + 0.010568770579993725, + 0.009511245414614677, + -0.025964532047510147, + -0.032932523638010025, + 0.005365483928471804, + -0.007402681279927492, + -0.011327854357659817, + -0.008674307726323605, + 0.01062067411839962, + -0.007162629161030054, + 0.012573528103530407, + -0.010211937129497528, + -0.0072599477134644985, + 0.02303200587630272, + -0.019307957962155342, + 0.01974913291633129, + 0.023693770170211792, + 0.024563146755099297, + -0.007525951135903597, + 0.0016171062598004937, + 0.007986591197550297, + -0.024121969938278198, + 0.011580881662666798, + -0.013494809158146381, + -0.025588233023881912, + -0.007993078790605068, + -0.018036330118775368, + -0.0059980531223118305, + 0.0056769028306007385, + 0.03539792075753212, + 0.0023518598172813654, + -0.02492646872997284, + 0.006277032662183046, + 0.015544981695711613, + -0.01959342509508133, + -0.010114618577063084, + -0.033477507531642914, + 0.008771625347435474, + 0.0021231616847217083, + 0.027041520923376083, + -0.03397058695554733, + -0.017361590638756752, + 0.015116780996322632, + 0.0295588206499815, + 0.036280274391174316, + -0.01106833852827549, + 0.007766002789139748, + -0.00589749077335, + -0.017919549718499184, + 0.020955881103873253, + 0.0034256053622812033, + 0.008408304303884506, + 0.006225129123777151, + -0.02802767977118492, + 0.006974480580538511, + -0.029195500537753105, + 0.025004323571920395, + 0.021461935713887215, + -0.017465395852923393, + -0.00654627988114953, + 0.004658304154872894, + -0.0036040223203599453, + -0.012670846655964851, + -0.010276815854012966, + 0.0005778276245109737, + -0.013131487183272839, + 0.002118295757099986, + 0.011827421374619007, + -0.010776383802294731, + -0.018775951117277145, + 0.050527676939964294, + 0.020462801679968834, + 0.0063581308349967, + 0.015025950968265533, + -0.003287737723439932, + 0.007305362727493048, + 0.020112454891204834, + -0.016440309584140778, + -0.028105534613132477, + 0.013715396635234356, + 0.025614185258746147, + 0.010614186525344849, + -0.022824393585324287, + 0.004681011661887169, + -0.005527681205421686, + -0.02204584702849388, + -0.012515137903392315, + -0.00486267264932394, + 0.020514704287052155, + 0.004583693575114012, + 0.004904843866825104, + 0.009874566458165646, + 0.029584772884845734, + -0.017387542873620987, + 0.013124998658895493, + -0.010036763735115528, + 0.01955449767410755, + -0.008382352069020271, + -0.02862456627190113, + -0.019775085151195526, + 0.022266434505581856, + 0.014091694727540016, + 0.012275085784494877, + -0.013974912464618683, + -0.007993078790605068, + -0.0021491132210940123, + -0.014701556414365768, + 0.013974912464618683, + -0.02846885658800602, + 0.0005571474321186543, + -0.011996106244623661, + 0.015817472711205482, + 0.019671278074383736, + -0.007143165450543165, + -0.005456314422190189, + 0.001787413377314806, + 0.01864619180560112, + -0.007221020292490721, + -0.006695501506328583, + 0.009459341876208782, + -0.012502161785960197, + 0.027612455189228058, + -0.02487456612288952, + 0.049982696771621704, + 0.016401382163167, + 0.028858128935098648, + 0.00884948018938303, + -0.007097750436514616, + 0.0003730535972863436, + 0.007246971596032381, + 0.020800171419978142, + -0.007707612123340368, + -0.006604671012610197, + -0.012210207059979439, + 0.018814878538250923, + -0.005054065492004156, + 0.010036763735115528, + -0.0013210963224992156, + -0.0020858561620116234, + 0.03384082764387131, + 0.0002505947195459157, + 0.023070933297276497, + 0.02802767977118492, + 0.004677767865359783, + -0.009134947322309017, + 0.005144895985722542, + -0.04487023875117302, + 0.001458963961340487, + -0.01273572538048029, + 0.014273355714976788, + 0.01699826866388321, + 4.835504660150036e-05, + -0.014130622148513794, + -0.6635293960571289, + 6.746390863554552e-05, + 0.014143597334623337, + -0.01336505077779293, + 0.023966262117028236, + 0.01939878799021244, + 0.01154195424169302, + 0.004989186301827431, + -0.029377160593867302, + 0.017841694876551628, + 0.0060304924845695496, + 0.013923009857535362, + -0.006014273036271334, + -0.004927551373839378, + -0.0055925603955984116, + -0.007512975484132767, + 0.015337369404733181, + -0.015973182395100594, + 0.026911763474345207, + -0.014844289980828762, + -0.027586502954363823, + -0.011165657080709934, + -0.0009610185516066849, + 0.004291738383471966, + 0.024316607043147087, + 0.015012974850833416, + -0.006961504928767681, + -0.0055925603955984116, + 0.014221452176570892, + 0.039316605776548386, + -0.03908304125070572, + 0.03955017030239105, + -0.006004541181027889, + -0.008953286334872246, + 0.042949825525283813, + -0.01136678084731102, + 0.017037196084856987, + 0.010776383802294731, + 0.00044158194214105606, + 0.030726641416549683, + -0.014221452176570892, + -0.0015124890487641096, + -0.0025124349631369114, + 0.015376296825706959, + 0.0009926470229402184, + 0.031531140208244324, + 0.02976643480360508, + -0.02064446173608303, + 0.015324393287301064, + -0.0029714531265199184, + 0.020008649677038193, + -0.00431444589048624, + -0.004239835310727358, + -0.008356400765478611, + 0.02527681551873684, + -0.001735510304570198, + 0.009978372603654861, + 0.0009658844792284071, + 0.023849479854106903, + 0.02044982649385929, + -0.02108563855290413, + 0.0018733779434114695, + -0.026807956397533417, + -0.011931227520108223, + -0.0068512107245624065, + 0.015350344590842724, + -0.020423874258995056, + -0.030596883967518806, + 0.020618511363863945, + -0.019307957962155342, + 0.0054692900739610195, + 0.00932309590280056, + -0.013948961161077023, + 0.023122835904359818, + -0.0033672142308205366, + 0.03690311312675476, + -0.013871106319129467, + -0.011327854357659817, + -0.014182524755597115, + -0.0016430577961727977, + 0.010769895277917385, + 0.010503891855478287, + -0.003860293887555599, + -0.02961072511970997, + 0.0364878885447979, + -0.0014362563379108906, + -0.009355535730719566, + -0.007863321341574192, + 0.019372835755348206, + 0.02643165923655033, + 0.026003457605838776, + 0.0004403654602356255, + 0.01685553602874279, + -0.0083758644759655, + -0.013391003012657166, + 0.0370069183409214, + 0.009537196718156338, + 0.027301035821437836, + 0.012352940626442432, + -0.029195500537753105, + -0.009582611732184887, + -0.01615484245121479, + -0.012119376100599766, + 0.01664792187511921, + 0.027560552582144737, + -0.003568338928744197, + 0.002226967830210924, + -0.017776815220713615, + 0.00500865001231432, + -0.02268165908753872, + 0.015376296825706959, + -0.011736591346561909, + -0.01829584687948227, + -0.010153545998036861, + -0.000998323899693787, + -0.034775085747241974, + 0.00969939399510622, + -0.005076772999018431, + 0.0060012973845005035, + -0.02378460019826889, + 0.005566608626395464, + 0.007545414846390486, + 0.03760380297899246, + -0.004567473661154509, + -0.008408304303884506, + 0.03360726311802864, + 0.00466154795140028, + 0.009653978981077671, + -0.010717992670834064, + -0.029948094859719276, + 0.02019030973315239, + -0.0023956529330462217, + 0.01869809627532959, + -0.015142732299864292, + 0.03550172597169876, + -0.0076686847023665905, + 0.010996971279382706, + 0.003779195249080658, + 0.008525085635483265, + -0.04082179814577103, + -0.03620241954922676, + 0.0075843422673642635, + -0.00862240418791771, + -0.02836504951119423, + 0.00036453825305216014, + -0.008959774859249592, + -0.024809686467051506, + 0.002559472108259797, + -0.030804496258497238, + 0.016064012423157692, + -0.019009513780474663, + -0.008810552768409252, + -0.006144030950963497, + -0.004324177745729685, + 0.00029013026505708694, + -0.0017890353919938207, + -0.009368511848151684, + -0.005080016795545816, + -0.024005189538002014, + -0.015051902271807194, + 0.012099912390112877, + -0.006955016870051622, + -0.0011305146617814898, + -0.004885380156338215, + 0.017335638403892517, + -0.010490916669368744, + -0.0047913058660924435, + 0.015194635838270187, + -0.0074286325834691525, + -0.034022487699985504, + -0.0009366889717057347, + -0.015973182395100594, + -0.013533735647797585, + 0.01448096800595522, + -0.01834774948656559, + 0.01450691930949688, + -0.018360724672675133, + 0.011249999515712261, + 0.0050281137228012085, + -0.012904411181807518, + -0.0024345803540199995, + 0.0028822445310652256, + -0.016167819499969482, + 0.03256920352578163, + 0.014545846730470657, + 0.008538061752915382, + -0.004411764442920685, + 0.04230103641748428, + -0.009848615154623985, + 0.017789790406823158, + -0.0015246538678184152, + 0.010730967856943607, + -0.028598614037036896, + -0.020229237154126167, + 0.01426037959754467, + -0.009121972136199474, + 0.0037240481469780207, + 0.020553631708025932, + 0.012956313788890839, + 0.010439013130962849, + 0.031583044677972794, + -0.01664792187511921, + 0.03760380297899246, + -0.006656574085354805, + 0.010458476841449738, + -0.02199394255876541, + 0.016064012423157692, + -0.0012756811920553446, + 0.024965396150946617, + 0.014896192587912083, + 0.010860726237297058, + -0.0494636632502079, + -0.01358563918620348, + -0.0030493077356368303, + 0.01724480837583542, + 0.01695934124290943, + 0.002196150366216898, + 0.026600344106554985, + -0.004797793924808502, + -0.00034588557900860906, + -0.005475778132677078, + 0.012158303521573544, + 0.01243728306144476, + -0.022824393585324287, + 0.005417387001216412, + 0.0038473180029541254, + -0.010510379448533058, + 0.03955017030239105, + -0.00787629745900631, + -0.009433390572667122, + -0.01695934124290943, + 0.007616781629621983, + 0.021461935713887215, + -0.009848615154623985, + -0.004580449312925339, + 0.010938580147922039, + 0.01161332055926323, + -0.0009058714495040476, + 0.05221452936530113, + -0.01843857951462269, + 0.03145328536629677, + 0.006974480580538511, + -0.010834774002432823, + -0.007863321341574192, + 0.03062283620238304, + 0.028780274093151093, + 0.016128892078995705, + -0.0072599477134644985, + -0.0002264678623760119, + 0.028910033404827118, + -0.005637975409626961, + -0.01069204043596983, + -0.013676469214260578, + 0.0163105521351099, + 0.005018381867557764, + 0.0034904840867966413, + 0.006351643241941929, + 0.015233563259243965, + 0.0023080664686858654, + 0.010108130984008312, + 0.005076772999018431, + -0.003292603651061654, + 0.02541954815387726, + 0.0031806875485926867, + 0.043209340423345566, + -0.005333044566214085, + -0.017517300322651863, + -0.006598182953894138, + -0.03057093173265457, + -0.010977507568895817, + 0.014636676758527756, + -0.016518164426088333, + 0.02748269774019718, + 0.004019246902316809, + 0.010328719392418861, + 0.0007452962454408407, + -0.004732914734631777, + -0.009212802164256573, + -0.01629757694900036, + 0.033036328852176666, + -0.021007783710956573, + -0.011879324913024902, + -0.005725562106817961, + 0.015480102971196175, + -0.0003479130391497165, + -0.00897923856973648, + -0.003211505012586713, + 0.03425605222582817, + -0.021007783710956573, + 0.034074392169713974, + 0.01915224827826023, + 0.0062575689516961575, + -0.0028935985174030066, + -0.012502161785960197, + 0.009167387150228024, + 0.011165657080709934, + 0.032179929316043854, + -0.035527680069208145, + 0.005047577433288097, + 0.014870241284370422, + 0.014247403480112553, + 0.021967992186546326, + 0.0017857913626357913, + -0.02732698805630207, + 0.0185942891985178, + 0.011639272794127464, + -0.0012773030903190374, + -0.014130622148513794, + 0.0037824392784386873, + -0.03773356229066849, + 0.010815310291945934, + -0.0009585855877958238, + -0.034230101853609085, + 0.0007233996293507516, + -0.008589964359998703, + -0.008038493804633617, + 0.007766002789139748, + -0.019282005727291107, + 0.022707611322402954, + 0.008739186450839043, + -0.0052357264794409275, + -0.004538278095424175, + -0.029143596068024635, + -0.007824393920600414, + 0.09737023711204529, + 0.012482698075473309, + -0.014701556414365768, + 0.00021146461949683726, + -0.0017776815220713615, + 0.013507784344255924, + 0.000845858477987349, + -0.015376296825706959, + -0.0005607968778349459, + 0.002402140758931637, + -0.006747404579073191, + 0.011918251402676105, + -0.0026389488484710455, + 0.0015076231211423874, + -0.006059688050299883, + -0.012359428219497204, + -0.0044150082394480705, + -0.009939446114003658, + -0.006740916520357132, + -0.004337153863161802, + -0.007798442151397467, + -0.00902465358376503, + 0.005566608626395464, + 0.002533520571887493, + 0.01820501685142517, + 0.03576124459505081, + 0.02971453033387661, + 0.026509514078497887, + 0.006747404579073191, + -0.004882136359810829, + -0.00994593370705843, + 0.0036234857980161905, + -0.012080448679625988, + 0.006825258955359459, + -0.0204368494451046, + -0.003860293887555599, + -0.007136677857488394, + 0.019619375467300415, + 0.04751729965209961, + 0.015142732299864292, + 0.0321020744740963, + 0.014584774151444435, + -0.008667819201946259, + 0.0006990700494498014, + 0.006484644953161478, + -0.012450258247554302, + 0.0045544980093836784, + 0.00448961928486824, + 0.0036980966106057167, + -0.03051902912557125, + 0.01825691945850849, + -0.01834774948656559, + -0.00020213828247506171, + -0.007759515196084976, + 0.012871971353888512, + 0.035579580813646317, + -0.008395328186452389, + -0.030233561992645264, + -0.011840397492051125, + -0.04411764442920685, + 0.0007221831474453211, + 0.010964532382786274, + 0.017491348087787628, + 0.0039024651050567627, + -0.021228373050689697, + -0.0024864834267646074, + -0.005086504854261875, + 0.003376946086063981, + -0.017270760610699654, + -0.021604670211672783, + -0.012346452102065086, + -0.02597750723361969, + -0.004453935660421848, + 0.016375431790947914, + 0.0015887217596173286, + 0.010354670695960522, + 0.018711071461439133, + -0.011658736504614353, + 0.02612023986876011, + 0.0008312607533298433, + -0.006831747014075518, + -0.005459558684378862, + 0.00181336491368711, + -0.018633216619491577, + -0.0222794096916914, + 0.01291089877486229, + 0.003037953982129693, + 0.008025518618524075, + -0.020618511363863945, + 0.012456746771931648, + 0.03311418369412422, + -0.016751728951931, + -0.0005912088672630489, + 0.005213018506765366, + 5.116181910125306e-06, + -0.010166522115468979, + 0.014636676758527756, + 0.019411763176321983, + -0.01825691945850849, + -0.023525085300207138, + -0.002509190933778882, + 0.011282438412308693, + 0.029247403144836426, + -0.011262974701821804, + 0.0321020744740963, + 0.02094290591776371, + 0.002929281909018755, + -0.015791522338986397, + 0.00036453825305216014, + 0.0020258433651179075, + -3.520186510286294e-05, + 0.004084126092493534, + 0.010062715969979763, + 0.026262974366545677, + -0.019982697442173958, + 0.015843424946069717, + 0.007182092871516943, + -0.003138516331091523, + 0.017387542873620987, + -0.011198095977306366, + 0.013884082436561584, + -0.03591695427894592, + 0.021617645397782326, + 0.002215614076703787, + -0.017465395852923393, + -0.000613105483353138, + 0.023304495960474014, + -0.02189013734459877, + 0.017115050926804543, + -0.009167387150228024, + -0.004690743517130613, + 0.009446365758776665, + -0.019930794835090637, + -0.0075843422673642635, + -0.0480622798204422, + -0.010906141251325607, + 0.007130189798772335, + 0.023317473009228706, + -0.01017300970852375, + -0.03978373482823372, + -0.029455015435814857, + -0.001960964407771826, + 0.023304495960474014, + 0.015220587141811848, + -0.011074826121330261, + -0.024641001597046852, + -0.000695826078299433, + 0.0021847966127097607, + -0.00897923856973648, + 0.028546711429953575, + -0.027794115245342255, + 0.008881920017302036, + -0.003250432200729847, + -0.01286548376083374, + -0.026911763474345207, + -0.04173010215163231, + -0.01764705777168274, + -0.019165223464369774, + -0.007843857631087303, + 0.02503027580678463, + 0.0312197208404541, + 0.007603805512189865, + 0.013754324056208134, + -0.02422577701508999, + -0.011392733082175255, + 0.00270544970408082, + -0.015194635838270187, + 0.0025367646012455225, + -0.018516434356570244, + -0.004781574010848999, + 0.023343423381447792, + -0.001024275436066091, + 0.0130666084587574, + -0.03311418369412422, + -0.014429064467549324, + 0.006416521966457367, + -0.0036656572483479977, + -0.02932525798678398, + -0.02488754130899906, + -0.01945069059729576, + 0.0017776815220713615, + -0.007532438728958368, + -0.0004168468585703522, + 0.004427984356880188, + -0.011230535805225372, + -0.0004565851704683155, + 0.041911762207746506, + -0.010886677540838718, + 0.005245458334684372, + -0.004307958297431469, + 0.011853372678160667, + -0.027093423530459404, + 0.016427334398031235, + -0.02044982649385929, + 0.011444635689258575, + 0.0010940202046185732, + -0.026146192103624344, + -0.015363320708274841, + -0.03132352605462074, + 0.010484428144991398, + 0.02582179754972458, + -0.005868295673280954, + -0.0003568338870536536, + -0.004869160708039999, + -0.014078718610107899, + 0.02278546616435051, + 0.00613105483353138, + -0.03516435623168945, + -0.004067906178534031, + -0.02229238674044609, + -0.007208044640719891, + -0.016751728951931, + -0.031790655106306076, + -0.030648786574602127, + -0.013280708342790604, + 0.02104671113193035, + -0.03269895911216736, + 0.020462801679968834, + -0.018620241433382034, + -0.005138407927006483, + 0.011438148096203804, + 0.006877162028104067, + 0.019878892228007317, + -0.02234428934752941, + 0.002048550872132182, + 0.023408303037285805, + -0.024342559278011322, + -0.021059686318039894, + -0.05589964985847473, + -0.01102292351424694, + -0.017128026112914085, + 0.0042982264421880245, + 0.031479235738515854, + -0.005693122278898954, + -0.03399653732776642, + 0.0031450041569769382, + -0.0008040927350521088, + -0.03259515389800072, + -0.013455881737172604, + 0.001787413377314806, + -0.005981833674013615, + 0.0277162604033947, + -0.013403978198766708, + -0.00746756000444293, + -0.03129757568240166, + 0.031738750636577606, + -0.003581314580515027, + -0.013300172053277493, + 0.0026438147760927677, + -0.010653113014996052, + -0.014403113164007664, + 0.026989618316292763, + -0.04006920009851456, + 0.02054065652191639, + 0.011892300099134445, + -0.010614186525344849, + -0.004830233287066221, + -0.010439013130962849, + 0.007246971596032381, + -0.018983563408255577, + -0.006734428461641073, + 0.029299305751919746, + 0.0022804930340498686, + 0.02503027580678463, + -0.0030525517649948597, + 0.023693770170211792, + -0.019165223464369774, + -0.00597210181877017, + -0.0032828717958182096, + 0.023369375616312027, + -0.007104238495230675, + 0.02299307845532894, + -0.018166089430451393, + -0.01331314817070961, + 0.004103589802980423, + 0.0033055793028324842, + -0.008025518618524075, + -0.012249134480953217, + 0.012138839811086655, + -0.013910033740103245, + 0.011275950819253922, + 0.010108130984008312, + -0.013014704920351505, + 0.0009074934641830623, + -0.027742212638258934, + -0.0046226209960877895, + -0.023525085300207138, + 0.0018717559287324548, + 0.008538061752915382, + -0.028391001746058464, + -0.02732698805630207, + -0.018814878538250923, + 0.022201554849743843, + 0.01575259491801262, + 0.007065311074256897, + 0.0017793035367503762, + 0.0037240481469780207, + 0.02722318097949028, + -0.0319204144179821, + 0.021955015137791634, + 0.010276815854012966, + -0.005907222628593445, + -0.011658736504614353, + 0.01178849395364523, + 0.010698528960347176, + -0.016440309584140778, + 0.01740051805973053, + -0.008278545923531055, + -0.013403978198766708, + -0.00208747829310596, + 0.009952421300113201, + -0.005517949350178242, + -0.017076123505830765, + -0.01171712763607502, + 0.025160033255815506, + -0.00812932476401329, + 0.0077854664996266365, + -0.032439444214105606, + -0.03942041099071503, + 0.0163105521351099, + -0.02553633041679859, + 0.00464857229962945, + 0.008499134331941605, + -0.014987023547291756, + 0.0020582827273756266, + -0.017465395852923393, + 0.0010510380379855633, + 0.007149653509259224, + -0.0023956529330462217, + -0.025808822363615036, + -0.03321799263358116, + 0.02099480852484703, + -0.006351643241941929, + -0.00016909060650505126, + -0.016920413821935654, + -0.012099912390112877, + -0.02294117584824562, + 0.006380838807672262, + 0.0020031356252729893, + 0.01401383988559246, + 0.008667819201946259, + 0.013235293328762054, + 0.021669548004865646, + 0.021825257688760757, + -0.02541954815387726, + -0.011438148096203804, + -0.021903112530708313, + 0.00018135676509700716, + -0.015882352367043495, + -0.003921928815543652, + 0.0051805791445076466, + 0.01910034380853176, + 0.013468856923282146, + -0.036669548600912094, + -0.012573528103530407, + -0.009615051560103893, + -0.023369375616312027, + 0.017685985192656517, + 0.01725778356194496, + 0.009738321416079998, + 0.010899653658270836, + 0.008116348646581173, + -0.02727508544921875, + 0.0037824392784386873, + 0.013494809158146381, + 0.022474046796560287, + 0.006273788399994373, + -0.0034645325504243374, + 0.00830449815839529, + -0.003600778291001916, + -0.010724480263888836, + 0.009829151444137096, + -0.05304497852921486, + -0.0030038924887776375, + 0.040562279522418976, + 0.0014411222655326128, + 0.015726642683148384, + 0.008907871320843697, + -0.004758866503834724, + -0.013702421449124813, + -0.025938579812645912, + -0.03641003370285034, + 0.007908736355602741, + 0.008830016478896141, + 0.03591695427894592, + -0.028105534613132477, + -0.03594290465116501, + 0.010302767157554626, + 0.01885380409657955, + 0.0019869159441441298, + 0.010724480263888836, + 0.0008474804926663637, + -0.010698528960347176, + 0.009303632192313671, + -0.0063743507489562035, + -0.013923009857535362, + -0.021448960527777672, + -0.006663061678409576, + 0.01695934124290943, + -0.014987023547291756, + -0.019969722256064415, + 0.02248702198266983, + 0.0025367646012455225, + -0.007740051485598087, + 0.008758650161325932, + 0.025847749784588814, + 0.008077421225607395, + -0.016245674341917038, + -0.002042063046246767, + -0.009141434915363789, + 0.008583476766943932, + 0.021552767604589462, + -0.004486375022679567, + 0.013546711765229702, + 0.0034385810140520334, + -0.008589964359998703, + 0.00293576973490417, + -0.003370458260178566, + -0.008109861053526402, + 0.0029033301398158073, + -0.029091693460941315, + -0.02138408087193966, + 0.019269030541181564, + -0.0033737022895365953, + 0.0016836071154102683, + -0.013702421449124813, + -0.020852074027061462, + -0.030804496258497238, + -0.0011921495897695422, + 0.00438905693590641, + -0.019775085151195526, + -0.02606833726167679, + 0.01493512000888586, + -0.01650518923997879, + 0.007396193221211433, + 0.007195068523287773, + 0.21197231113910675, + -0.015869375318288803, + -0.00551146175712347, + 0.022370241582393646, + 0.0037564877420663834, + 0.009413926862180233, + 0.007065311074256897, + -0.00160494155716151, + -0.0004586126306094229, + 0.015272490680217743, + 0.023797575384378433, + 0.00700691994279623, + -0.01102292351424694, + -0.005861807614564896, + 0.023901382461190224, + -0.002577313920482993, + -0.015622836537659168, + -0.0036624132189899683, + -0.023771625012159348, + 0.01730968803167343, + -0.008499134331941605, + 0.023122835904359818, + 0.019165223464369774, + -0.014091694727540016, + 0.016531141474843025, + 0.015544981695711613, + -0.01571366749703884, + -0.0094723179936409, + 0.008914358913898468, + 0.0010267083998769522, + -0.009634515270590782, + 0.0017014488112181425, + 0.01221669465303421, + -0.013196365907788277, + 0.018581314012408257, + 0.004810769576579332, + 0.016492214053869247, + -0.010542819276452065, + 0.0008032817277126014, + 0.02208477444946766, + 0.017141003161668777, + -0.01423442829400301, + 0.0034385810140520334, + 0.0022642731200903654, + -0.00512218801304698, + -0.017439445480704308, + -0.04198961704969406, + 0.0013259622501209378, + 0.00030776922358199954, + 0.004333909600973129, + -0.03371107205748558, + -0.022110724821686745, + 0.023109860718250275, + 0.03643598407506943, + 0.024018164724111557, + -0.015402248129248619, + 0.00283520738594234, + -0.004106833599507809, + -0.019580448046326637, + -0.015843424946069717, + -0.02129325084388256, + 0.00880406517535448, + 0.02148788794875145, + 0.015246538445353508, + -0.01610293984413147, + 0.011671711690723896, + -0.02054065652191639, + -0.028832178562879562, + 0.012404843233525753, + -0.001263516373001039, + -0.0012529735686257482, + -0.01669982634484768, + 0.022227507084608078, + -0.002968209097161889, + -0.020981833338737488, + -0.02019030973315239, + -0.0012708152644336224, + 0.03830449655652046, + 0.00992646999657154, + 0.02019030973315239, + -0.0070523349568247795, + 0.010257352143526077, + -0.005002162419259548, + 0.0014013840118423104, + -0.0047069634310901165, + -0.03339965268969536, + 0.004908088129013777, + 0.002368079498410225, + -0.0010599588276818395, + 0.004324177745729685, + -0.001456530997529626, + 0.003720804350450635, + -0.010439013130962849, + 0.009420414455235004, + 0.02133217826485634, + -0.005994809325784445, + -0.015480102971196175, + 0.020826123654842377, + -0.014403113164007664, + 0.005722317844629288, + -0.008525085635483265, + 0.016284601762890816, + -0.02288927137851715, + -0.009829151444137096, + -0.015168684534728527, + 0.002489727456122637, + -0.005414143204689026, + 0.014740483835339546, + -0.008382352069020271, + -0.02992214262485504, + -0.0019869159441441298, + -0.0225389264523983, + 0.017880622297525406, + 0.0010575258638709784, + 0.004930795636028051, + -0.012878458946943283, + 0.004016003105789423, + -0.023473182693123817, + 0.01293685007840395, + -0.017724912613630295, + -0.0033347748685628176, + -0.003594290465116501, + -0.007370241917669773, + -0.017530275508761406, + 0.017439445480704308, + -0.009128459729254246, + 0.006513840518891811, + -0.0033023355063050985, + 0.027534600347280502, + -0.02776816487312317, + 0.010497404262423515, + -0.005920198746025562, + -0.0068512107245624065, + -0.03220587968826294, + -0.024666953831911087, + 0.005887758918106556, + 0.011833908967673779, + -0.002622729167342186, + -0.0002487699966877699, + 0.006799307651817799, + 0.011691175401210785, + 0.011684687808156013, + -0.001826340681873262, + -0.01496107131242752, + 0.009349048137664795, + -0.02168252505362034, + 0.019710205495357513, + -0.016414359211921692, + -0.013481833040714264, + -0.006114835385233164, + 0.007097750436514616, + -0.009692905470728874, + -0.008310985751450062, + -0.03386677801609039, + 0.022512974217534065, + 0.012430795468389988, + -0.0181531123816967, + -0.02238321676850319, + -0.003089857054874301, + 0.020618511363863945, + -0.012223182246088982, + 2.3505925128119998e-05, + 0.033685117959976196, + 0.012560552917420864, + -0.01659601926803589, + -0.027456745505332947, + -0.16474047303199768, + 0.0065592555329203606, + 0.018827853724360466, + -0.012943338602781296, + 0.03321799263358116, + 0.004632352851331234, + 0.010179497301578522, + 0.007285899017006159, + -0.024290656670928, + 0.009134947322309017, + 0.033373698592185974, + -0.005024869926273823, + -0.032724909484386444, + -0.013118511065840721, + -0.003138516331091523, + -0.018179064616560936, + -0.011697663925588131, + 0.020229237154126167, + 0.0072275083512067795, + 0.011438148096203804, + 0.020112454891204834, + 0.0027800602838397026, + -0.00016696176317054778, + -0.009764272719621658, + -0.002974696923047304, + 0.0025156789924949408, + -0.014545846730470657, + 0.01834774948656559, + -0.0015319527592509985, + 0.002827097661793232, + -0.009958909824490547, + -0.012281573377549648, + 0.03057093173265457, + 0.0007692202925682068, + 0.0036656572483479977, + -0.0008101751445792615, + -0.004658304154872894, + -0.010601210407912731, + -0.004788062069565058, + 0.018127162009477615, + 0.002126405481249094, + 0.011230535805225372, + 0.033477507531642914, + 0.004976210650056601, + 0.006306227762252092, + 0.021319203078746796, + 0.014195500873029232, + -0.007564878556877375, + 0.001328395213931799, + -0.0181531123816967, + 0.027534600347280502, + -0.005076772999018431, + 0.018724046647548676, + 0.005144895985722542, + 0.02637975662946701, + 0.011924739927053452, + 0.007097750436514616, + -0.0007789521478116512, + 0.03384082764387131, + -0.011230535805225372, + -0.005530925001949072, + -0.02183823473751545, + -0.008486158214509487, + 0.012138839811086655, + -0.02831314690411091, + -0.013663494028151035, + -0.00289197638630867, + -0.012372404336929321, + -0.017037196084856987, + 0.014403113164007664, + -0.007999567314982414, + -0.00542387505993247, + 0.0298183374106884, + 0.004664792213588953, + 0.025004323571920395, + 0.006870674435049295, + -0.044195499271154404, + 0.002452421933412552, + 0.010121106170117855, + -0.018166089430451393, + 0.005329800769686699, + 0.03620241954922676, + -0.019230103120207787, + 0.028780274093151093, + -0.021163493394851685, + 0.023006053641438484, + -0.011308390647172928, + -0.0027184253558516502, + -0.018970586359500885, + 0.009556660428643227, + -0.01109428983181715, + -0.026301901787519455, + 0.008894895203411579, + -0.009615051560103893, + -0.013326123356819153, + 0.026652246713638306, + 0.007830881513655186, + -0.007882785052061081, + 0.012722750194370747, + -0.007136677857488394, + 0.008862456306815147, + -0.01198961865156889, + -0.04287197068333626, + 0.022616781294345856, + 0.0370069183409214, + 0.009965397417545319, + 0.021267300471663475, + 0.03197231516242027, + 0.0008945176959969103, + 0.007882785052061081, + -0.023304495960474014, + 0.03544982522726059, + 0.01082179881632328, + 0.029688579961657524, + 0.016219722107052803, + 0.028858128935098648, + 0.01126946322619915, + -0.016492214053869247, + 0.017361590638756752, + -0.0046518160961568356, + 0.0357871949672699, + -0.013403978198766708, + 0.0012837910326197743, + -0.0002424848498776555, + 0.01019247341901064, + 0.016323529183864594, + -0.09077853709459305, + -0.022123700007796288, + 0.025069203227758408, + 0.008408304303884506, + -0.019256053492426872, + 0.007778978906571865, + 0.004077638033777475, + 0.048944633454084396, + -0.01834774948656559, + 0.020358994603157043, + -0.003759731538593769, + -0.018282869830727577, + -0.013001728802919388, + 0.022668683901429176, + 0.00905060488730669, + -0.013572663068771362, + -0.01564878784120083, + -0.0012254000175744295, + -0.012099912390112877, + -0.01226210966706276, + -0.008836505003273487, + -0.019619375467300415, + -0.010010812431573868, + -0.001213235198520124, + -0.0013957071350887418, + -0.03397058695554733, + -0.024199824780225754, + 0.0385899618268013, + 0.018983563408255577, + 0.0015465505421161652, + -0.0037921711336821318, + -0.01939878799021244, + 0.008933822624385357, + -0.03062283620238304, + -0.023966262117028236, + -0.011996106244623661, + -0.02582179754972458, + 0.0011434904299676418, + 0.04152248799800873, + -0.009368511848151684, + 0.01204152125865221, + 0.0036656572483479977, + 0.016271624714136124, + -0.02647058665752411, + 0.0036234857980161905, + -0.008298009634017944, + -0.029480967670679092, + 0.040692038834095, + 0.029377160593867302, + -0.033737022429704666, + -0.006011028774082661, + -0.00724048400297761, + 0.005868295673280954, + -0.02673010155558586, + 0.024705881252884865, + -0.018762974068522453, + -0.003824610495939851, + 0.016375431790947914, + -0.040614183992147446, + 0.006075907964259386, + 0.0011791738215833902, + 0.01605103723704815, + -0.039264705032110214, + -0.0015076231211423874, + 0.028806226328015327, + -0.013157438486814499, + -0.022915223613381386, + -0.011392733082175255, + 0.007143165450543165, + -0.003441825043410063, + -0.018672144040465355, + 0.018166089430451393, + -0.03181660547852516, + 0.01239186804741621, + -0.016583044081926346, + -0.005861807614564896, + 0.00744160870090127, + -0.0029714531265199184, + 0.007571366149932146, + -0.024848613888025284, + -0.016570068895816803, + -0.011087802238762379, + -0.022266434505581856, + -0.030441174283623695, + 0.02208477444946766, + 0.024199824780225754, + -0.012846020050346851, + 0.013468856923282146, + -0.010705016553401947, + -0.01650518923997879, + 0.016686849296092987, + 0.0035586070735007524, + 0.030674738809466362, + -0.010964532382786274, + -0.014999998733401299, + 0.004638840444386005, + 0.0020858561620116234, + -0.0019496105378493667, + 0.025769894942641258, + -0.00028627808205783367, + -0.018672144040465355, + -0.019307957962155342, + -0.061505187302827835, + 0.021098613739013672, + 0.014922143891453743, + -0.00030999945010989904, + 0.018827853724360466, + -0.0003298686060588807, + 0.01001730002462864, + -0.00902465358376503, + 0.029143596068024635, + 0.0053200689144432545, + -0.004771842155605555, + -0.003759731538593769, + -0.0043306658044457436, + -0.001372188446111977, + -0.008953286334872246, + 0.0012935228878632188, + 0.011035898700356483, + -0.0005474156350828707, + 0.025640137493610382, + 0.003274761838838458, + 0.021176468580961227, + -0.0019366347696632147, + -0.004732914734631777, + -0.0033477507531642914, + 0.0006528437952511013, + 0.01659601926803589, + -0.02074826881289482, + 0.024160897359251976, + 0.002963343169540167, + -0.005800172686576843, + 0.008142300881445408, + -0.02094290591776371, + -0.0046226209960877895, + 0.03269895911216736, + -0.013352075591683388, + -0.03734428808093071, + -0.01664792187511921, + 0.03057093173265457, + 0.007947663776576519, + -0.041756052523851395, + -0.01899653859436512, + -0.015480102971196175, + 0.009628026746213436, + -0.011840397492051125, + -0.03833044692873955, + 0.01945069059729576, + -0.017932524904608727, + -0.0092971445992589, + -0.009822663851082325, + 0.011691175401210785, + 0.019282005727291107, + 0.008531574159860611, + 0.0019317689584568143, + -0.0225389264523983, + -0.01512975711375475, + -0.02916954830288887, + -0.020229237154126167, + -0.015622836537659168, + 0.018373701721429825, + -0.00679281959310174, + 0.03381487727165222, + 0.0020080015528947115, + 0.002379433251917362, + 0.020981833338737488, + 0.034022487699985504, + -0.007545414846390486, + -0.029403112828731537, + -0.006163494195789099, + 0.023966262117028236, + -0.018775951117277145, + -0.017971452325582504, + 0.011931227520108223, + 0.0058455877006053925, + -0.00945285428315401, + -0.0001637178211240098, + 0.005316825117915869, + 0.006701989099383354, + -0.01515570841729641, + -0.010912628844380379, + 0.024952420964837074, + -0.00362672982737422, + -0.014364185743033886, + -0.005826123990118504, + -0.002304822439327836, + 0.01129541452974081, + 0.012580016627907753, + -0.0001540873636258766, + -0.0008105806191451848, + -0.006238105241209269, + 0.021565742790699005, + -0.03259515389800072, + -0.006552767939865589, + -0.0015003243461251259, + -0.015298441983759403, + 0.002827097661793232, + 0.00679281959310174, + -0.015285465866327286, + -0.0028060118202120066, + 0.0014540980337187648, + 0.01750432327389717, + 0.00438905693590641, + -0.002316176425665617, + 0.0015652031870558858, + 0.005634731613099575, + -0.0007769247167743742, + 0.004541522357612848, + -0.018529411405324936, + -0.012884947471320629, + -0.010516867972910404, + 0.0037921711336821318, + -0.01017300970852375, + -0.0010048117255792022, + 0.003331530839204788, + 0.025198960676789284, + -0.015194635838270187, + 0.010555795393884182, + 0.004924307577311993, + -0.015090829692780972, + -0.022123700007796288, + 0.0022075041197240353, + 0.026989618316292763, + 0.0034969721455127, + -0.010834774002432823, + 0.010185985825955868, + -0.0010096776532009244, + 0.0181531123816967, + -0.003996539395302534, + -0.0018555362476035953, + 0.006825258955359459, + 0.007195068523287773, + 0.009342559613287449, + -0.014429064467549324, + 0.0025448743253946304, + -0.0062024216167628765, + -0.006961504928767681, + -0.018360724672675133, + 0.004642084240913391, + 0.03443771228194237, + 0.01575259491801262, + 0.06072663888335228, + -0.006714964751154184, + -0.011827421374619007, + 0.005543901119381189, + -0.002770328428596258, + 0.01248918566852808, + 0.023551035672426224, + 0.0009626405080780387, + -0.02541954815387726, + -0.018983563408255577, + 0.008959774859249592, + -0.0002879000676330179, + -0.005491998046636581, + -0.0025108130648732185, + -0.033788926899433136, + 0.007843857631087303, + -0.0036364616826176643, + 0.007123701740056276, + 0.003633217653259635, + -0.01126946322619915, + 0.005618511699140072, + 8.971533679869026e-05, + 0.012703286483883858, + -0.0008235563873313367, + 0.0004427984240464866, + 0.004012759309262037, + -0.009491781704127789, + -0.00902465358376503, + -0.013676469214260578, + -0.018386676907539368, + 0.019230103120207787, + -0.001407060888595879, + 0.004463667515665293, + 0.008583476766943932, + 0.014065743423998356, + -0.016868511214852333, + -0.020527679473161697, + 0.029792385175824165, + 0.021617645397782326, + 0.02492646872997284, + 0.0017922793049365282, + 0.024121969938278198, + -0.028780274093151093, + 0.002655168529599905, + 0.004003027454018593, + -0.031790655106306076, + -0.008492646738886833, + -0.0003698096552398056, + -0.03897923603653908 + ] + } + ], + "model": "ada", + "usage": { + "prompt_tokens": 10, + "total_tokens": 10 + } + }, + "start_time": 1698819596.230166, + "end_time": 1698819597.151615, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "retrieve_products" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "prompt_tokens": 10, + "total_tokens": 10, + "duration": 1.876222 + }, + "result": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ] + }, + { + "node": "retrieve_past_orders", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_past_orders_0", + "status": "Completed", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ] + }, + "output": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:57.807706Z", + "end_time": "2023-10-31T23:19:58.117706Z", + "index": 0, + "api_calls": [ + { + "name": "get_customer_past_orders", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ] + }, + "output": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "start_time": 1698819597.807706, + "end_time": 1698819598.115706, + "error": null, + "children": null, + "node_name": "retrieve_past_orders" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 0.31 + }, + "result": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ] + }, + { + "node": "retrieve_products_stats", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_products_stats_0", + "status": "Completed", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ] + }, + "output": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:57.835704Z", + "end_time": "2023-10-31T23:19:58.765096Z", + "index": 0, + "api_calls": [ + { + "name": "get_product_stats", + "type": "Tool", + "inputs": { + "conn": "SQLDB-Connection-Demo", + "inputs": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ] + }, + "output": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "start_time": 1698819597.835704, + "end_time": 1698819598.765096, + "error": null, + "children": null, + "node_name": "retrieve_products_stats" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 0.929392 + }, + "result": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + { + "node": "chat", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_chat_0", + "status": "Completed", + "inputs": { + "prompt": "system:\nYOU ARE:\nYou are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details.\n\nSITUATION:\nYou are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information.\n\n\nYou are given:\n(1) The chat history that you have had with the current user.\n(2) The question to answer.\n(3) Detailed customer information with their past orders/purchases information retrieved from sql query results.\n(3) Detailed products information with description retrieved per this question against a search index.\n(4) Aggregated product sales counts information retrieved from sql query results.\n\nINSTRUCTIONS:\n- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know.\n- Remain grounded, do not invent new facts.\n- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document.\n- Use MARKDOWN to highlight your text.\n- Please greeting the users use their name and title that are provided to you.\n- Please explain in details and step by step in your answer.\n- Make sure to reference any documentation used in the response.\n- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders.\n\nYOUR TASK:\nYour task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly.\n\nsystem:\nThe following are the information that you used to answer customer' question.\n\n#Products Information:\nYou are given the following products as reference to your response. \n{% for item in retrieved_products %}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductListPrice: {{item.ListPrice}}\nProductDescription: {{item.Description}}\n{% endfor %}\n\n#Aggregated Products Sales Count:\nYou are given the following products sales summary which is ordered by product category name and sales count.\n{% for item in retrieved_products_stats%}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductSalesCountTotal: {{item.sales_count}}\nProductListPrice: {{item.ListPrice}}\nProductColor:{{item.Color}}\n{% endfor %}\n\n# Previous Purchases:\nHere is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question.\n{% for item in retrieved_orders %}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductDescription: {{item.Description}}\nProductListPrice: {{item.ListPrice}}\nProductSize: {{item.Size}}\n{% endfor %}\n\n# Customer Context:\n{% for item in retrieved_customers %}\nThe customer's name is {{item.FirstName}}, last name is {{item.LastName}} and title is {{item.Title}}.\n{% endfor %}\n\nChat history:\n{% for item in chat_history %}\nuser:\n{{item.inputs.question}}\nassistant:\n{{item.outputs.answer}}\n{% endfor %}\n\nAdditional INSTRUCTIONS:\nIf customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. \n\nIf customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products.\n\nIf customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information.\n\nuser:\n{{question}}", + "chat_history": [], + "deployment_name": "mp-aoi-gpt-4-32k", + "frequency_penalty": 0.0, + "max_tokens": 1000, + "presence_penalty": 0.0, + "question": "I'm looking for new bike jerseys for my customers", + "retrieved_customers": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "retrieved_orders": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "retrieved_products": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "retrieved_products_stats": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "temperature": 0.0, + "top_p": 1.0, + "stream": true + }, + "output": "", + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:58.767096Z", + "end_time": "2023-10-31T23:20:01.856561Z", + "index": 0, + "api_calls": [ + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nYOU ARE:\nYou are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details.\n\nSITUATION:\nYou are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information.\n\n\nYou are given:\n(1) The chat history that you have had with the current user.\n(2) The question to answer.\n(3) Detailed customer information with their past orders/purchases information retrieved from sql query results.\n(3) Detailed products information with description retrieved per this question against a search index.\n(4) Aggregated product sales counts information retrieved from sql query results.\n\nINSTRUCTIONS:\n- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know.\n- Remain grounded, do not invent new facts.\n- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document.\n- Use MARKDOWN to highlight your text.\n- Please greeting the users use their name and title that are provided to you.\n- Please explain in details and step by step in your answer.\n- Make sure to reference any documentation used in the response.\n- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders.\n\nYOUR TASK:\nYour task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly.\n\nsystem:\nThe following are the information that you used to answer customer' question.\n\n#Products Information:\nYou are given the following products as reference to your response. \n{% for item in retrieved_products %}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductListPrice: {{item.ListPrice}}\nProductDescription: {{item.Description}}\n{% endfor %}\n\n#Aggregated Products Sales Count:\nYou are given the following products sales summary which is ordered by product category name and sales count.\n{% for item in retrieved_products_stats%}\nProductCategory: {{item.ProductCategoryName}}\nProductName: {{item.Name}}\nProductSalesCountTotal: {{item.sales_count}}\nProductListPrice: {{item.ListPrice}}\nProductColor:{{item.Color}}\n{% endfor %}\n\n# Previous Purchases:\nHere is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question.\n{% for item in retrieved_orders %}\nProductName: {{item.Name}}\nProductColor: {{item.Color}}\nProductDescription: {{item.Description}}\nProductListPrice: {{item.ListPrice}}\nProductSize: {{item.Size}}\n{% endfor %}\n\n# Customer Context:\n{% for item in retrieved_customers %}\nThe customer's name is {{item.FirstName}}, last name is {{item.LastName}} and title is {{item.Title}}.\n{% endfor %}\n\nChat history:\n{% for item in chat_history %}\nuser:\n{{item.inputs.question}}\nassistant:\n{{item.outputs.answer}}\n{% endfor %}\n\nAdditional INSTRUCTIONS:\nIf customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. \n\nIf customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products.\n\nIf customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information.\n\nuser:\n{{question}}", + "chat_history": [], + "deployment_name": "mp-aoi-gpt-4-32k", + "frequency_penalty": 0.0, + "max_tokens": 1000, + "presence_penalty": 0.0, + "question": "I'm looking for new bike jerseys for my customers", + "retrieved_customers": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "retrieved_orders": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "retrieved_products": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "retrieved_products_stats": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "temperature": 0.0, + "top_p": 1.0, + "stream": true + }, + "output": [], + "start_time": 1698819598.767096, + "end_time": 1698819601.541259, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://meta-prompter-az-openai.openai.azure.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "mp-aoi-gpt-4-32k", + "messages": [ + { + "role": "system", + "content": "YOU ARE:\nYou are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details.\n\nSITUATION:\nYou are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information.\n\n\nYou are given:\n(1) The chat history that you have had with the current user.\n(2) The question to answer.\n(3) Detailed customer information with their past orders/purchases information retrieved from sql query results.\n(3) Detailed products information with description retrieved per this question against a search index.\n(4) Aggregated product sales counts information retrieved from sql query results.\n\nINSTRUCTIONS:\n- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know.\n- Remain grounded, do not invent new facts.\n- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document.\n- Use MARKDOWN to highlight your text.\n- Please greeting the users use their name and title that are provided to you.\n- Please explain in details and step by step in your answer.\n- Make sure to reference any documentation used in the response.\n- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders.\n\nYOUR TASK:\nYour task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly." + }, + { + "role": "system", + "content": "The following are the information that you used to answer customer' question.\n\n#Products Information:\nYou are given the following products as reference to your response. \nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, XL\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, L\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, S\nProductColor: Multi\nProductListPrice: 49.99\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, XL\nProductColor: Yellow\nProductListPrice: 53.99\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, M\nProductColor: Yellow\nProductListPrice: 53.99\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\n\n#Aggregated Products Sales Count:\nYou are given the following products sales summary which is ordered by product category name and sales count.\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, L\nProductSalesCountTotal: 10\nProductListPrice: 49.99\nProductColor:Multi\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, XL\nProductSalesCountTotal: 9\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, L\nProductSalesCountTotal: 8\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, M\nProductSalesCountTotal: 7\nProductListPrice: 49.99\nProductColor:Multi\nProductCategory: Jerseys\nProductName: Short-Sleeve Classic Jersey, S\nProductSalesCountTotal: 7\nProductListPrice: 53.99\nProductColor:Yellow\nProductCategory: Jerseys\nProductName: Long-Sleeve Logo Jersey, XL\nProductSalesCountTotal: 3\nProductListPrice: 49.99\nProductColor:Multi\n\n# Previous Purchases:\nHere is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question.\nProductName: Short-Sleeve Classic Jersey, S\nProductColor: Yellow\nProductDescription: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\nProductListPrice: 53.99\nProductSize: S\nProductName: Mountain-500 Silver, 52\nProductColor: Silver\nProductDescription: Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride.\nProductListPrice: 564.99\nProductSize: 52\nProductName: Mountain-400-W Silver, 40\nProductColor: Silver\nProductDescription: This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road.\nProductListPrice: 769.49\nProductSize: 40\nProductName: HL Mountain Frame - Black, 42\nProductColor: Black\nProductDescription: Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps.\nProductListPrice: 1349.6\nProductSize: 42\nProductName: LL Mountain Handlebars\nProductColor: None\nProductDescription: All-purpose bar for on or off-road.\nProductListPrice: 44.54\nProductSize: None\nProductName: Long-Sleeve Logo Jersey, M\nProductColor: Multi\nProductDescription: Unisex long-sleeve AWC logo microfiber cycling jersey\nProductListPrice: 49.99\nProductSize: M\nProductName: LL Mountain Frame - Silver, 40\nProductColor: Silver\nProductDescription: Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame.\nProductListPrice: 264.05\nProductSize: 40\nProductName: HL Mountain Pedal\nProductColor: Silver/Black\nProductDescription: Stainless steel; designed to shed mud easily.\nProductListPrice: 80.99\nProductSize: None\n\n# Customer Context:\nThe customer's name is Donald, last name is Blanton and title is Mr..\nThe customer's name is Donald, last name is Blanton and title is Mr..\n\nChat history:\n\nAdditional INSTRUCTIONS:\nIf customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. \n\nIf customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products.\n\nIf customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information." + }, + { + "role": "user", + "content": "I'm looking for new bike jerseys for my customers" + } + ], + "temperature": 0.0, + "top_p": 1.0, + "n": 1, + "stream": true, + "stop": null, + "max_tokens": 1000, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": [], + "start_time": 1698819598.777101, + "end_time": 1698819601.541259, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "chat" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "prompt_tokens": 1511, + "completion_tokens": 0, + "total_tokens": 1511, + "duration": 3.089465 + }, + "result": "" + }, + { + "node": "get_retrieved_documents", + "flow_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a", + "run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_get_retrieved_documents_0", + "status": "Completed", + "inputs": { + "input1": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "input2": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "input3": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "input4": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "metrics": null, + "error": null, + "parent_run_id": "716e4432-05cc-4b4c-99c0-1ee568f01b0a_0", + "start_time": "2023-10-31T23:19:58.768096Z", + "end_time": "2023-10-31T23:19:58.782263Z", + "index": 0, + "api_calls": [ + { + "name": "my_python_tool", + "type": "Tool", + "inputs": { + "input1": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + } + ], + "input2": [ + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + } + ], + "input3": [ + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + } + ], + "input4": [ + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + }, + "output": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ], + "start_time": 1698819598.769096, + "end_time": 1698819598.779262, + "error": null, + "children": null, + "node_name": "get_retrieved_documents" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 0.014167 + }, + "result": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] + } + ] +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.output.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.output.json new file mode 100644 index 0000000..c24c2a5 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/chat.output.json @@ -0,0 +1,255 @@ +{ + "answer": "Hello Mr. Blanton, I found some bike jerseys in our database that you might be interested in for your customers. Here are the top options:\n\n1. **Long-Sleeve Logo Jersey**\n - Available Sizes: S, L, XL\n - Color: Multi\n - Price: $49.99\n - Description: Unisex long-sleeve AWC logo microfiber cycling jersey\n\n2. **Short-Sleeve Classic Jersey**\n - Available Sizes: M, XL\n - Color: Yellow\n - Price: $53.99\n - Description: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets.\n\nBased on your previous purchases, you bought a **Long-Sleeve Logo Jersey, M** and a **Short-Sleeve Classic Jersey, S**. Considering your customers' preferences, these two options should be suitable for them. The Long-Sleeve Logo Jersey is perfect for cooler weather, while the Short-Sleeve Classic Jersey is great for warmer days with its breathable material and moisture control.", + "retrieved_documents": [ + { + "CustomerID": 25, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "31D03546-FB2A-4488-890E-4709A659E3F0", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "NameStyle": false, + "Title": "Mr.", + "FirstName": "Donald", + "MiddleName": "L.", + "LastName": "Blanton", + "Suffix": null, + "CompanyName": "Coalition Bike Company", + "SalesPerson": "adventure-works\\shu0", + "EmailAddress": "donald0@adventure-works.com", + "Phone": "357-555-0161", + "PasswordHash": "pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw=", + "PasswordSalt": "jKtOaOw=", + "rowguid": "D8B39163-B4B4-428D-ACD7-1DF795D801DC", + "ModifiedDate": 1157068800000 + }, + { + "CustomerID": 29568, + "ProductID": 881, + "Name": "Short-Sleeve Classic Jersey, S", + "ProductNumber": "SJ-0194-S", + "Color": "Yellow", + "Size": "S", + "ListPrice": 53.99, + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "CustomerID": 29568, + "ProductID": 988, + "Name": "Mountain-500 Silver, 52", + "ProductNumber": "BK-M18S-52", + "Color": "Silver", + "Size": "52", + "ListPrice": 564.99, + "ProductCategoryID": 5, + "ProductModelID": 23, + "ProductDescriptionID": 8, + "Description": "Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride." + }, + { + "CustomerID": 29568, + "ProductID": 981, + "Name": "Mountain-400-W Silver, 40", + "ProductNumber": "BK-M38S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 769.49, + "ProductCategoryID": 5, + "ProductModelID": 22, + "ProductDescriptionID": 64, + "Description": "This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road." + }, + { + "CustomerID": 29568, + "ProductID": 743, + "Name": "HL Mountain Frame - Black, 42", + "ProductNumber": "FR-M94B-42", + "Color": "Black", + "Size": "42", + "ListPrice": 1349.6, + "ProductCategoryID": 16, + "ProductModelID": 5, + "ProductDescriptionID": 647, + "Description": "Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps." + }, + { + "CustomerID": 29568, + "ProductID": 808, + "Name": "LL Mountain Handlebars", + "ProductNumber": "HB-M243", + "Color": null, + "Size": null, + "ListPrice": 44.54, + "ProductCategoryID": 8, + "ProductModelID": 52, + "ProductDescriptionID": 697, + "Description": "All-purpose bar for on or off-road." + }, + { + "CustomerID": 29568, + "ProductID": 714, + "Name": "Long-Sleeve Logo Jersey, M", + "ProductNumber": "LJ-0192-M", + "Color": "Multi", + "Size": "M", + "ListPrice": 49.99, + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "CustomerID": 29568, + "ProductID": 944, + "Name": "LL Mountain Frame - Silver, 40", + "ProductNumber": "FR-M21S-40", + "Color": "Silver", + "Size": "40", + "ListPrice": 264.05, + "ProductCategoryID": 16, + "ProductModelID": 8, + "ProductDescriptionID": 637, + "Description": "Our best value utilizing the same, ground-breaking frame technology as the ML aluminum frame." + }, + { + "CustomerID": 29568, + "ProductID": 937, + "Name": "HL Mountain Pedal", + "ProductNumber": "PD-M562", + "Color": "Silver/Black", + "Size": null, + "ListPrice": 80.99, + "ProductCategoryID": 17, + "ProductModelID": 64, + "ProductDescriptionID": 849, + "Description": "Stainless steel; designed to shed mud easily." + }, + { + "@search.score": 0.03333333507180214, + "ProductCategoryName": "Jerseys", + "ProductId": 716, + "Name": "Long-Sleeve Logo Jersey, XL", + "ProductNumber": "LJ-0192-X", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.03226646035909653, + "ProductCategoryName": "Jerseys", + "ProductId": 715, + "Name": "Long-Sleeve Logo Jersey, L", + "ProductNumber": "LJ-0192-L", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "L", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.0317540317773819, + "ProductCategoryName": "Jerseys", + "ProductId": 713, + "Name": "Long-Sleeve Logo Jersey, S", + "ProductNumber": "LJ-0192-S", + "Color": "Multi", + "ListPrice": 49.99, + "Size": "S", + "ProductCategoryID": 25, + "ProductModelID": 11, + "ProductDescriptionID": 1211, + "Description": "Unisex long-sleeve AWC logo microfiber cycling jersey" + }, + { + "@search.score": 0.016393441706895828, + "ProductCategoryName": "Jerseys", + "ProductId": 884, + "Name": "Short-Sleeve Classic Jersey, XL", + "ProductNumber": "SJ-0194-X", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "XL", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "@search.score": 0.016129031777381897, + "ProductCategoryName": "Jerseys", + "ProductId": 882, + "Name": "Short-Sleeve Classic Jersey, M", + "ProductNumber": "SJ-0194-M", + "Color": "Yellow", + "ListPrice": 53.99, + "Size": "M", + "ProductCategoryID": 25, + "ProductModelID": 32, + "ProductDescriptionID": 1205, + "Description": "Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets." + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, L", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 10 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, XL", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 9 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, L", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 8 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, M", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Short-Sleeve Classic Jersey, S", + "Color": "Yellow", + "ListPrice": 53.99, + "sales_count": 7 + }, + { + "ProductCategoryName": "Jerseys", + "Name": "Long-Sleeve Logo Jersey, XL", + "Color": "Multi", + "ListPrice": 49.99, + "sales_count": 3 + } + ] +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.detail.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.detail.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.detail.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.layout.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.layout.json new file mode 100644 index 0000000..b5cd074 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.layout.json @@ -0,0 +1,45 @@ +{ + "nodeLayouts": { + "inputs": { + "x": 209, + "y": 62, + "index": -1 + }, + "outputs": { + "x": 259, + "y": 502, + "index": -1 + }, + "retrieve_customer": { + "x": 614.5, + "y": 172, + "index": 0 + }, + "retrieve_past_orders": { + "x": 615, + "y": 282, + "index": 1 + }, + "retrieve_products": { + "x": 203.5, + "y": 172, + "index": 2 + }, + "retrieve_products_stats": { + "x": 84, + "y": 282, + "index": 3 + }, + "chat": { + "x": 434, + "y": 392, + "index": 4 + }, + "get_retrieved_documents": { + "x": 84, + "y": 392, + "index": 5 + } + }, + "orientation": "Vertical" +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.log b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.log new file mode 100644 index 0000000..9ae0d4d --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.log @@ -0,0 +1,14 @@ +2023-10-31 16:19:55 -0700 49372 execution.flow INFO Start to run 6 nodes with concurrency level 16. +2023-10-31 16:19:55 -0700 49372 execution.flow INFO Executing node retrieve_customer. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_customer_0 +2023-10-31 16:19:55 -0700 49372 execution.flow INFO Executing node retrieve_products. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_products_0 +2023-10-31 16:19:57 -0700 49372 execution.flow INFO Node retrieve_customer completes. +2023-10-31 16:19:57 -0700 49372 execution.flow INFO Executing node retrieve_past_orders. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_past_orders_0 +2023-10-31 16:19:57 -0700 49372 execution.flow INFO Node retrieve_products completes. +2023-10-31 16:19:57 -0700 49372 execution.flow INFO Executing node retrieve_products_stats. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_retrieve_products_stats_0 +2023-10-31 16:19:58 -0700 49372 execution.flow INFO Node retrieve_past_orders completes. +2023-10-31 16:19:58 -0700 49372 execution.flow INFO Node retrieve_products_stats completes. +2023-10-31 16:19:58 -0700 49372 execution.flow INFO Executing node chat. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_chat_0 +2023-10-31 16:19:58 -0700 49372 execution.flow INFO Executing node get_retrieved_documents. node run id: 716e4432-05cc-4b4c-99c0-1ee568f01b0a_get_retrieved_documents_0 +2023-10-31 16:19:58 -0700 49372 execution.flow INFO Node get_retrieved_documents completes. +2023-10-31 16:20:01 -0700 49372 execution.flow WARNING Output of chat is not json serializable, use str to store it. +2023-10-31 16:20:01 -0700 49372 execution.flow INFO Node chat completes. diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.tools.json b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.tools.json new file mode 100644 index 0000000..ca5b481 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/.promptflow/flow.tools.json @@ -0,0 +1,4 @@ +{ + "package": {}, + "code": {} +} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/get_retrieved_documents.cpython-310.pyc b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/get_retrieved_documents.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0396660a91b2c7471ce671cdad8a417f11ffe75d GIT binary patch literal 482 zcmZuu!Ab)$5KVTo>vpvwDD(%s?4g3ylZaFlPg0cL%EBT|s+G-Von)2DdeV!Z;$Qe3 zxq9*!JUMB%)Pn&q)pvNRXDdRj6X#;JbDyXBmjAk*bSs#GdoIpwV| z**_!q%9-7iv#gw%J5^-vJ=}WQZM)?$3hpNcNnqnuV{jL@ET3v)eQjV~v)X-eYPp)| ScrpG2f01a{c!PMsF8u|y1bRXM literal 0 HcmV?d00001 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_customer.cpython-310.pyc b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_customer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b98ad2685cb5de4e2b5e73ef92120195faa68371 GIT binary patch literal 1471 zcmZux%TF9P7`Hv|+2s+0(r%T*R7$noszE*E(g;v09%?I!n$QYm0z$*skR{&nV0%MY z%~X-drH34Pjv~Ra|B|mg^Z2Y!a)(m91U=av84$osROse-GP^S*D^o#8(okF3{#hd)MMU}OMM!=buVxlQL=-2 z;olGs^{{cZ5PTbm`L&_aVz4HPg5|m|3gh>Sa;TMYbCBi4I$W<7+!ps5Y;_MKq)~+~ zu*NTmY-wWYniO!?q#_h|04r!drw(v#2fats1Illx;Dc8?#lkIJIQ9Xn=$2JbI~AsJ z2i2~2F5Sw#!nId`ra(t1upCz*lH1uW2pSTUt_2Z>YzW! zsqHQ-tA=YZgg0;vO(df%# zrf=*HDAQS=tEFWw@{FrhASO;Q5&_^I4hl8;Vw#gA7eh{yLg?g>B~0n;5L{j``Y17h zWVw)3fvYb7QK5SaFkt5;Gmg^Ixa?KNjbEM%dYIejO`?sT52X^)kdm5cJ=58yw0#n= z*DN1uX2K(;^A{QCrfvJ>;QB45MVZQFzifsz+IXF_G3k|1Hf_9|3&o6kqF|OiE;6c2 zpv8gZdo5|JDDCehZH?#rfcA5phLGqdLnhBFo*-QXkSQ~WP_$e8y4 literal 0 HcmV?d00001 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_orders.cpython-310.pyc b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_orders.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ddcae30be6376d06391feea1d3540efbc22a93d5 GIT binary patch literal 2166 zcmah~OK%%D5GJ`#$?wz%;uLN75~M0(q1OhEn?Q146^^V#1%j$J-1U-nWUQ8Jk{idW zR0L42IrLlp zEM`9k77yW<-@!l;#WCvO7RH7qF=<&aTe017TF#i~w%lCiwY+@xTRyc};e=3!x^L`O zkzuo@9&=7?>eIp-dw^RDlr&MP_y<@)C9G}5d0Yo#wUSB2I~ATJEK+TrXt$lDnUWDU zTgRUbGkA|G@XI|I6dIsDR#=f98sGu0qQkX5&^@vNci2FEt7rA_ODt~p@D^)Qm26?$Y^_E4jhHxUQ+X7(rP8?FTA1Pfg2W2!{Oh=S|3I*m%Y#SV zOt5Cy0X37w)4hh^om4%J`Nc#cMRXv~fO|?7L)8V%{oV4k0PexMT88M;EK;>9 zEF0x|*kL&_X4kXMF%vnb!ec(7n(gjr(;g(fA==U0kxHo8DHoSxjblYmIAyV61&wQ) zRVE|RPE9u$2?%C5#UMC=^atNILrD4F*N5d1wQo{hWh!jPhvovXuU4<`JPW?suhoNp z-@eO2IApf(20Y2Hoomf?)vCb*BPq|a=C#iFFuo4xY6Sar6SC_7=4!4lS9{O1f9l9X zGCn%{);*j-Rn{ZF0=}KVRo{k2GKFoe}1Nn6)`411ryWcb@HxysBie zf>s81?y}@A$R5?J!L+m>CBgTTZj=Tf`rVcH7<$!o;RpWuDn)V(){ z8EGih1W>kO9)+>oE>8~vhI^no>m;&!XX<$n@hql6!c}n00wz^>47Oe{dOy&fU=bjc zgrhD8z)DnUZ3I9dN#ihL+D$JxJ&ug(JQmuGG9kIpB&E7g4ORG9Kucd^((~PQ zcbzn+vxJns_JL=D1dqJ%gZ7mtega5PX7A#}LY%d;vpX}pGqc}}(^kv3%=g<}SoSRI z_j0j7>d4>4A-_k$Ely%ie+}d$WpmmzQIm7$zqr<9zWO?=_FHM#_7>qBE@)DzKFY7DcM6wm%}98ouqtfECnbL z!6A%LfltRu_OfGrc^?uG=-KGPg9ctNmy!6yB|bHj5%*1-G9p%u-wg?&7(W}CNVKEU zZ1h~ac>Gi(V;dFbUke!%Xo-tcWH_1GoX%K@L}s3{3WFf; zHRW|gg@0=E2F}e>dsbKEfbv#h|7h{0f+4;1lT*|Ruc-6(Yc}%>|7ZIbi@${kYAB|h zqH#h_$fot((yXc6qER#vU(2i337PYEtQVgb4aC~zVbH?-aS@HvEQ(W=-}p}|O=?Z% zFt2hfqRiAz?pMj^;)CbQx7Kcb+FkpsyY@+UTfkuiM|nHUvN#%tM!A0=)1*W5CKj2( za_WAA;K>bMN^^sv?iq?YR9wM~l|adFZeCpY1Zy@GH?MD3zHH#z?Wf{+7*3!Pb!_b% zhVc}%yB9&sr6$kwAI{Xb`2Skoyl(8zMZ+lq7w_0eV{_GmNUCj23o7hH`Gwm2?yb#p z%ZDk4cwxQZxY=D;qMPnv8H;u$#K>tIp_F^il*;7oem{S&SEaUh6eT=8lDz~}A6a+_ zvY$8mJRQq^rGkgmoPwMx$&BHfB+LY?kKog{Vw76J==LovIgoVVbL4LDIB546FLJ MNs}zuw0)iY3&9d0H2?qr literal 0 HcmV?d00001 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_products_stats.cpython-310.pyc b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/__pycache__/retrieve_products_stats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c76ef99d9297bc3305d3aaf040f463f1e1f53e22 GIT binary patch literal 1945 zcmaJ>OK%%D5GJ`#tsk|MAgI#UUJ_VEBBaL#Nt#rW+Z3+kST2GH4%GFMc4VxUYm$m% zRVobF*P!URC}16X>Cfno;I*gzgQAyoxRNZ}MYF(?^B{-AnU5b|SO^e&OTRy2!bRv$ zqn!U7P#(cAzlVV$iWAhuEsTv!64J6@wi3JRw48~}ZMnJ6YkB$Xw|r`|!VaMhbx-V8 zz_8J&$DAFT`m}IjALG^>B~4Tc{(@6b32R$%p435Ds`RAd-3m`r7OM_VwcAOvo{}*( zODCTVvj=|#ez^vNLdR%`6;@<`j`1{EvlYAIKF1K4$pM;2sd*IQTD1*g4ORU*Z9xj3vxUDo$*uYB=ft5njc(Nlc4PsqPCNcR8r$k%gf^2@*5IM zu>POD>b)(&GA_3s_j`ghqb>xSDo@uS!)~Tl6MiuDND*(z{p1du1D+l5+@Y+?x4Li@ zvr{l7I_wo|PZE)BsUjuI*`Y4(GBq_{%&%ZdyavhDJCFJ zKeOB*Ebq)8ASh%yG9(nAVoC;NM4%U#TF?_)5$J_I!b1#Qu}5g=DCg9L+3kPcFAkhj zZ`>)6e6V`T*>m>_1CQF&IY9$wFQ`In>b@aE_ZdoyHd1qkb&Q5SM*RgfPrZTv3;LBD zL${xy=YZj%|D&He--yegXtGYiqU2 zX1Li{4?nvbW^vg7BYfNpp&OU+ay!g&x0x$E;lc=O(Cu~6iP`Ni=Dk#{jMtRHNQN?k zF12%Wu)5LsHf$Qh+GcqYJj{Y`8c*tH=G@&7l!+=+Q6~u{r$M6*r%X0HsfG`Xai(7k za4BiHPrf~#uAibmk8>7vW(}TwUE8Rgl>t)wA^U%f4}-5Z8sDvlUp}Aicz1<@#zwWa z5pEyOmY=IoSgkcH{g2*xpk6Zg9P>yMu%GT;U=f2`^D>+8%WE*~0#;wR28|RI(a&Vx za1<7XdGaS&BAS%%YAfbRu8)UhaO>c{dB-t4yoa|;I1~FC>fb#7uEwwJe!}A@kq^tW z9l(1Y#O!rb*}pkU*&rmLVaipw%|Zs-x8abNjNS{iCs@n{m9W+2@TyZ)S{}bi@MK98 zGwo)FoNmV^bY2AQ#yugq&?KX}P>ocyDgeFOW3O4IbKq2kP5qgd? z8H-Mq({Z8pI%Z?h$)Kb_f^otn)ApVOwssO8QK>z}+eR-Ha_$pXO$iN)Xdf8rX^)9R zVJa>@HnzEaW7uG_mncy*7R)Xec=4`B}dn+D@2rGd1+n;0MiLY3ezd5Rg}_5icgGkedaCCx*>%HPVu1`R?J{%PTQvK ldExWe=dv~&E^=)6_s0zU&;UuAwC9nZbE(O8(ISQS@xMlWD7F9q literal 0 HcmV?d00001 diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/chat.jinja2 b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/chat.jinja2 new file mode 100644 index 0000000..b06357b --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/chat.jinja2 @@ -0,0 +1,83 @@ +system: +YOU ARE: +You are a helpful assistant that has access to Adenventure sample database which contains tables that stores information of customer, product, product descriptions and order details. + +SITUATION: +You are designed to be able to help answer any questions related to the customer, product recommendations, past order details, products sales information. + + +You are given: +(1) The chat history that you have had with the current user. +(2) The question to answer. +(3) Detailed customer information with their past orders/purchases information retrieved from sql query results. +(3) Detailed products information with description retrieved per this question against a search index. +(4) Aggregated product sales counts information retrieved from sql query results. + +INSTRUCTIONS: +- You MUST find the right information from the retrieved data to answer questions. If no information, please say you don't know. +- Remain grounded, do not invent new facts. +- Since the data is returned by Azure Cognitive Search, be mindful of the importance the search gave to various document. +- Use MARKDOWN to highlight your text. +- Please greeting the users use their name and title that are provided to you. +- Please explain in details and step by step in your answer. +- Make sure to reference any documentation used in the response. +- Reference past orders by name and description that would indicate customer would like the suggested item. It is important to refer customer information and past orders. + +YOUR TASK: +Your task is, based on the question of the user (and to a lower extent the chat history), to find the right information from the retrieved data. That data consists of (1) structured in JSON as returned by Azure Cognitive Search indexes. (2) Output json from sql query directly. + +system: +The following are the information that you used to answer customer' question. + +#Products Information: +You are given the following products as reference to your response. +{% for item in retrieved_products %} +ProductCategory: {{item.ProductCategoryName}} +ProductName: {{item.Name}} +ProductColor: {{item.Color}} +ProductListPrice: {{item.ListPrice}} +ProductDescription: {{item.Description}} +{% endfor %} + +#Aggregated Products Sales Count: +You are given the following products sales summary which is ordered by product category name and sales count. +{% for item in retrieved_products_stats%} +ProductCategory: {{item.ProductCategoryName}} +ProductName: {{item.Name}} +ProductSalesCountTotal: {{item.sales_count}} +ProductListPrice: {{item.ListPrice}} +ProductColor:{{item.Color}} +{% endfor %} + +# Previous Purchases: +Here is the details of the user's past purchases, use it as additional context to the question they are asking and as relevant information pertaining to their question. +{% for item in retrieved_orders %} +ProductName: {{item.Name}} +ProductColor: {{item.Color}} +ProductDescription: {{item.Description}} +ProductListPrice: {{item.ListPrice}} +ProductSize: {{item.Size}} +{% endfor %} + +# Customer Context: +{% for item in retrieved_customers %} +The customer's name is {{item.FirstName}}, last name is {{item.LastName}} and title is {{item.Title}}. +{% endfor %} + +Chat history: +{% for item in chat_history %} +user: +{{item.inputs.question}} +assistant: +{{item.outputs.answer}} +{% endfor %} + +Additional INSTRUCTIONS: +If customer is asking for recommendations, then reference on products specifically by name, size, color, price and description that would indicate the customer might like the suggested product. + +If customer is asking for recommendations, refer to their past purchased products to show that they might like the recommended products. + +If customer is aksing for general products information, then please answer the question by summarizing the data. Please use step by step reasoning and provide as many details as you can. DONOT provide irrelevant information. + +user: +{{question}} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/flow.dag.sample.yaml b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/flow.dag.sample.yaml new file mode 100644 index 0000000..3879719 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/flow.dag.sample.yaml @@ -0,0 +1,603 @@ +id: template_chat_flow +name: Template Chat Flow +inputs: + chat_history: + type: list + default: + - inputs: + customer: '{"FirstName":"Donald","MiddleName":"L.","LastName":"Blanton"}' + question: I'm looking for new bike jerseys for my customers + outputs: + answer: >- + Hello Mr. Blanton, I see that you're looking for new bike jerseys for + your customers. Based on our product database, I have found some + options that might interest you: + + + 1. **Long-Sleeve Logo Jersey**: + - Available Sizes: S, L, XL + - Color: Multi + - Price: $49.99 + - Description: Unisex long-sleeve AWC logo microfiber cycling jersey + + 2. **Short-Sleeve Classic Jersey**: + - Available Sizes: M, XL + - Color: Yellow + - Price: $53.99 + - Description: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. + + Considering your past purchases, you have bought a **Long-Sleeve Logo Jersey, M** and a **Short-Sleeve Classic Jersey, S**. Based on this, your customers might be interested in trying different sizes and colors of these jerseys. + + + Please let me know if you need more information or if you have any specific requirements. + line_number: 0 + retrieved_customer: + - CompanyName: Coalition Bike Company + CustomerID: 25 + EmailAddress: donald0@adventure-works.com + FirstName: Donald + LastName: Blanton + MiddleName: L. + ModifiedDate: 1157068800000 + NameStyle: false + PasswordHash: pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw= + PasswordSalt: jKtOaOw= + Phone: 357-555-0161 + SalesPerson: adventure-works\shu0 + Suffix: null + Title: Mr. + rowguid: 31D03546-FB2A-4488-890E-4709A659E3F0 + - CompanyName: Coalition Bike Company + CustomerID: 29568 + EmailAddress: donald0@adventure-works.com + FirstName: Donald + LastName: Blanton + MiddleName: L. + ModifiedDate: 1157068800000 + NameStyle: false + PasswordHash: pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw= + PasswordSalt: jKtOaOw= + Phone: 357-555-0161 + SalesPerson: adventure-works\shu0 + Suffix: null + Title: Mr. + rowguid: D8B39163-B4B4-428D-ACD7-1DF795D801DC + retrieved_past_orders: + - Color: Yellow + CustomerID: 29568 + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, S + ProductCategoryID: 25 + ProductDescriptionID: 1205 + ProductID: 881 + ProductModelID: 32 + ProductNumber: SJ-0194-S + Size: S + - Color: Silver + CustomerID: 29568 + Description: Suitable for any type of riding, on or off-road. Fits any budget. + Smooth-shifting with a comfortable ride. + ListPrice: 564.99 + Name: Mountain-500 Silver, 52 + ProductCategoryID: 5 + ProductDescriptionID: 8 + ProductID: 988 + ProductModelID: 23 + ProductNumber: BK-M18S-52 + Size: "52" + - Color: Silver + CustomerID: 29568 + Description: This bike delivers a high-level of performance on a budget. It is + responsive and maneuverable, and offers peace-of-mind when you + decide to go off-road. + ListPrice: 769.49 + Name: Mountain-400-W Silver, 40 + ProductCategoryID: 5 + ProductDescriptionID: 64 + ProductID: 981 + ProductModelID: 22 + ProductNumber: BK-M38S-40 + Size: "40" + - Color: Black + CustomerID: 29568 + Description: Each frame is hand-crafted in our Bothell facility to the optimum + diameter and wall-thickness required of a premium mountain frame. + The heat-treated welded aluminum frame has a larger diameter tube + that absorbs the bumps. + ListPrice: 1349.6 + Name: HL Mountain Frame - Black, 42 + ProductCategoryID: 16 + ProductDescriptionID: 647 + ProductID: 743 + ProductModelID: 5 + ProductNumber: FR-M94B-42 + Size: "42" + - Color: null + CustomerID: 29568 + Description: All-purpose bar for on or off-road. + ListPrice: 44.54 + Name: LL Mountain Handlebars + ProductCategoryID: 8 + ProductDescriptionID: 697 + ProductID: 808 + ProductModelID: 52 + ProductNumber: HB-M243 + Size: null + - Color: Multi + CustomerID: 29568 + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, M + ProductCategoryID: 25 + ProductDescriptionID: 1211 + ProductID: 714 + ProductModelID: 11 + ProductNumber: LJ-0192-M + Size: M + - Color: Silver + CustomerID: 29568 + Description: Our best value utilizing the same, ground-breaking frame technology + as the ML aluminum frame. + ListPrice: 264.05 + Name: LL Mountain Frame - Silver, 40 + ProductCategoryID: 16 + ProductDescriptionID: 637 + ProductID: 944 + ProductModelID: 8 + ProductNumber: FR-M21S-40 + Size: "40" + - Color: Silver/Black + CustomerID: 29568 + Description: Stainless steel; designed to shed mud easily. + ListPrice: 80.99 + Name: HL Mountain Pedal + ProductCategoryID: 17 + ProductDescriptionID: 849 + ProductID: 937 + ProductModelID: 64 + ProductNumber: PD-M562 + Size: null + retrieved_product_stats: + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, L + ProductCategoryName: Jerseys + sales_count: 10 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, XL + ProductCategoryName: Jerseys + sales_count: 9 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, L + ProductCategoryName: Jerseys + sales_count: 8 + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, M + ProductCategoryName: Jerseys + sales_count: 7 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, S + ProductCategoryName: Jerseys + sales_count: 7 + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, XL + ProductCategoryName: Jerseys + sales_count: 3 + retrieved_products: + - "@search.score": 0.03333333507180214 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, XL + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 716 + ProductModelID: 11 + ProductNumber: LJ-0192-X + Size: XL + - "@search.score": 0.03226646035909653 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, L + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 715 + ProductModelID: 11 + ProductNumber: LJ-0192-L + Size: L + - "@search.score": 0.0317540317773819 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, S + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 713 + ProductModelID: 11 + ProductNumber: LJ-0192-S + Size: S + - "@search.score": 0.016393441706895828 + Color: Yellow + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, XL + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1205 + ProductId: 884 + ProductModelID: 32 + ProductNumber: SJ-0194-X + Size: XL + - "@search.score": 0.016129031777381897 + Color: Yellow + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, M + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1205 + ProductId: 882 + ProductModelID: 32 + ProductNumber: SJ-0194-M + Size: M + - inputs: + customer: '{"FirstName":"Donald","MiddleName":"L.","LastName":"Blanton"}' + question: I'm looking for new bike jerseys for my customers + outputs: + answer: >- + Hello Mr. Blanton, I understand that you're looking for new bike + jerseys for your customers. Based on our product database, I have + found some options that might interest you: + + + 1. **Long-Sleeve Logo Jersey**: + - Available Sizes: S, L, XL + - Color: Multi + - Price: $49.99 + - Description: Unisex long-sleeve AWC logo microfiber cycling jersey + + 2. **Short-Sleeve Classic Jersey**: + - Available Sizes: M, XL + - Color: Yellow + - Price: $53.99 + - Description: Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. + + Considering your past purchases, you have bought a **Long-Sleeve Logo Jersey, M** and a **Short-Sleeve Classic Jersey, S**. Based on this, your customers might be interested in trying different sizes and colors of these jerseys. + + + Please let me know if you need more information or if you have any specific requirements. + line_number: 0 + retrieved_customer: + - CompanyName: Coalition Bike Company + CustomerID: 25 + EmailAddress: donald0@adventure-works.com + FirstName: Donald + LastName: Blanton + MiddleName: L. + ModifiedDate: 1157068800000 + NameStyle: false + PasswordHash: pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw= + PasswordSalt: jKtOaOw= + Phone: 357-555-0161 + SalesPerson: adventure-works\shu0 + Suffix: null + Title: Mr. + rowguid: 31D03546-FB2A-4488-890E-4709A659E3F0 + - CompanyName: Coalition Bike Company + CustomerID: 29568 + EmailAddress: donald0@adventure-works.com + FirstName: Donald + LastName: Blanton + MiddleName: L. + ModifiedDate: 1157068800000 + NameStyle: false + PasswordHash: pKYDelLBOZMO98GBzhMxBSzzE0gUYKx9dXzYTYNuBgw= + PasswordSalt: jKtOaOw= + Phone: 357-555-0161 + SalesPerson: adventure-works\shu0 + Suffix: null + Title: Mr. + rowguid: D8B39163-B4B4-428D-ACD7-1DF795D801DC + retrieved_past_orders: + - Color: Yellow + CustomerID: 29568 + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, S + ProductCategoryID: 25 + ProductDescriptionID: 1205 + ProductID: 881 + ProductModelID: 32 + ProductNumber: SJ-0194-S + Size: S + - Color: Silver + CustomerID: 29568 + Description: Suitable for any type of riding, on or off-road. Fits any budget. + Smooth-shifting with a comfortable ride. + ListPrice: 564.99 + Name: Mountain-500 Silver, 52 + ProductCategoryID: 5 + ProductDescriptionID: 8 + ProductID: 988 + ProductModelID: 23 + ProductNumber: BK-M18S-52 + Size: "52" + - Color: Silver + CustomerID: 29568 + Description: This bike delivers a high-level of performance on a budget. It is + responsive and maneuverable, and offers peace-of-mind when you + decide to go off-road. + ListPrice: 769.49 + Name: Mountain-400-W Silver, 40 + ProductCategoryID: 5 + ProductDescriptionID: 64 + ProductID: 981 + ProductModelID: 22 + ProductNumber: BK-M38S-40 + Size: "40" + - Color: Black + CustomerID: 29568 + Description: Each frame is hand-crafted in our Bothell facility to the optimum + diameter and wall-thickness required of a premium mountain frame. + The heat-treated welded aluminum frame has a larger diameter tube + that absorbs the bumps. + ListPrice: 1349.6 + Name: HL Mountain Frame - Black, 42 + ProductCategoryID: 16 + ProductDescriptionID: 647 + ProductID: 743 + ProductModelID: 5 + ProductNumber: FR-M94B-42 + Size: "42" + - Color: null + CustomerID: 29568 + Description: All-purpose bar for on or off-road. + ListPrice: 44.54 + Name: LL Mountain Handlebars + ProductCategoryID: 8 + ProductDescriptionID: 697 + ProductID: 808 + ProductModelID: 52 + ProductNumber: HB-M243 + Size: null + - Color: Multi + CustomerID: 29568 + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, M + ProductCategoryID: 25 + ProductDescriptionID: 1211 + ProductID: 714 + ProductModelID: 11 + ProductNumber: LJ-0192-M + Size: M + - Color: Silver + CustomerID: 29568 + Description: Our best value utilizing the same, ground-breaking frame technology + as the ML aluminum frame. + ListPrice: 264.05 + Name: LL Mountain Frame - Silver, 40 + ProductCategoryID: 16 + ProductDescriptionID: 637 + ProductID: 944 + ProductModelID: 8 + ProductNumber: FR-M21S-40 + Size: "40" + - Color: Silver/Black + CustomerID: 29568 + Description: Stainless steel; designed to shed mud easily. + ListPrice: 80.99 + Name: HL Mountain Pedal + ProductCategoryID: 17 + ProductDescriptionID: 849 + ProductID: 937 + ProductModelID: 64 + ProductNumber: PD-M562 + Size: null + retrieved_product_stats: + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, L + ProductCategoryName: Jerseys + sales_count: 10 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, XL + ProductCategoryName: Jerseys + sales_count: 9 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, L + ProductCategoryName: Jerseys + sales_count: 8 + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, M + ProductCategoryName: Jerseys + sales_count: 7 + - Color: Yellow + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, S + ProductCategoryName: Jerseys + sales_count: 7 + - Color: Multi + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, XL + ProductCategoryName: Jerseys + sales_count: 3 + retrieved_products: + - "@search.score": 0.03333333507180214 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, XL + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 716 + ProductModelID: 11 + ProductNumber: LJ-0192-X + Size: XL + - "@search.score": 0.03226646035909653 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, L + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 715 + ProductModelID: 11 + ProductNumber: LJ-0192-L + Size: L + - "@search.score": 0.0317540317773819 + Color: Multi + Description: Unisex long-sleeve AWC logo microfiber cycling jersey + ListPrice: 49.99 + Name: Long-Sleeve Logo Jersey, S + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1211 + ProductId: 713 + ProductModelID: 11 + ProductNumber: LJ-0192-S + Size: S + - "@search.score": 0.016393441706895828 + Color: Yellow + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, XL + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1205 + ProductId: 884 + ProductModelID: 32 + ProductNumber: SJ-0194-X + Size: XL + - "@search.score": 0.016129031777381897 + Color: Yellow + Description: Short sleeve classic breathable jersey with superior moisture + control, front zipper, and 3 back pockets. + ListPrice: 53.99 + Name: Short-Sleeve Classic Jersey, M + ProductCategoryID: 25 + ProductCategoryName: Jerseys + ProductDescriptionID: 1205 + ProductId: 882 + ProductModelID: 32 + ProductNumber: SJ-0194-M + Size: M + is_chat_input: false + is_chat_history: true + question: + type: string + default: I'm looking for new bike jerseys for my customers + is_chat_input: true + customer: + type: object + default: + FirstName: Donald + MiddleName: L. + LastName: Blanton + is_chat_input: false +outputs: + answer: + type: string + reference: ${chat.output} + is_chat_output: true + retrieved_documents: + type: string + reference: ${get_retrieved_documents.output} + is_chat_output: false +nodes: +- name: retrieve_customer + type: python + source: + type: code + path: retrieve_customer.py + inputs: + inputs: ${inputs.customer} + conn: SQLDB-Connection-Demo + use_variants: false +- name: retrieve_past_orders + type: python + source: + type: code + path: retrieve_orders.py + inputs: + inputs: ${retrieve_customer.output} + conn: SQLDB-Connection-Demo + use_variants: false +- name: retrieve_products + type: python + source: + type: code + path: retrieve_products.py + inputs: + conn: dricopilot_env_v2 + search_text: ${inputs.question} + top_k: 5 + use_variants: false +- name: retrieve_products_stats + type: python + source: + type: code + path: retrieve_products_stats.py + inputs: + inputs: ${retrieve_products.output} + conn: SQLDB-Connection-Demo + use_variants: false +- name: chat + type: llm + source: + type: code + path: chat.jinja2 + inputs: + deployment_name: mp-aoi-gpt-4-32k + temperature: 0 + top_p: 1 + stop: "" + max_tokens: 1000 + presence_penalty: 0 + frequency_penalty: 0 + logit_bias: "" + chat_history: ${inputs.chat_history} + question: ${inputs.question} + retrieved_customers: ${retrieve_customer.output} + retrieved_orders: ${retrieve_past_orders.output} + retrieved_products: ${retrieve_products.output} + retrieved_products_stats: ${retrieve_products_stats.output} + provider: AzureOpenAI + connection: DRI-Copilot-SQL-OAI + api: chat + module: promptflow.tools.aoai + use_variants: false +- name: get_retrieved_documents + type: python + source: + type: code + path: get_retrieved_documents.py + inputs: + input1: ${retrieve_customer.output} + input2: ${retrieve_past_orders.output} + input3: ${retrieve_products.output} + input4: ${retrieve_products_stats.output} + use_variants: false +node_variants: {} +environment: + python_requirements_txt: requirements.txt diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/get_retrieved_documents.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/get_retrieved_documents.py new file mode 100644 index 0000000..91ca1ea --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/get_retrieved_documents.py @@ -0,0 +1,9 @@ +from promptflow import tool + +# The inputs section will change based on the arguments of the tool function, after you save the code +# Adding type to arguments and return value will help the system show the types properly +# Please update the function name/signature per need +@tool +def my_python_tool(input1: list, input2: list, input3: list, input4: list) -> str: + retrieved_documents = input1 + input2 + input3 + input4 + return retrieved_documents \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/requirements.txt b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/requirements.txt new file mode 100644 index 0000000..e9f7355 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/requirements.txt @@ -0,0 +1 @@ +pyodbc \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_customer.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_customer.py new file mode 100644 index 0000000..77e306a --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_customer.py @@ -0,0 +1,32 @@ +from promptflow import tool +import pandas as pd +from promptflow.connections import CustomConnection +import pyodbc +import json + +@tool +def get_customer_details(inputs: dict, conn: CustomConnection): + # this is a bug in promptflow where they treat this input type differently + if type(inputs) == str: + inputs_dict = eval(inputs) + else: + inputs_dict = inputs + if inputs_dict['MiddleName'] == "": + sqlQuery = f"""select * from [SalesLT].[Customer] WHERE FirstName='{inputs_dict['FirstName']}' and MiddleName is NULL and LastName='{inputs_dict['LastName']}'""" + else: + sqlQuery = f"""select * from [SalesLT].[Customer] WHERE FirstName='{inputs_dict['FirstName']}' and MiddleName='{inputs_dict['MiddleName']}' and LastName='{inputs_dict['LastName']}'""" + connectionString = conn['connectionString'] + sqlConn = pyodbc.connect(connectionString) + cursor = sqlConn.cursor() + queryResult = pd.DataFrame() + try: + cursor.execute(sqlQuery) + records = cursor.fetchall() + queryResult = pd.DataFrame.from_records(records, columns=[col[0] for col in cursor.description]) + except Exception as e: + print(f"connection could not be established: {e}") + finally: + cursor.close() + + customer_detail_json = json.loads(queryResult.to_json(orient='records')) + return customer_detail_json \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_orders.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_orders.py new file mode 100644 index 0000000..889c54b --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_orders.py @@ -0,0 +1,43 @@ +from promptflow import tool +import pandas as pd +from promptflow.connections import CustomConnection +import pyodbc +import json +import re + + +def get_customer_id(inputs: list): + customer_ids_list = set() + for i in range(len(inputs)): + customer_id = inputs[i]['CustomerID'] + if customer_id not in customer_ids_list: + customer_ids_list.add(customer_id) + return re.sub(r',(?=\))', '', str(tuple(customer_ids_list))) + + +@tool +def get_customer_past_orders(inputs: list, conn: CustomConnection): + customers_ids = get_customer_id(inputs) + sqlQuery = """select SOH.CustomerID, SOD.ProductID, SP.Name, SP.ProductNumber, SP.Color, SP.Size, SP.ListPrice, SP.ProductCategoryID, SP.ProductModelID, PD.ProductDescriptionID, PD.Description + from [SalesLT].[SalesOrderDetail] SOD + INNER JOIN [SalesLT].[SalesOrderHeader] SOH on SOD.SalesOrderID = SOH.SalesOrderID + INNER JOIN [SalesLT].[Product] SP ON SP.ProductID = SOD.ProductID + INNER JOIN [SalesLT].[ProductModelProductDescription] PMPD ON PMPD.ProductModelID = SP.ProductModelID + INNER JOIN [SalesLT].[ProductDescription] PD ON PD.ProductDescriptionID = PMPD.ProductDescriptionID + WHERE PMPD.Culture = 'en' + AND CustomerID IN {customers_ids}""".replace("{customers_ids}", customers_ids) + connectionString = conn['connectionString'] + conn = pyodbc.connect(connectionString) + cursor = conn.cursor() + queryResult = pd.DataFrame() + try: + cursor.execute(sqlQuery) + records = cursor.fetchall() + queryResult = pd.DataFrame.from_records( + records, columns=[col[0] for col in cursor.description]) + except Exception as e: + print(f"connection could not be established: {e}") + finally: + cursor.close() + + return json.loads(queryResult.to_json(orient='records')) diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products.py new file mode 100644 index 0000000..410a673 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products.py @@ -0,0 +1,56 @@ +from promptflow import tool +import requests +import json +import os +import openai +import re +from promptflow.connections import CustomConnection, AzureOpenAIConnection +from azure.core.credentials import AzureKeyCredential + + +def generate_embeddings(text, conn: CustomConnection): + openai.api_base = conn['OPENAI_API_BASE_EMBED'] + openai.api_type = "azure" + # this may change in the future + openai.api_version = conn['OPENAI_API_VERSION'] + openai.api_key = conn['OPENAI_API_KEY_EMBED'] + response = openai.Embedding.create( + input=text, engine="text-embedding-ada-002") + embeddings = response['data'][0]['embedding'] + return embeddings + +# The inputs section will change based on the arguments of the tool function, after you save the code +# Adding type to arguments and return value will help the system show the types properly +# Please update the function name/signature per need + + +@tool +def get_products(search_text: str, conn: CustomConnection, top_k: int) -> str: + search_service = "sqldricopilot" + index_name = "promptflow-demo-product-description" + search_key = conn["search-key"] + api_version = "2023-07-01-Preview" + + headers = { + 'Content-Type': 'application/json', + 'api-key': search_key, + } + params = { + 'api-version': api_version, + } + body = { + "vector": { + "value": generate_embeddings(text=search_text, conn=conn), + "fields": "DescriptionVector, ProductCategoryNameVector", + "k": top_k + }, + "select": "ProductId, ProductCategoryName, Name, ProductNumber, Color, ListPrice, Size, ProductCategoryID, ProductModelID, ProductDescriptionID, Description", + "top": top_k, + } + response = requests.post( + f"https://{search_service}.search.windows.net/indexes/{index_name}/docs/search", headers=headers, params=params, json=body) + response_json = response.json()['value'] + for i in range(len(response_json)): + response_json[i]['ProductId'] = int(response_json[i]['ProductId']) + + return response_json diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products_stats.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products_stats.py new file mode 100644 index 0000000..5e25128 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/retrieve_products_stats.py @@ -0,0 +1,44 @@ +from promptflow import tool +import pandas as pd +from promptflow.connections import CustomConnection +import pyodbc +import json +import re + + +def get_product_category_name(inputs: list): + product_category_name_lists = set() + for i in range(len(inputs)): + pc_name = inputs[i]['ProductCategoryName'] + if pc_name not in product_category_name_lists: + product_category_name_lists.add(pc_name) + return re.sub(r',(?=\))', '', str(tuple(product_category_name_lists))) + + +@tool +def get_product_stats(inputs: list, conn: CustomConnection): + product_category_name_lists = get_product_category_name(inputs) + sqlQuery = """SELECT TOP 10 pc.Name AS ProductCategoryName, p.Name, p.Color, p.ListPrice, count(p.Name) as sales_count +FROM SalesLT.Product p +JOIN SalesLT.SalesOrderDetail sod +ON p.ProductID = sod.ProductID +JOIN SalesLT.ProductCategory pc +ON pc.ProductCategoryID = p.ProductCategoryID +WHERE pc.Name IN {product_category_name_lists} +GROUP BY pc.Name, p.Name, p.Color, p.ListPrice +ORDER by pc.Name, sales_count DESC""".replace("{product_category_name_lists}", product_category_name_lists) + connectionString = conn['connectionString'] + conn = pyodbc.connect(connectionString) + cursor = conn.cursor() + queryResult = pd.DataFrame() + try: + cursor.execute(sqlQuery) + records = cursor.fetchall() + queryResult = pd.DataFrame.from_records( + records, columns=[col[0] for col in cursor.description]) + except Exception as e: + print(f"connection could not be established: {e}") + finally: + cursor.close() + + return json.loads(queryResult.to_json(orient='records')) diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/single_run_data.jsonl b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/single_run_data.jsonl new file mode 100644 index 0000000..d11cd3d --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/promptflow/single_run_data.jsonl @@ -0,0 +1 @@ +{"chat_history": [], "question": "I'm looking for new bike jerseys for my customers", "customer": {"FirstName":"Donald","MiddleName":"L.","LastName":"Blanton"}} \ No newline at end of file diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/run.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/run.py new file mode 100644 index 0000000..ac8b3fc --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/run.py @@ -0,0 +1,65 @@ +""" +Run the PromptFlow locally. + +Copyright (c) Microsoft Corporation. All rights reserved. +""" + +# %% +from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential +# azure version promptflow apis +from promptflow.azure import PFClient +from promptflow.entities import AzureOpenAIConnection, CustomConnection +from promptflow.entities import Run +import json +import os +from azure.core.credentials import TokenCredential + +print("Loading configs from file.") +with open(f'configs/flow_config.json') as f: + config = json.load(f) + +# Getting credentials for local access +# ----------------------------------------------------------------------------- + +# %% +try: + credential: TokenCredential = DefaultAzureCredential() + # Check if given credential can get token successfully. + credential.get_token("https://management.azure.com/.default") +except Exception: + # Fall back to InteractiveBrowserCredential in case DefaultAzureCredential not work + credential = InteractiveBrowserCredential() +# %% +# Get a handle to workspace +pf = PFClient( + credential=credential, + # this will look like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + subscription_id=config["subscription_id"], + resource_group_name=config["resource_group_name"], + workspace_name=config["workspace_name"], +) + +print("currently Azure Promptflow SDK don't support create connection and upload to workspace, so we need to create connection manually IN PORTAL") +# Loading PromptFLow +# %% +# load flow +flow_path = "./promptflow" +data_path = "./promptflow/single_run_data.jsonl" +# assume you have existing runtime with this name provisioned +runtime = config["promptflow_runtime"] + +# %% +# create run +base_run = pf.run( + flow=flow_path, + data=data_path, + runtime=runtime, + display_name="sql-promptflow-demo-1" +) +pf.stream(base_run) +# %% +details = pf.get_details(base_run) +details.head(10) + +pf.visualize(base_run) +# %% diff --git a/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/setup.py b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/setup.py new file mode 100644 index 0000000..36d8469 --- /dev/null +++ b/AzureSQLPromptFlowSamples/src/sql-promptflow-demo/setup.py @@ -0,0 +1,127 @@ +""" +This file do the setup for testing the flow locally. + +Copyright (c) Microsoft Corporation. All rights reserved. +""" +# %% +from promptflow import PFClient +from promptflow.entities import AzureOpenAIConnection, CustomConnection +import json +import os +import yaml +import subprocess + +from azure.identity import DefaultAzureCredential +from azure.keyvault.secrets import SecretClient + +# %% +# Keyvault Setup + + +def get_keyvault_secret(keyvault_uri: str, secret_name: str): + """Use the default credential (e.g., az login) to get key vault access and retrieve a secret.""" + credential = DefaultAzureCredential( + exclude_shared_token_cache_credential=True, exclude_visual_studio_credential=True) + client = SecretClient(vault_url=keyvault_uri, credential=credential) + secret = client.get_secret(secret_name) + return secret.value + + +def upload_secret(vault_url, key, value): + """Use the default credential (e.g., az login) to get key vault access and set a secret.""" + + # changing key to lowercase and replacing underscores with dashes + key = key.lower().replace('_', '-') + + # Use the default credential (e.g., az login) + credential = DefaultAzureCredential( + exclude_shared_token_cache_credential=True, exclude_visual_studio_credential=True) + client = SecretClient(vault_url=vault_url, credential=credential) + + # Set (or update) the secret + client.set_secret(key, value) + + +# Load the config json files +print("Loading flow config files...") +with open('./configs/flow_config.json') as f: + config = json.load(f) + +print("Loading keys from environment variables...") +with open('./configs/key_config_local.json') as f: + keys = json.load(f) + + +# Send config_local.json contents to key vault +print('Uploading all secrets from key_config_local.json to Key Vault') +print('Note: keys will be converted to lowercase and underscores will be replaced with dashes (Key Vault requirement)') +for key, value in keys.items(): + print(f'Uploading secret {key}') + upload_secret(config['keyvault_uri'], key, value) + print(f'Secret {key} uploaded successfully') + +# %% +# setting up AOAI connection +print("Setting up AOAI connections.") +print('Getting AOAI API key from keyvault') +aoai_api_key = get_keyvault_secret(config['keyvault_uri'], 'aoai-api-key') + +pf = PFClient() + +conn_name = config['azure_open_ai_connection_name'] +connection = AzureOpenAIConnection( + name=conn_name, + api_key=aoai_api_key, + api_base=config["aoai_api_base"], + api_type=config["aoai_api_type"], + api_version=config["aoai_api_version"], +) +conn = pf.connections.create_or_update(connection) +print("successfully created connection") +# %% +# setting up SQL connection +print("Setting up SQL connections.") +print('Getting SQL Connection STRING from keyvault') +sqlConnectionString = get_keyvault_secret( + config['keyvault_uri'], 'connectionString') +print('Getting Azure Congnitive Search Key from keyvault') +acs_key = get_keyvault_secret(config['keyvault_uri'], 'acs-key') +print('Getting opeenai embedding key from keyvault') +aoai_api_key_embed = get_keyvault_secret( + config['keyvault_uri'], 'aoai-api-key-embed') + +conn_name = config['SQLDB_connection_name'] +connection = CustomConnection( + name=conn_name, + secrets={"connectionString": sqlConnectionString, "search-key": acs_key, "OPENAI_API_BASE_EMBED": + config["OPENAI_API_BASE_EMBED"], "OPENAI_API_VERSION": config["OPENAI_API_VERSION"], "OPENAI_API_KEY_EMBED": aoai_api_key_embed} +) +conn = pf.connections.create_or_update(connection) +print("successfully created connection") + +# %% +# Load the yaml file to dictionary path is azure_openai.yml +print("Setting up flow.dag.yaml.") +with open('./promptflow/flow.dag.sample.yaml') as f: + config_flow = yaml.load(f, Loader=yaml.FullLoader) +# import pdb; pdb.set_trace() +# replace the deployment_name with the one you want to use +for node in config_flow["nodes"]: + # Setting up model for the agent chat node. + if node.get('api') == "chat": + if 'deployment_name' in node: + node["deployment_name"] = config['aoai_deployment_name'] + if 'deployment_name' in node['inputs']: + node['inputs']['deployment_name'] = config['aoai_deployment_name'] + # Setting up model for the final chat node. + if 'connection' in node: + node['connection'] = config['azure_open_ai_connection_name'] + else: + if 'conn' in node['inputs']: + node['inputs']['conn'] = config['SQLDB_connection_name'] + +# write the yaml file back +with open('./promptflow/flow.dag.yaml', 'w') as f: + yaml.dump(config_flow, f) + +# %%