{"_id":"58795c905f13bb0f0091c7fa","githubsync":"","version":{"_id":"5668fab608f90021008e8832","__v":19,"project":"5668fab608f90021008e882f","createdAt":"2015-12-10T04:08:22.769Z","releaseDate":"2015-12-10T04:08:22.769Z","categories":["5668fab708f90021008e8833","569740f124490c3700170a64","569742b58560a60d00e2c25d","569742bd0b09a41900b2446c","569742cd69393517000c82b3","569742f459a6692d003fad8f","569743020b09a41900b2446d","5697430b69393517000c82b5","56a17776470ae00d00c30642","56a2c48a831e2a0d0069b1ad","56b535757bccae0d00e9a1cd","56e1ff6aa49fdc0e005746b5","57e1c88115bf6522002a5e4e","57fa65275ba65a17008b988f","57fbeea34002550e004c032e","58474584889b6c2d00fb86e9","58475dcc64157f0f002f1907","587e7b5158666c2700965d4e","58a349fc30852819007ba083"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.18.0","version":"1.18"},"__v":0,"project":"5668fab608f90021008e882f","user":"5668fa9755e4b32100935d41","category":{"_id":"57fbeea34002550e004c032e","project":"5668fab608f90021008e882f","__v":0,"version":"5668fab608f90021008e8832","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-10-10T19:40:19.460Z","from_sync":false,"order":12,"slug":"liftigniter-lab","title":"LiftIgniter Lab"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-13T23:02:40.461Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"This is a beta feature in the LiftIgniter Lab that allows for some testing and debugging of model query results. It does not offer any functionality beyond what can already be accessed through the [model query API](doc:model), but it makes it easier to view the results if you are using standard field names.\n\nThe panel can be accessed at [https://lab.liftigniter.com/modelQuery](https://lab.liftigniter.com/modelQuery) if you are logged in.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8a7f183-modelQueryPanel-empty.png\",\n        \"modelQueryPanel-empty.png\",\n        1846,\n        1250,\n        \"#ebeced\"\n      ],\n      \"caption\": \"Empty model query for LiftIgniter\"\n    }\n  ]\n}\n[/block]\nWhen you load the page, an empty query is made to LiftIgniter's server (query.petametrics.com) from the lab server. The response returned is rendered on the frontend as a table as shown in the screenshot above. Note that the table is collapsed by default so you will need to expand it.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Interpreting the query response\"\n}\n[/block]\nWe display only a fixed set of fields in this interface (unlike our API, where we can return an arbitrary set of requested fields). This is to provide a predictable user experience that addresses most basic debugging use cases. The fields are as follows:\n\n* Rank, the first column, corresponds to the requested field called \"rank\" and is the rank of the recommended item.\n* Title (URL linked) prints the title (field \"title\") with a hyperlink to the URL (field \"url\"). If you are using an ID (field: \"id\") different from the URL, we will specify the ID parenthetically). The values of fields called \"description\" and \"sponsored\" are available if you hover over the information icon (*i*) after the title.\n* Published time is the published_time field, if you have sent it to us in ISO 8601 format.\n* Score is the field called adjustedScore (if available in the query response) or rawScore (if no adjustedScore is available). If you hover over the information icon <em>i</em>, you will see score diagnostics that provide more insight into how the scoring was done (field \"scoreDiagnostics\"). These diagnostics provide partial insight into how we are scoring queries, though not all the details of the scoring mechanism are obvious from this.\n* Real time sources corresponds to the field \"realTimeSources\" (that you can specify in \"arrayRequestFields\"). It lists the different real-time sources that were used to generate the item as a candidate. If the candidate did not come from real-time sources, this field will say \"N/A\". If there are multiple real-time sources, they will be listed with comma separators.\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Query info below the response\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d574965-modelQueryPanel-empty-queryInfo.png\",\n        \"modelQueryPanel-empty-queryInfo.png\",\n        1830,\n        648,\n        \"#eeefef\"\n      ],\n      \"caption\": \"Query info for empty model query to LiftIgniter\"\n    }\n  ]\n}\n[/block]\nBelow the query response, you will see a section giving information on the model query result. You can access this query information by passing in \"getQueryInfo\" : true into your model query.\n\n* \"Did the current item/URL match our inventory (false if you entered nothing)?\" corresponds to the field matchedInventory.\n* \"Real-time sources used to generate candidates\" corresponds to realTimeSources. It is the union of the real-time sources shown for each candidate.\n* \"Experiment key\" corresponds to experimentKey. It is an internal key used in our system in cases that we are segmenting traffic based on different experiments. In most cases, it will show \"default\".\n* \"Total number of candidates considered\" corresponds to the field numCandidates. If you hover on the information icon to the right, you can get more information on the number of candidates at various stages of the query processing pipeline.\n* \"Total query time (in milliseconds)\" corresponds to the field queryTime. If you hover on the information icon to the right, you will get information on cumulative time up to various stages of query processing.\n* \"Actual model-server the query went to\" is the DNS name of the machine the query went to. This isn't directly relevant to you (as these servers are not directly accessible) but can be useful to include in debugging information you send to us if there are issues.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Query parameters\"\n}\n[/block]\nThe interface does not give you full freedom to specify arbitrary query parameters. However, you can specify a few query parameters. After editing the parameters, you should click Submit again. When the results refresh, you will see the timestamp right above the results change to indicate the time of the most recent refresh.\n\nSome additional parameters can be specified by expanding the sections for \"Enter browsing history\" and \"Advanced options\". You can learn about these options by looking up the documentation for the [Model Query API](doc:model).\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/330823f-modelQuery-specific-url.png\",\n        \"modelQuery-specific-url.png\",\n        1834,\n        1298,\n        \"#eaebec\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"modelquery-panel","type":"basic","title":"ModelQuery Panel"}
This is a beta feature in the LiftIgniter Lab that allows for some testing and debugging of model query results. It does not offer any functionality beyond what can already be accessed through the [model query API](doc:model), but it makes it easier to view the results if you are using standard field names. The panel can be accessed at [https://lab.liftigniter.com/modelQuery](https://lab.liftigniter.com/modelQuery) if you are logged in. [block:image] { "images": [ { "image": [ "https://files.readme.io/8a7f183-modelQueryPanel-empty.png", "modelQueryPanel-empty.png", 1846, 1250, "#ebeced" ], "caption": "Empty model query for LiftIgniter" } ] } [/block] When you load the page, an empty query is made to LiftIgniter's server (query.petametrics.com) from the lab server. The response returned is rendered on the frontend as a table as shown in the screenshot above. Note that the table is collapsed by default so you will need to expand it. [block:api-header] { "type": "basic", "title": "Interpreting the query response" } [/block] We display only a fixed set of fields in this interface (unlike our API, where we can return an arbitrary set of requested fields). This is to provide a predictable user experience that addresses most basic debugging use cases. The fields are as follows: * Rank, the first column, corresponds to the requested field called "rank" and is the rank of the recommended item. * Title (URL linked) prints the title (field "title") with a hyperlink to the URL (field "url"). If you are using an ID (field: "id") different from the URL, we will specify the ID parenthetically). The values of fields called "description" and "sponsored" are available if you hover over the information icon (*i*) after the title. * Published time is the published_time field, if you have sent it to us in ISO 8601 format. * Score is the field called adjustedScore (if available in the query response) or rawScore (if no adjustedScore is available). If you hover over the information icon <em>i</em>, you will see score diagnostics that provide more insight into how the scoring was done (field "scoreDiagnostics"). These diagnostics provide partial insight into how we are scoring queries, though not all the details of the scoring mechanism are obvious from this. * Real time sources corresponds to the field "realTimeSources" (that you can specify in "arrayRequestFields"). It lists the different real-time sources that were used to generate the item as a candidate. If the candidate did not come from real-time sources, this field will say "N/A". If there are multiple real-time sources, they will be listed with comma separators. [block:api-header] { "type": "basic", "title": "Query info below the response" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/d574965-modelQueryPanel-empty-queryInfo.png", "modelQueryPanel-empty-queryInfo.png", 1830, 648, "#eeefef" ], "caption": "Query info for empty model query to LiftIgniter" } ] } [/block] Below the query response, you will see a section giving information on the model query result. You can access this query information by passing in "getQueryInfo" : true into your model query. * "Did the current item/URL match our inventory (false if you entered nothing)?" corresponds to the field matchedInventory. * "Real-time sources used to generate candidates" corresponds to realTimeSources. It is the union of the real-time sources shown for each candidate. * "Experiment key" corresponds to experimentKey. It is an internal key used in our system in cases that we are segmenting traffic based on different experiments. In most cases, it will show "default". * "Total number of candidates considered" corresponds to the field numCandidates. If you hover on the information icon to the right, you can get more information on the number of candidates at various stages of the query processing pipeline. * "Total query time (in milliseconds)" corresponds to the field queryTime. If you hover on the information icon to the right, you will get information on cumulative time up to various stages of query processing. * "Actual model-server the query went to" is the DNS name of the machine the query went to. This isn't directly relevant to you (as these servers are not directly accessible) but can be useful to include in debugging information you send to us if there are issues. [block:api-header] { "type": "basic", "title": "Query parameters" } [/block] The interface does not give you full freedom to specify arbitrary query parameters. However, you can specify a few query parameters. After editing the parameters, you should click Submit again. When the results refresh, you will see the timestamp right above the results change to indicate the time of the most recent refresh. Some additional parameters can be specified by expanding the sections for "Enter browsing history" and "Advanced options". You can learn about these options by looking up the documentation for the [Model Query API](doc:model). [block:image] { "images": [ { "image": [ "https://files.readme.io/330823f-modelQuery-specific-url.png", "modelQuery-specific-url.png", 1834, 1298, "#eaebec" ] } ] } [/block]