[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-187599-en":3,"doc-seo-187599-105":30,"detail-sidebar-cat-1-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":11,"category_id":12,"category_name":13,"doc_title":14,"doc_description":15,"doc_content":16,"file_id":17,"file_url":18,"file_type":19,"file_size":20,"view_count":4,"is_deleted":4,"is_public":11,"is_downloadable":11,"audit_status":11,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":15,"update_tm":28,"read_time":29},187599,8814010472675,"Xiajie","https://avatar.qwps.com/avatar/WGlhamll",1,158,"General","DTS: A Neural Routing Approach for Cost-Aware Template Selection","This document introduces DTS, a novel neural routing approach for cost-aware template selection. The paper details two key algorithms: Algorithm 3, MLP Routing Decision, which uses a Multilayer Perceptron to predict template probabilities based on query embeddings and a confidence-based fallback mechanism, and Algorithm 4, Cost-Aware Template Selection Framework, which incorporates template costs and a quality threshold to achieve cost-optimal template selection. The MLP routing decision involves feature extraction through embedding and standardization, followed by MLP prediction of template probabilities. The cost-aware framework iterates through templates, calculating expected costs based on probabilities and individual template costs, ultimately selecting the most cost-effective template while ensuring a minimum quality threshold is met. The complexity analysis for both algorithms is provided, highlighting their computational efficiency.","| Approach | Template Selection | Performance-Based | Cross-Domain |\n| --- | --- | --- | --- |\n| Chain-of-Thought | Fixed | No | Limited |\n| Progressive Prompting | Iterative | No | Limited |\n| Dynamic Few-shot | Example-based | No | Limited |\n| Context-Aware | Rule-based | No | Limited |\n| DTS (Ours) | Neural routing | Yes | Yes |\n\n\n| Algorithm 3 MLP Routing Decision |\n| --- |\n| Require: Query q, model fMLP , scaler (µ,σ), threshold θ conf = 0 .3\u003Cbr>Ensure: Template t∗ and confidence score p∗\u003Cbr>1: // Feature Extraction\u003Cbr>2: x ← E(q) // Get 1536D embedding (check cache first)\u003Cbr>3: xscaled ← (x − µ)/σ // Standardize\u003Cbr>4: // MLP Prediction\u003Cbr>5: P ← fMLP.predict~~ ~~proba(xscaled) // K-dim probability vector\u003Cbr>6: k∗ ← arg maxkP[k] // Select template\u003Cbr>7: p∗ ← maxkP[k] // Confidence score\u003Cbr>8: // Confidence-based Fallback\u003Cbr>9: if p∗ \u003C θconf then\u003Cbr>10: t∗ ← tverbose // Fallback to safe verbose template\u003Cbr>11: else\u003Cbr>12: t∗ ← DecodeLabel(k∗ ) // Map index to template name\u003Cbr>13: end if\u003Cbr>14: return t∗, p∗\u003Cbr>15: // Complexity:\u003Cbr>16: Time: O (d2 ) ≈ 2.4M operations where d = 1536\u003Cbr>17: Space: O (d + K) for single query |\n| 4.4 Algorithm 4: Cost-Aware Template Selection |\n| Algorithm 4 Cost-Aware Template Selection Framework |\n| Require: Query q, router f, template costs {c(ti)}, quality threshold qmin\u003Cbr>Ensure: Cost-optimal template t∗\u003Cbr>1: // Get Routing Predictions\u003Cbr>2: P ← f.predict proba(q) // Probability distribution over templates\u003Cbr>3: // Expected Cost Minimization\u003Cbr>4: Initialize best cost: c best ← ∞\u003Cbr>5: Initialize best template: t∗ ← tverbose // Safe default\u003Cbr>6: for ti ∈ T do\u003Cbr>7: Compute expected cost: E [Ci] = c(ti) · P[i] + cfallback · (1 − P[i])\u003Cbr>8: if E [Ci] \u003C cbest then\u003Cbr>9: cbest ← E[Ci]\u003Cbr>10: t∗ ← ti\u003Cbr>11: end if\u003Cbr>12: end for\u003Cbr>13: return t∗\u003Cbr>14: // Complexity:\u003Cbr>15: Time: O (K) for cost computation where K = 5 templates\u003Cbr>16: Space: O (K) |","cbCaia9SUdyJypDv","https://ap.wps.com/l/cbCaia9SUdyJypDv","pdf",553187,20,"English","en",105,"# Algorithm 3 MLP Routing Decision\n## Complexity\n# Algorithm 4: Cost-Aware Template Selection\n## Complexity","[{\"question\":\"What is the primary approach presented in the document?\",\"answer\":\"The document presents DTS, a neural routing approach for cost-aware template selection.\"},{\"question\":\"How does Algorithm 3 (MLP Routing Decision) work?\",\"answer\":\"Algorithm 3 involves extracting features from a query, standardizing them, and then using an MLP to predict probabilities for different templates. It includes a confidence-based fallback to a verbose template if the confidence score is below a threshold.\"},{\"question\":\"What is the goal of Algorithm 4 (Cost-Aware Template Selection Framework)?\",\"answer\":\"Algorithm 4 aims to select a cost-optimal template by considering the expected cost, which is a combination of individual template costs and their probabilities of being selected, alongside a fallback cost.\"}]","DTS: A Neural Routing Approach for Cost-Aware Template Selection | PDF",1788384356,7,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":14,"keywords":34,"description":15,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"dts-a-neural-routing-approach-for-cost-aware-template-selection","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":11},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/template/","Template",2,{"item":49,"name":13,"@type":43,"position":50},"https://docshare.wps.com/template/general/",3,{"item":52,"name":14,"@type":43,"position":53},"https://docshare.wps.com/template/dts-a-neural-routing-approach-for-cost-aware-template-selection/187599/",4,{"url":52,"name":14,"@type":55,"author":56,"headline":14,"publisher":58,"fileFormat":61,"inLanguage":23,"description":15,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-09-02",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is the primary approach presented in the document?","Question",{"text":75,"@type":76},"The document presents DTS, a neural routing approach for cost-aware template selection.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does Algorithm 3 (MLP Routing Decision) work?",{"text":80,"@type":76},"Algorithm 3 involves extracting features from a query, standardizing them, and then using an MLP to predict probabilities for different templates. It includes a confidence-based fallback to a verbose template if the confidence score is below a threshold.",{"name":82,"@type":73,"acceptedAnswer":83},"What is the goal of Algorithm 4 (Cost-Aware Template Selection Framework)?",{"text":84,"@type":76},"Algorithm 4 aims to select a cost-optimal template by considering the expected cost, which is a combination of individual template costs and their probabilities of being selected, alongside a fallback cost.","https://schema.org",{"og:url":52,"og:type":87,"og:title":14,"og:site_name":59,"og:description":15},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,98,103,108,113,118,123,128,133],{"id":94,"doc_module":11,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},11,"Presentations",90,"presentations",{"id":99,"doc_module":11,"doc_module_name":46,"category_name":100,"show_sort_weight":101,"slug":102},12,"Resumes",80,"resumes",{"id":104,"doc_module":11,"doc_module_name":46,"category_name":105,"show_sort_weight":106,"slug":107},14,"Invoices",70,"invoices",{"id":109,"doc_module":11,"doc_module_name":46,"category_name":110,"show_sort_weight":111,"slug":112},15,"Posters",60,"posters",{"id":114,"doc_module":11,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},16,"Social Media",50,"social-media",{"id":119,"doc_module":11,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},17,"Forms",40,"forms",{"id":124,"doc_module":11,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},18,"Letters",30,"letters",{"id":129,"doc_module":11,"doc_module_name":46,"category_name":130,"show_sort_weight":131,"slug":132},21,"Paper Templates",5,"papers-templates",{"id":12,"doc_module":11,"doc_module_name":46,"category_name":13,"show_sort_weight":4,"slug":134},"general-158"]